01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. The ASF licenses this file to You
04: * under the Apache License, Version 2.0 (the "License"); you may not
05: * use this file except in compliance with the License.
06: * You may obtain a copy of 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,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License. For additional information regarding
15: * copyright in this work, please see the NOTICE file in the top level
16: * directory of this distribution.
17: */
18: /*
19: * ConfigDef.java
20: *
21: * Created on June 4, 2005, 1:10 PM
22: */
23:
24: package org.apache.roller.config.runtime;
25:
26: import java.util.ArrayList;
27: import java.util.List;
28:
29: /**
30: * Represents a logic grouping of runtime configuration properties.
31: * Each ConfigDef may contain 0 or more DisplayGroups.
32: *
33: * @author Allen Gilliland
34: */
35: public class ConfigDef {
36:
37: private List displayGroups = null;
38: private String name = null;
39:
40: public ConfigDef() {
41: this .displayGroups = new ArrayList();
42: }
43:
44: public ConfigDef(List displaygroups) {
45: this .displayGroups = displaygroups;
46: }
47:
48: public boolean addDisplayGroup(DisplayGroup group) {
49: return this .displayGroups.add(group);
50: }
51:
52: public boolean removeDisplayGroup(DisplayGroup group) {
53: return this .displayGroups.remove(group);
54: }
55:
56: public String toString() {
57: return name;
58: }
59:
60: public List getDisplayGroups() {
61: return displayGroups;
62: }
63:
64: public void setDisplayGroups(List displayGroups) {
65: this .displayGroups = displayGroups;
66: }
67:
68: public String getName() {
69: return name;
70: }
71:
72: public void setName(String name) {
73: this.name = name;
74: }
75:
76: }
|