01: /*
02: * Copyright 2006 Day Management AG, Switzerland. All rights reserved.
03: */
04: package javax.jcr.nodetype;
05:
06: import java.util.List;
07:
08: /**
09: * The <code>NodeTypeTemplate</code> interface represents a simple container
10: * structure used to define node types which are then registered through the
11: * <code>NodeTypeManager.registerNodeType</code> method.
12: * <p/>
13: * <code>NodeTypeTemplate</code>, like <code>NodeType</code>, is a subclass of
14: * <code>NodeTypeDefinition</code> so it shares with <code>NodeType</code> those
15: * methods that are relevant to a static definition. In addition,
16: * <code>NodeTypeTemplate</code> provides methods for setting the attributes of
17: * the definition. Implementations of this interface need not contain any
18: * validation logic.
19: * <p/>
20: * See the corresponding <code>get</code> methods for each attribute in
21: * <code>NodeTypeDefinition</code> for the default values assumed when a new
22: * empty <code>NodeTypeTemplate</code> is created (as opposed to one extracted
23: * from an existing <code>NodeType</code>).
24: *
25: * @since JCR 2.0
26: */
27: public interface NodeTypeTemplate extends NodeTypeDefinition {
28:
29: /**
30: * Sets the name of the node type.
31: *
32: * @param name a <code>String</code>.
33: */
34: public void setName(String name);
35:
36: /**
37: * Sets the names of the supertypes of the node type.
38: *
39: * @param names a <code>String</code> array.
40: */
41: public void setDeclaredSuperTypeNames(String[] names);
42:
43: /**
44: * Sets the abstract flag of the node type.
45: *
46: * @param abstractStatus a <code>boolean</code>.
47: */
48: public void setAbstract(boolean abstractStatus);
49:
50: /**
51: * Sets the mixin flag of the node type.
52: *
53: * @param mixin a <code>boolean</code>.
54: */
55: public void setMixin(boolean mixin);
56:
57: /**
58: * Sets the orderable child nodes flag of the node type.
59: *
60: * @param orderable a <code>boolean</code>.
61: */
62: public void setOrderableChildNodes(boolean orderable);
63:
64: /**
65: * Sets the name of the primary item.
66: *
67: * @param name a <code>String</code>.
68: */
69: public void setPrimaryItemName(String name);
70:
71: /**
72: * Returns a mutable <code>List</code> of <code>PropertyDefinitionTemplate</code>
73: * objects. To define a new <code>NodeTypeTemplate</code> or change an
74: * existing one, <code>PropertyDefinitionTemplate</code> objects can be
75: * added to or removed from this <code>List</code>.
76: *
77: * @return a mutable <code>List</code> of <code>PropertyDefinitionTemplate</code> objects.
78: */
79: public List getPropertyDefinitionTemplates();
80:
81: /**
82: * Returns a mutable <code>List</code> of <code>NodeDefinitionTemplate</code>
83: * objects. To define a new <code>NodeTypeTemplate</code> or change an
84: * existing one, <code>NodeDefinitionTemplate</code> objects can be added
85: * to or removed from this <code>List</code>.
86: *
87: * @return a mutable <code>List</code> of <code>NodeDefinitionTemplate</code> objects.
88: */
89: public List getNodeDefinitionTemplates();
90: }
|