01: /*
02: * Copyright 2004 Outerthought bvba and Schaubroeck nv
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License"); you may not
05: * use this file except in compliance with the License. You may obtain a copy of
06: * the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12: * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13: * License for the specific language governing permissions and limitations under
14: * the License.
15: */
16: package org.outerj.daisy.publisher.serverimpl.requestmodel;
17:
18: import org.outerj.daisy.repository.VariantKey;
19:
20: import java.util.Set;
21: import java.util.Map;
22: import java.util.Collections;
23:
24: public class VariablesConfig {
25: private final VariantKey[] variableDocs;
26: private final Map<String, Set<String>> variableElementAttr;
27: public static final VariablesConfig DEFAULT_INSTANCE = new VariablesConfig();
28:
29: public VariablesConfig() {
30: this .variableDocs = null;
31: this .variableElementAttr = Collections.emptyMap();
32: }
33:
34: public VariablesConfig(VariantKey[] variableDocs,
35: Map<String, Set<String>> variableElementAttr) {
36: this .variableDocs = variableDocs;
37: this .variableElementAttr = variableElementAttr;
38: }
39:
40: /**
41: * Can return null.
42: */
43: public VariantKey[] getVariableDocs() {
44: return variableDocs;
45: }
46:
47: /**
48: * Returning null means "resolve variables in all attributes". If no attributes
49: * need to be handled, an empty map is returned.
50: */
51: public Map<String, Set<String>> getVariableElementAttr() {
52: return variableElementAttr;
53: }
54: }
|