1 13 package info.magnolia.cms.core; 14 15 import java.io.Serializable ; 16 17 18 22 public final class ItemType implements Serializable { 23 24 27 public static final String NT_BASE = "nt:base"; 29 32 public static final String NT_UNSTRUCTRUED = "nt:unstructured"; 34 37 public static final String NT_HIERARCHY = "nt:hierarchyNode"; 39 42 public static final String NT_FOLDER = "nt:folder"; 44 47 public static final String NT_FILE = "nt:file"; 49 52 public static final String MIX_ACCESSCONTROLLABLE = "mix:accessControllable"; 54 57 public static final String MIX_REFERENCEABLE = "mix:referenceable"; 59 62 public static final String MIX_VERSIONABLE = "mix:versionable"; 64 68 public static final String NT_CONTENT = "mgnl:content"; 70 74 public static final String NT_CONTENTNODE = "mgnl:contentNode"; 76 79 public static final String NT_NODEDATA = "mgnl:nodeData"; 81 84 public static final ItemType CONTENT = new ItemType("mgnl:content"); 86 89 public static final ItemType CONTENTNODE = new ItemType("mgnl:contentNode"); 91 94 public static final ItemType JCR_CONTENT = new ItemType("jcr:content"); 96 99 private static final long serialVersionUID = 222L; 100 101 104 private String systemName; 105 106 110 private ItemType(String systemName) { 111 this.systemName = systemName; 112 } 113 114 118 public String getSystemName() { 119 return this.systemName; 120 } 121 122 125 public boolean equals(Object object) { 126 if (!(object instanceof ItemType)) { 127 return false; 128 } 129 ItemType rhs = (ItemType) object; 130 return this.systemName.equals(rhs.systemName); 131 } 132 133 136 public String toString() { 137 return this.systemName; 138 } 139 140 143 public int hashCode() { 144 return this.systemName.hashCode(); 145 } 146 147 } 148 | Popular Tags |