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.cms.core;
35
36 import java.io.Serializable;
37
38
39
40
41
42
43
44
45 public final class ItemType implements Serializable {
46
47
48
49
50 public static final String NT_BASE = "nt:base";
51
52
53
54
55 public static final String NT_UNSTRUCTURED = "nt:unstructured";
56
57
58
59
60 public static final String NT_HIERARCHY = "nt:hierarchyNode";
61
62
63
64
65 public static final String NT_FOLDER = "mgnl:folder";
66
67
68
69
70 public static final String NT_FILE = "nt:file";
71
72
73
74
75 public static final String NT_RESOURCE = "mgnl:resource";
76
77
78
79
80 public static final String NT_METADATA = "mgnl:metaData";
81
82
83
84
85 public static final ItemType WORKITEM = new ItemType("workItem");
86
87
88
89
90 public static final ItemType EXPRESSION = new ItemType("expression");
91
92
93
94
95 public static final String MIX_ACCESSCONTROLLABLE = "mix:accessControllable";
96
97
98
99
100 public static final String MIX_REFERENCEABLE = "mix:referenceable";
101
102
103
104
105 public static final String MIX_VERSIONABLE = "mix:versionable";
106
107 public static final String MIX_LOCKABLE = "mix:lockable";
108
109 public static final String DELETED_NODE_MIXIN = "mgnl:deleted";
110
111
112
113
114
115 @Deprecated
116 public static final String NT_CONTENT = "mgnl:content";
117
118 public static final String MGNL_NODE_DATA = "mgnl:nodeData";
119
120 public static final String NT_FROZENNODE = "nt:frozenNode";
121
122 public static final String JCR_FROZENNODE = "jcr:frozenNode";
123
124 public static final String JCR_FROZEN_PRIMARY_TYPE = "jcr:frozenPrimaryType";
125
126 public static final String JCR_PRIMARY_TYPE = "jcr:primaryType";
127
128 public static final String JCR_DATA = "jcr:data";
129
130
131
132
133
134 @Deprecated
135 public static final String NT_CONTENTNODE = "mgnl:contentNode";
136
137 public static final ItemType CONTENT = new ItemType("mgnl:content");
138
139 public static final ItemType CONTENTNODE = new ItemType("mgnl:contentNode");
140
141 public static final ItemType USER = new ItemType("mgnl:user");
142
143 public static final ItemType ROLE = new ItemType("mgnl:role");
144
145 public static final ItemType GROUP = new ItemType("mgnl:group");
146
147 public static final ItemType SYSTEM = new ItemType("mgnl:reserve");
148
149 public static final ItemType JCR_CONTENT = new ItemType("jcr:content");
150
151 public static final ItemType FOLDER = new ItemType(NT_FOLDER);
152
153 public static final ItemType PAGE = new ItemType(MgnlNodeType.NT_PAGE);
154 public static final ItemType AREA = new ItemType(MgnlNodeType.NT_AREA);
155 public static final ItemType COMPONENT = new ItemType(MgnlNodeType.NT_COMPONENT);
156
157
158
159
160 private static final long serialVersionUID = 222L;
161
162
163
164
165 private final String systemName;
166
167
168
169
170
171 public ItemType(String systemName) {
172 this.systemName = systemName;
173 }
174
175
176
177
178
179 public String getSystemName() {
180 return this.systemName;
181 }
182
183
184
185
186 @Override
187 public boolean equals(Object object) {
188 if (!(object instanceof ItemType)) {
189 return false;
190 }
191 ItemType rhs = (ItemType) object;
192 return this.systemName.equals(rhs.systemName);
193 }
194
195
196
197
198 @Override
199 public String toString() {
200 return this.systemName;
201 }
202
203
204
205
206 @Override
207 public int hashCode() {
208 return this.systemName.hashCode();
209 }
210
211 }