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.module.site;
35
36 import info.magnolia.cms.beans.config.URI2RepositoryMapping;
37 import info.magnolia.cms.i18n.I18nContentSupport;
38 import info.magnolia.module.site.templates.ConfiguredTemplateSettings;
39 import info.magnolia.module.site.templates.TemplateSettings;
40 import info.magnolia.module.site.theme.ThemeReference;
41
42 import java.util.ArrayList;
43 import java.util.HashMap;
44 import java.util.List;
45 import java.util.Map;
46
47
48
49
50
51 public class ConfiguredSite implements Site {
52
53 private String name;
54
55 private Boolean enabled = Boolean.TRUE;
56
57 private Map<String, Object> parameters = new HashMap<String, Object>();
58
59 private TemplateSettings templates = new ConfiguredTemplateSettings();
60
61 private ThemeReference theme = new ThemeReference();
62
63 private I18nContentSupport i18n;
64
65 private List<Domain> domains = new ArrayList<Domain>();
66
67 private Map<String, URI2RepositoryMapping> mappings = new HashMap<String, URI2RepositoryMapping>();
68
69 private Map<String, Site> variations = new HashMap<String, Site>();
70
71 @Override
72 public ThemeReference getTheme() {
73 return theme;
74 }
75
76 public void setTheme(ThemeReference ref) {
77 this.theme = ref;
78 }
79
80 @Override
81 public TemplateSettings getTemplates() {
82 return this.templates;
83 }
84
85 public void setTemplates(TemplateSettings templates) {
86 this.templates = templates;
87 }
88
89 @Override
90 public I18nContentSupport getI18n() {
91 return this.i18n;
92 }
93
94 public void setI18n(I18nContentSupport i18n) {
95 this.i18n = i18n;
96 }
97
98 @Override
99 public String getName() {
100 return this.name;
101 }
102
103 public void setName(String name) {
104 this.name = name;
105 }
106
107 @Override
108 public Boolean isEnabled() {
109 return this.enabled;
110 }
111
112 public void setEnabled(Boolean enabled) {
113 this.enabled = enabled;
114 }
115
116 @Override
117 public Map<String, Object> getParameters() {
118 return this.parameters;
119 }
120
121 public void setParameters(Map<String, Object> parameters) {
122 this.parameters = parameters;
123 }
124
125 @Override
126 public List<Domain> getDomains() {
127 return domains;
128 }
129
130 public void setDomains(List<Domain> domains) {
131 this.domains = domains;
132 }
133
134 @Override
135 public Map<String, URI2RepositoryMapping> getMappings() {
136 return this.mappings;
137 }
138
139 public void setMappings(Map<String, URI2RepositoryMapping> mappings) {
140 this.mappings = mappings;
141 }
142
143 @Override
144 public Map<String, Site> getVariations() {
145 return variations;
146 }
147
148 public void setVariations(Map<String, Site> variations) {
149 this.variations = variations;
150 }
151
152 @Override
153 public String toString() {
154 return this.name
155 + (this.domains == null ? "" : (", Domains:" + this.domains))
156 + (this.mappings == null ? "" : (", Mappings:" + this.mappings))
157 + (this.i18n == null ? "" : (" I18n:" + this.i18n));
158 }
159
160 }