|
Oracle Beehive Java Content Repository Java API Reference Release 1 (1.3) E11993-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface OraclePropertyDefinition
A property definition. Used in node type definitions.
Method Summary | |
---|---|
javax.jcr.Value[] |
getDefaultValues() Gets the default value(s) of the property. |
int |
getRequiredType() Gets the required type of the property. |
java.lang.String[] |
getValueConstraints() Gets the array of constraint strings. |
boolean |
isMultiple() Reports whether this property can have multiple values. |
Methods inherited from interface javax.jcr.nodetype.ItemDefinition |
---|
getDeclaringNodeType, getName, getOnParentVersion, isAutoCreated, isMandatory, isProtected |
Method Detail |
---|
int getRequiredType()
PropertyType.STRING
PropertyType.DATE
PropertyType.BINARY
PropertyType.DOUBLE
PropertyType.LONG
PropertyType.BOOLEAN
PropertyType.NAME
PropertyType.PATH
PropertyType.REFERENCE
PropertyType.UNDEFINED
PropertyType.UNDEFINED
is returned if this property may be of any type.getRequiredType
in interface javax.jcr.nodetype.PropertyDefinition
java.lang.String[] getValueConstraints()
["constraint1", "constraint2", "constraint3"]
has the interpretation: "the value of this property must meet either constraint1, constraint2 or constraint3".
Returning an empty array, indicates that value constraint information is available and that no constraints are placed on this value.
The constraint strings themselves having differing formats and interpretations depending on the type of the property in question. The following describes the value constraint syntax for Reference property type since only they have ValueConstraints in the current implementation. All other property types have no constraints on their value:
REFERENCE
: The constraint string is a JCR name in prefix form. This name is interpreted as a node type name and the REFERENCE
property is restricted to referring only to nodes that have at least the indicated node type. For example, a constraint of "mytype:document
" would indicate that the REFERENCE property in question can only refer to nodes that have at least the node type mytype:document
. No wildcards or other pattern matching are supported. The string returned must reflect the namespace mapping in the current Session
. Constraint strings for REFERENCE
properties should be stored in fully-qualified form (using the actual URI instead of the prefix) and then be converted to prefix form according to the current mapping.getValueConstraints
in interface javax.jcr.nodetype.PropertyDefinition
String
array.javax.jcr.Value[] getDefaultValues()
ItemDefinition.isAutoCreated()
returns true
).
This method returns an array of Value objects. If the property is multi-valued, then this array represents the full set of values that the property will be assigned upon being auto-created. Note that this could be the empty array. If the property is single-valued, then the array returned will be of size 1. <p/> If null
is returned, then the property has no fixed default value.
getDefaultValues
in interface javax.jcr.nodetype.PropertyDefinition
Value
objects.boolean isMultiple()
isMultiple
in interface javax.jcr.nodetype.PropertyDefinition
boolean
|
Oracle Beehive Java Content Repository Java API Reference Release 1 (1.3) E11993-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |