01: /*
02: * Copyright 2006 Day Management AG, Switzerland. All rights reserved.
03: */
04: package javax.jcr.nodetype;
05:
06: import javax.jcr.Value;
07:
08: /**
09: * The <code>PropertyDefinitionTemplate</code> interface extends
10: * <code>PropertyDefinition</code> with the addition of write methods, enabling the
11: * characteristics of a child property definition to be set, after which the
12: * <code>PropertyDefinitionTemplate</code> is added to a <code>NodeTypeTemplate</code>.
13: * <p/>
14: * See the corresponding <code>get</code> methods for each attribute in
15: * <code>PropertyDefinition</code> for the default values assumed when a new
16: * empty <code>PropertyDefinitionTemplate</code> is created (as opposed to one
17: * extracted from an existing <code>NodeType</code>).
18: *
19: * @since JCR 2.0
20: */
21: public interface PropertyDefinitionTemplate extends PropertyDefinition {
22:
23: /**
24: * Sets the name of the property.
25: *
26: * @param name a <code>String</code>.
27: */
28: public void setName(String name);
29:
30: /**
31: * Sets the auto-create status of the property.
32: *
33: * @param autoCreated a <code>boolean</code>.
34: */
35: public void setAutoCreated(boolean autoCreated);
36:
37: /**
38: * Sets the mandatory status of the property.
39: *
40: * @param mandatory a <code>boolean</code>.
41: */
42: public void setMandatory(boolean mandatory);
43:
44: /**
45: * Sets the on-parent-version status of the property.
46: *
47: * @param opv an <code>int</code> constant member of <code>OnParentVersionAction</code>.
48: */
49: public void setOnParentVersion(int opv);
50:
51: /**
52: * Sets the protected status of the property.
53: *
54: * @param protectedStatus a <code>boolean</code>.
55: */
56: public void setProtected(boolean protectedStatus);
57:
58: /**
59: * Sets the required type of the property.
60: *
61: * @param type an <code>int</code> constant member of <code>PropertyType</code>.
62: */
63: public void setRequiredType(int type);
64:
65: /**
66: * Sets the value constraints of the property.
67: *
68: * @param constraints a <code>String</code> array.
69: */
70: public void setValueConstarints(String[] constraints);
71:
72: /**
73: * Sets the default value (or values, in the case of a multi-value property) of the property.
74: *
75: * @param defaultValues a <code>Value</code> array.
76: */
77: public void setDefaultValues(Value[] defaultValues);
78:
79: /**
80: * Sets the multi-value status of the property.
81: *
82: * @param multiple a <code>boolean</code>.
83: */
84: public void setMultiple(boolean multiple);
85: }
|