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
109
110
111
112 public static final String NT_CONTENT = "mgnl:content";
113
114 public static final String NT_FROZENNODE = "nt:frozenNode";
115
116 public static final String JCR_FROZENNODE = "jcr:frozenNode";
117
118 public static final String JCR_FROZEN_PRIMARY_TYPE = "jcr:frozenPrimaryType";
119
120 public static final String JCR_PRIMARY_TYPE = "jcr:primaryType";
121
122 public static final String JCR_DATA = "jcr:data";
123
124
125
126
127
128 public static final String NT_CONTENTNODE = "mgnl:contentNode";
129
130 public static final ItemType CONTENT = new ItemType("mgnl:content");
131
132 public static final ItemType CONTENTNODE = new ItemType("mgnl:contentNode");
133
134 public static final ItemType USER = new ItemType("mgnl:user");
135
136 public static final ItemType ROLE = new ItemType("mgnl:role");
137
138 public static final ItemType GROUP = new ItemType("mgnl:group");
139
140 public static final ItemType SYSTEM = new ItemType("mgnl:reserve");
141
142 public static final ItemType JCR_CONTENT = new ItemType("jcr:content");
143
144 public static final ItemType FOLDER = new ItemType(NT_FOLDER);
145
146
147
148
149
150 private static final long serialVersionUID = 222L;
151
152
153
154
155 private String systemName;
156
157
158
159
160
161 public ItemType(String systemName) {
162 this.systemName = systemName;
163 }
164
165
166
167
168
169 public String getSystemName() {
170 return this.systemName;
171 }
172
173
174
175
176 public boolean equals(Object object) {
177 if (!(object instanceof ItemType)) {
178 return false;
179 }
180 ItemType rhs = (ItemType) object;
181 return this.systemName.equals(rhs.systemName);
182 }
183
184
185
186
187 public String toString() {
188 return this.systemName;
189 }
190
191
192
193
194 public int hashCode() {
195 return this.systemName.hashCode();
196 }
197
198 }