1 5 6 package org.exoplatform.services.jcr.impl.core.nodetype.exo; 7 8 9 import javax.jcr.nodetype.PropertyDef; 10 import javax.jcr.nodetype.NodeDef; 11 import javax.jcr.PropertyType; 12 import javax.jcr.version.OnParentVersionAction; 13 import org.exoplatform.services.jcr.impl.core.nodetype.NodeDefImpl; 14 import org.exoplatform.services.jcr.impl.core.nodetype.NodeTypeImpl; 15 import org.exoplatform.services.jcr.impl.core.nodetype.PropertyDefImpl; 16 import org.exoplatform.services.jcr.impl.core.nodetype.nt.Base; 17 18 23 public class MockNodeType extends NodeTypeImpl { 24 28 public MockNodeType() { 29 this.name = "exo:mockNodeType"; 30 this.mixin = false; 31 this.declaredSupertypes = new javax.jcr.nodetype.NodeType[1]; 32 this.declaredSupertypes[0] = new Base(); 33 this.declaredPropertyDefs = new PropertyDef[2]; 34 this.declaredPropertyDefs[0] = new PropertyDefImpl("jcr:nodeTypeName", null, PropertyType.STRING, 35 null, null, true, true, 36 OnParentVersionAction.COPY, false, false, false); 37 this.declaredPropertyDefs[1] = new PropertyDefImpl("jcr:supertypes", null, PropertyType.STRING, 38 null, null, true, false, 39 OnParentVersionAction.COPY, false, false, true); 40 this.declaredNodeDefs = new NodeDef[2]; 41 String [] types = {"nt:propertyDef"}; 42 this.declaredNodeDefs[0] = new NodeDefImpl("jcr:propertyDef", types, "nt:propertyDef", 43 null, null, 44 false, true, OnParentVersionAction.VERSION, false, false, 45 true); 46 types[0] = "nt:childNodeDef"; 47 this.declaredNodeDefs[1] = new NodeDefImpl("jcr:childNodeDef", types, "nt:childNodeDef", 48 null, null, 49 false, true, OnParentVersionAction.VERSION, false, false, 50 true); 51 } 52 } 53 | Popular Tags |