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