1 5 6 package org.exoplatform.services.jcr.impl.core.nodetype.mix; 7 8 9 import javax.jcr.nodetype.PropertyDef; 10 import javax.jcr.nodetype.NodeType; 11 import javax.jcr.nodetype.NodeDef; 12 13 14 import javax.jcr.PropertyType; 15 import javax.jcr.Value; 16 import javax.jcr.StringValue; 17 18 19 import javax.jcr.version.OnParentVersionAction; 20 import org.exoplatform.services.jcr.impl.core.nodetype.NodeDefImpl; 21 import org.exoplatform.services.jcr.impl.core.nodetype.NodeTypeImpl; 22 import org.exoplatform.services.jcr.impl.core.nodetype.PropertyDefImpl; 23 import org.exoplatform.services.jcr.impl.core.nodetype.nt.Base; 24 25 31 32 public class Versionable extends NodeTypeImpl { 33 34 38 public Versionable() { 39 this.name = "mix:versionable"; 40 this.mixin = true; 41 this.declaredSupertypes = new NodeType[1]; 42 this.declaredSupertypes[0] = new Referenceable(); 43 this.declaredPropertyDefs = new PropertyDef[4]; 44 45 this.declaredPropertyDefs[0] = new PropertyDefImpl("jcr:versionHistory", null, PropertyType.REFERENCE, 46 "\"nt:versionHistory\"", null, true, true, 47 OnParentVersionAction.COPY, true, false, false); 48 49 this.declaredPropertyDefs[1] = new PropertyDefImpl("jcr:baseVersion", null, PropertyType.REFERENCE, 50 "\"nt:version\"", null, true, true, 51 OnParentVersionAction.IGNORE, true, false, false); 52 53 this.declaredPropertyDefs[2] = new PropertyDefImpl("jcr:isCheckedOut", null, PropertyType.BOOLEAN, 54 null, new StringValue("[\"true\"]"), true, true, 55 OnParentVersionAction.IGNORE, true, false, false); 56 57 this.declaredPropertyDefs[3] = new PropertyDefImpl("jcr:predecessors", null, PropertyType.REFERENCE, 58 "\"nt:version\"", null, true, true, 59 OnParentVersionAction.COPY, false, false, true); 60 61 } 62 63 } 64 | Popular Tags |