KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > services > jcr > impl > core > nodetype > nt > PropertyDefNT


1 /*
2  * Copyright 2001-2003 The eXo platform SARL All rights reserved.
3  * Please look at license.txt in info directory for more license detail.
4  */

5
6 package org.exoplatform.services.jcr.impl.core.nodetype.nt;
7
8
9 import javax.jcr.nodetype.*;
10 import javax.jcr.PropertyType;
11 import javax.jcr.version.OnParentVersionAction;
12 import org.exoplatform.services.jcr.impl.core.nodetype.NodeDefImpl;
13 import org.exoplatform.services.jcr.impl.core.nodetype.NodeTypeImpl;
14 import org.exoplatform.services.jcr.impl.core.nodetype.PropertyDefImpl;
15
16 /**
17  * Created y the eXo platform team
18  * User: Benjamin Mestrallet
19  * Date: 31 juil. 2004
20  */

21 public class PropertyDefNT extends NodeTypeImpl {
22   //name, declaringNodeType, requiredType,
23
// vlueConstraint, defaultValue, autoCreate, mandatory,
24
// onVersion, readOnly, primaryItem, multiple)
25

26   public PropertyDefNT() {
27     this.name = "nt:propertyDef";
28     this.mixin = false;
29     this.declaredSupertypes = new javax.jcr.nodetype.NodeType[1];
30     this.declaredSupertypes[0] = new Base();
31     this.declaredPropertyDefs = new javax.jcr.nodetype.PropertyDef[10];
32     this.declaredPropertyDefs[0] = new PropertyDefImpl("jcr:name", null, PropertyType.STRING,
33         null, null, true, true,
34         OnParentVersionAction.COPY, false, false, false);
35     this.declaredPropertyDefs[1] = new PropertyDefImpl("jcr:type", null, PropertyType.STRING,
36         null, null, true, true,
37         OnParentVersionAction.COPY, false, false, false);
38     this.declaredPropertyDefs[2] = new PropertyDefImpl("jcr:valueConstraint", null, PropertyType.STRING,
39         null, null, true, true,
40         OnParentVersionAction.COPY, false, false, false);
41     this.declaredPropertyDefs[3] = new PropertyDefImpl("jcr:defaultValue", null, PropertyType.UNDEFINED,
42         null, null, true, true,
43         OnParentVersionAction.COPY, false, false, false);
44     this.declaredPropertyDefs[4] = new PropertyDefImpl("jcr:autoCreate", null, PropertyType.BOOLEAN,
45         null, null, true, true,
46         OnParentVersionAction.COPY, false, false, false);
47     this.declaredPropertyDefs[5] = new PropertyDefImpl("jcr:mandatory", null, PropertyType.BOOLEAN,
48         null, null, true, true,
49         OnParentVersionAction.COPY, false, false, false);
50     this.declaredPropertyDefs[6] = new PropertyDefImpl("jcr:onParentVersion", null, PropertyType.STRING,
51         null, null, true, true,
52         OnParentVersionAction.COPY, false, false, false);
53     this.declaredPropertyDefs[7] = new PropertyDefImpl("jcr:readOnly", null, PropertyType.BOOLEAN,
54         null, null, true, true,
55         OnParentVersionAction.COPY, false, false, false);
56     this.declaredPropertyDefs[8] = new PropertyDefImpl("jcr:primaryItem", null, PropertyType.BOOLEAN,
57         null, null, true, true,
58         OnParentVersionAction.COPY, false, false, false);
59     this.declaredPropertyDefs[9] = new PropertyDefImpl("jcr:multiple", null, PropertyType.BOOLEAN,
60         null, null, true, true,
61         OnParentVersionAction.COPY, false, false, false);
62   }
63 }
64
Popular Tags