1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34 package info.magnolia.rendering.template.configured;
35
36 import info.magnolia.rendering.template.AreaDefinition;
37 import info.magnolia.rendering.template.ComponentAvailability;
38 import info.magnolia.rendering.template.InheritanceConfiguration;
39
40 import java.util.LinkedHashMap;
41 import java.util.Map;
42
43
44
45
46
47
48 public class ConfiguredAreaDefinition extends ConfiguredTemplateDefinition implements AreaDefinition {
49
50 private Map<String, ComponentAvailability> availableComponents = new LinkedHashMap<String, ComponentAvailability>();
51
52
53 private Boolean enabled;
54 private Boolean optional;
55 private String type;
56 private String contentStructure;
57 private InheritanceConfiguration inheritance = new ConfiguredInheritance();
58
59 @Override
60 public Map<String, ComponentAvailability> getAvailableComponents() {
61 return availableComponents;
62 }
63
64 public void setAvailableComponents(Map<String, ComponentAvailability> availableComponents) {
65 this.availableComponents = availableComponents;
66 }
67
68 public void addAvailableComponent(String name, ComponentAvailability configuredComponentAvailability) {
69 this.availableComponents.put(name, configuredComponentAvailability);
70 }
71
72 @Override
73 public Boolean isEnabled() {
74 return this.enabled;
75 }
76
77 public void setEnabled(Boolean enabled) {
78 this.enabled = enabled;
79 }
80
81 @Override
82 public String getType() {
83 return type;
84 }
85
86 public void setType(String type) {
87 this.type = type;
88 }
89
90 @Override
91 public String getContentStructure() {
92 return contentStructure;
93 }
94
95 public void setContentStructure(String contentStructure) {
96 this.contentStructure = contentStructure;
97 }
98
99 @Override
100 public InheritanceConfiguration getInheritance() {
101 return inheritance;
102 }
103
104 public void setInheritance(InheritanceConfiguration inheritanceConfiguration) {
105 this.inheritance = inheritanceConfiguration;
106 }
107
108 @Override
109 public Boolean isOptional() {
110 return optional;
111 }
112
113 public void setOptional(Boolean optional) {
114 this.optional = optional;
115 }
116
117 }