|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Property
A Property object represents the smallest granularity of content
storage. It has a single parent node and no children. A property consists of
a name and a value, or in the case of multi-value properties, a set of values
all of the same type. See .
Value
| Field Summary | |
|---|---|
static java.lang.String |
JCR_ACTIVITY
A constant for the property name jcr:activity (in expanded
form), declared in node types mix:versionable and nt:version. |
static java.lang.String |
JCR_AUTOCREATED
A constant for the property name jcr:autoCreated (in
expanded form), declared in node types nt:propertyDefinition and nt:childNodeDefinition. |
static java.lang.String |
JCR_BASE_VERSION
A constant for the property name jcr:baseVersion (in
expanded form), declared in node type mix:versionable. |
static java.lang.String |
JCR_CHILD_VERSION_HISTORY
A constant for the property name jcr:childVersionHistory (in
expanded form), declared in node type nt:versionedChild. |
static java.lang.String |
JCR_CONFIGURATION
A constant for the property name jcr:configuration (in
expanded form), declared in node type mix:versionable. |
static java.lang.String |
JCR_CONTENT
A constant for the property name jcr:content (in expanded
form), declared in node type nt:linkedFile. |
static java.lang.String |
JCR_COPIED_FROM
A constant for the property name jcr:copiedFrom (in expanded
form), declared in node type nt:version. |
static java.lang.String |
JCR_CREATED
A constant for the property name jcr:created (in expanded
form), declared in node types mix:created and nt:version. |
static java.lang.String |
JCR_CREATED_BY
A constant for the property name jcr:createdBy (in expanded
form), declared in node type mix:created. |
static java.lang.String |
JCR_CURRENT_LIFECYCLE_STATE
A constant for the property name jcr:currentLifecycleState
(in expanded form), declared in node type mix:lifecycle. |
static java.lang.String |
JCR_DATA
A constant for the property name jcr:data (in expanded
form), declared in node type nt:resource. |
static java.lang.String |
JCR_DEFAULT_PRIMARY_TYPE
A constant for the property name jcr:defaultPrimaryType (in
expanded form), declared in node type nt:childNodeDefinition. |
static java.lang.String |
JCR_DEFAULT_VALUES
A constant for the property name jcr:defaultValues (in
expanded form), declared in node type nt:propertyDefinition. |
static java.lang.String |
JCR_DESCRIPTION
A constant for the property name jcr:description (in
expanded form), declared in node type mix:title. |
static java.lang.String |
JCR_ENCODING
A constant for the property name jcr:encoding (in expanded
form), declared in node type mix:mimeType. |
static java.lang.String |
JCR_FROZEN_MIXIN_TYPES
A constant for the property name jcr:frozenMixinTypes (in
expanded form), declared in node type nt:frozenNode. |
static java.lang.String |
JCR_FROZEN_PRIMARY_TYPE
A constant for the property name jcr:frozenPrimaryType (in
expanded form), declared in node type nt:frozenNode. |
static java.lang.String |
JCR_FROZEN_UUID
A constant for the property name jcr:frozenUuid (in expanded
form), declared in node type nt:frozenNode. |
static java.lang.String |
JCR_HAS_ORDERABLE_CHILD_NODES
A constant for the property name jcr:hasOrderableChildNodes
(in expanded form), declared in node type nt:nodeType. |
static java.lang.String |
JCR_HOST
A constant for the property name jcr:host (in expanded
form), declared in node type nt:address. |
static java.lang.String |
JCR_ID
A constant for the property name jcr:id (in expanded form),
declared in node type nt:address. |
static java.lang.String |
JCR_IS_ABSTRACT
A constant for the property name jcr:isAbstract (in expanded
form), declared in node type nt:nodeType. |
static java.lang.String |
JCR_IS_CHECKED_OUT
A constant for the property name jcr:isCheckedOut (in
expanded form), declared in node type mix:simpleVersionable. |
static java.lang.String |
JCR_IS_MIXIN
A constant for the property name jcr:isMixin (in expanded
form), declared in node type nt:nodeType. |
static java.lang.String |
JCR_LANGUAGE
A constant for the property name jcr:language (in expanded
form), declared in node types mix:language and nt:query. |
static java.lang.String |
JCR_LAST_MODIFIED
A constant for the property name jcr:lastModified (in
expanded form), declared in node type mix:lastModified. |
static java.lang.String |
JCR_LAST_MODIFIED_BY
A constant for the property name jcr:lastModifiedBy (in
expanded form), declared in node type mix:lastModified. |
static java.lang.String |
JCR_LIFECYCLE_POLICY
A constant for the property name jcr:lifecyclePolicy (in
expanded form), declared in node type mix:lifecycle. |
static java.lang.String |
JCR_LOCK_IS_DEEP
A constant for the property name jcr:lockIsDeep (in expanded
form), declared in node type mix:lockable. |
static java.lang.String |
JCR_LOCK_OWNER
A constant for the property name jcr:lockOwner (in expanded
form), declared in node type mix:lockable. |
static java.lang.String |
JCR_MANDATORY
A constant for the property name jcr:mandatory (in expanded
form), declared in node types nt:propertyDefinition and nt:childNodeDefinition. |
static java.lang.String |
JCR_MERGE_FAILED
A constant for the property name jcr:mergeFailed (in
expanded form), declared in node type mix:versionable. |
static java.lang.String |
JCR_MIMETYPE
A constant for the property name jcr:mimeType (in expanded
form), declared in node type mix:mimeType. |
static java.lang.String |
JCR_MIXIN_TYPES
A constant for the property name jcr:mixinTypes (in expanded
form), declared in node type nt:base. |
static java.lang.String |
JCR_MULTIPLE
A constant for the property name jcr:multiple (in expanded
form), declared in node type nt:propertyDefinition. |
static java.lang.String |
JCR_NAME
A constant for the property name jcr:name (in expanded
form), declared in node types nt:propertyDefinition and nt:childNodeDefinition. |
static java.lang.String |
JCR_NODE_TYPE_NAME
A constant for the property name jcr:nodeTypeName (in
expanded form), declared in node type nt:nodeType. |
static java.lang.String |
JCR_ON_PARENT_VERSION
A constant for the property name jcr:onParentVersion (in
expanded form), declared in node types nt:propertyDefinition and nt:childNodeDefinition. |
static java.lang.String |
JCR_PATH
A constant for the property name jcr:path (in expanded
form), declared in node type nt:address. |
static java.lang.String |
JCR_PORT
A constant for the property name jcr:port (in expanded
form), declared in node type nt:address. |
static java.lang.String |
JCR_PREDECESSORS
A constant for the property name jcr:predecessors (in
expanded form), declared in node types mix:versionable and nt:version. |
static java.lang.String |
JCR_PRIMARY_ITEM_NAME
A constant for the property name jcr:primaryItemName (in
expanded form), declared in node type nt:nodeType. |
static java.lang.String |
JCR_PRIMARY_TYPE
A constant for the property name jcr:primaryType (in
expanded form), declared in node type nt:base. |
static java.lang.String |
JCR_PROTECTED
A constant for the property name jcr:protected (in expanded
form), declared in node types nt:propertyDefinition and nt:childNodeDefinition. |
static java.lang.String |
JCR_PROTOCOL
A constant for the property name jcr:protocol (in expanded
form), declared in node type nt:address. |
static java.lang.String |
JCR_REPOSITORY
A constant for the property name jcr:repository (in expanded
form), declared in node type nt:address. |
static java.lang.String |
JCR_REQUIRED_PRIMARY_TYPES
A constant for the property name jcr:requiredPrimaryTypes
(in expanded form), declared in node type nt:childNodeDefinition. |
static java.lang.String |
JCR_REQUIRED_TYPE
A constant for the property name jcr:requiredType (in
expanded form), declared in node type nt:propertyDefinition. |
static java.lang.String |
JCR_ROOT
A constant for the property name jcr:root (in expanded
form), declared in node type nt:configuration. |
static java.lang.String |
JCR_SAME_NAME_SIBLINGS
A constant for the property name jcr:sameNameSiblings (in
expanded form), declared in node type nt:childNodeDefinition. |
static java.lang.String |
JCR_STATEMENT
A constant for the property name jcr:statement (in expanded
form), declared in node type nt:query. |
static java.lang.String |
JCR_SUCCESSORS
A constant for the property name jcr:successors (in expanded
form), declared in node type nt:versione. |
static java.lang.String |
JCR_SUPERTYPES
A constant for the property name jcr:supertypes (in expanded
form), declared in node type nt:nodeType. |
static java.lang.String |
JCR_TITLE
A constant for the property name jcr:title (in expanded
form), declared in node types mix:title and nt:activity. |
static java.lang.String |
JCR_UUID
A constant for the property name jcr:uuid (in expanded
form), declared in node type mix:referenceable. |
static java.lang.String |
JCR_VALUE_CONSTRAINTS
A constant for the property name jcr:valueConstraints (in
expanded form), declared in node type nt:propertyDefinition. |
static java.lang.String |
JCR_VERSION_HISTORY
A constant for the property name jcr:versionHistory (in
expanded form), declared in node type mix:versionable. |
static java.lang.String |
JCR_VERSIONABLE_UUID
A constant for the property name jcr:versionableUuid (in
expanded form), declared in node type nt:version. |
static java.lang.String |
JCR_WORKSPACE
A constant for the property name jcr:workspace (in expanded
form), declared in node type nt:address. |
| Method Summary | |
|---|---|
Binary |
getBinary()
Returns a Binary representation of the value of this
property. |
boolean |
getBoolean()
Returns a boolean representation of the value of this
property. |
java.util.Calendar |
getDate()
Returns a Calendar representation of the value of this
property. |
java.math.BigDecimal |
getDecimal()
Returns a BigDecimal representation of the value of this
property. |
PropertyDefinition |
getDefinition()
Returns the property definition that applies to this property. |
double |
getDouble()
Returns a double representation of the value of this
property. |
long |
getLength()
Returns the length of the value of this property. |
long[] |
getLengths()
Returns an array holding the lengths of the values of this (multi-value) property in bytes where each is individually calculated as described in getLength(). |
long |
getLong()
Returns a long representation of the value of this property. |
Node |
getNode()
If this property is of type REFERENCE,
WEAKREFERENCE or PATH (or convertible to one of
these types) this method returns the Node to which this
property refers. |
Property |
getProperty()
If this property is of type PATH (or convertible to this
type) this method returns the Property to which this
property refers. |
java.io.InputStream |
getStream()
Deprecated. As of JCR 2.0, getBinary() should be used instead. |
java.lang.String |
getString()
Returns a String representation of the value of this
property. |
int |
getType()
Returns the type of this Property. |
Value |
getValue()
Returns the value of this property as a Value object. |
Value[] |
getValues()
Returns an array of all the values of this property. |
boolean |
isMultiple()
Returns true if this property is multi-valued and
false if this property is single-valued. |
void |
setValue(java.math.BigDecimal value)
Sets the value of this property to value. |
void |
setValue(Binary value)
Sets the value of this property to value. |
void |
setValue(boolean value)
Sets the value of this property to value. |
void |
setValue(java.util.Calendar value)
Sets the value of this property to value. |
void |
setValue(double value)
Sets the value of this property to value. |
void |
setValue(java.io.InputStream value)
Deprecated. As of JCR 2.0, setValue(Binary) should be used
instead. |
void |
setValue(long value)
Sets the value of this property to value. |
void |
setValue(Node value)
Sets this REFERENCE or WEAKREFERNCE property to
refer to the specified node. |
void |
setValue(java.lang.String value)
Sets the value of this property to value. |
void |
setValue(java.lang.String[] values)
Sets the value of this property to the values array. |
void |
setValue(Value value)
Sets the value of this property to value. |
void |
setValue(Value[] values)
Sets the value of this property to the values array. |
| Methods inherited from interface javax.jcr.Item |
|---|
accept, getAncestor, getDepth, getName, getParent, getPath, getSession, isModified, isNew, isNode, isSame, refresh, remove, save |
| Field Detail |
|---|
static final java.lang.String JCR_PRIMARY_TYPE
jcr:primaryType (in
expanded form), declared in node type nt:base.
static final java.lang.String JCR_MIXIN_TYPES
jcr:mixinTypes (in expanded
form), declared in node type nt:base.
static final java.lang.String JCR_CONTENT
jcr:content (in expanded
form), declared in node type nt:linkedFile. Note, jcr:content is also the name of a
child node declared in nt:file.
static final java.lang.String JCR_DATA
jcr:data (in expanded
form), declared in node type nt:resource.
static final java.lang.String JCR_PROTOCOL
jcr:protocol (in expanded
form), declared in node type nt:address.
static final java.lang.String JCR_HOST
jcr:host (in expanded
form), declared in node type nt:address.
static final java.lang.String JCR_PORT
jcr:port (in expanded
form), declared in node type nt:address.
static final java.lang.String JCR_REPOSITORY
jcr:repository (in expanded
form), declared in node type nt:address.
static final java.lang.String JCR_WORKSPACE
jcr:workspace (in expanded
form), declared in node type nt:address.
static final java.lang.String JCR_PATH
jcr:path (in expanded
form), declared in node type nt:address.
static final java.lang.String JCR_ID
jcr:id (in expanded form),
declared in node type nt:address.
static final java.lang.String JCR_UUID
jcr:uuid (in expanded
form), declared in node type mix:referenceable.
static final java.lang.String JCR_TITLE
jcr:title (in expanded
form), declared in node types mix:title and nt:activity.
static final java.lang.String JCR_DESCRIPTION
jcr:description (in
expanded form), declared in node type mix:title.
static final java.lang.String JCR_CREATED
jcr:created (in expanded
form), declared in node types mix:created and nt:version.
static final java.lang.String JCR_CREATED_BY
jcr:createdBy (in expanded
form), declared in node type mix:created.
static final java.lang.String JCR_LAST_MODIFIED
jcr:lastModified (in
expanded form), declared in node type mix:lastModified.
static final java.lang.String JCR_LAST_MODIFIED_BY
jcr:lastModifiedBy (in
expanded form), declared in node type mix:lastModified.
static final java.lang.String JCR_LANGUAGE
jcr:language (in expanded
form), declared in node types mix:language and nt:query.
static final java.lang.String JCR_MIMETYPE
jcr:mimeType (in expanded
form), declared in node type mix:mimeType.
static final java.lang.String JCR_ENCODING
jcr:encoding (in expanded
form), declared in node type mix:mimeType.
static final java.lang.String JCR_NODE_TYPE_NAME
jcr:nodeTypeName (in
expanded form), declared in node type nt:nodeType.
static final java.lang.String JCR_SUPERTYPES
jcr:supertypes (in expanded
form), declared in node type nt:nodeType.
static final java.lang.String JCR_IS_ABSTRACT
jcr:isAbstract (in expanded
form), declared in node type nt:nodeType.
static final java.lang.String JCR_IS_MIXIN
jcr:isMixin (in expanded
form), declared in node type nt:nodeType.
static final java.lang.String JCR_HAS_ORDERABLE_CHILD_NODES
jcr:hasOrderableChildNodes
(in expanded form), declared in node type nt:nodeType.
static final java.lang.String JCR_PRIMARY_ITEM_NAME
jcr:primaryItemName (in
expanded form), declared in node type nt:nodeType.
static final java.lang.String JCR_NAME
jcr:name (in expanded
form), declared in node types nt:propertyDefinition and nt:childNodeDefinition.
static final java.lang.String JCR_AUTOCREATED
jcr:autoCreated (in
expanded form), declared in node types nt:propertyDefinition and nt:childNodeDefinition.
static final java.lang.String JCR_MANDATORY
jcr:mandatory (in expanded
form), declared in node types nt:propertyDefinition and nt:childNodeDefinition.
static final java.lang.String JCR_PROTECTED
jcr:protected (in expanded
form), declared in node types nt:propertyDefinition and nt:childNodeDefinition.
static final java.lang.String JCR_ON_PARENT_VERSION
jcr:onParentVersion (in
expanded form), declared in node types nt:propertyDefinition and nt:childNodeDefinition.
static final java.lang.String JCR_REQUIRED_TYPE
jcr:requiredType (in
expanded form), declared in node type nt:propertyDefinition.
static final java.lang.String JCR_VALUE_CONSTRAINTS
jcr:valueConstraints (in
expanded form), declared in node type nt:propertyDefinition.
static final java.lang.String JCR_DEFAULT_VALUES
jcr:defaultValues (in
expanded form), declared in node type nt:propertyDefinition.
static final java.lang.String JCR_MULTIPLE
jcr:multiple (in expanded
form), declared in node type nt:propertyDefinition.
static final java.lang.String JCR_REQUIRED_PRIMARY_TYPES
jcr:requiredPrimaryTypes
(in expanded form), declared in node type nt:childNodeDefinition.
static final java.lang.String JCR_DEFAULT_PRIMARY_TYPE
jcr:defaultPrimaryType (in
expanded form), declared in node type nt:childNodeDefinition.
static final java.lang.String JCR_SAME_NAME_SIBLINGS
jcr:sameNameSiblings (in
expanded form), declared in node type nt:childNodeDefinition.
static final java.lang.String JCR_LOCK_OWNER
jcr:lockOwner (in expanded
form), declared in node type mix:lockable.
static final java.lang.String JCR_LOCK_IS_DEEP
jcr:lockIsDeep (in expanded
form), declared in node type mix:lockable.
static final java.lang.String JCR_LIFECYCLE_POLICY
jcr:lifecyclePolicy (in
expanded form), declared in node type mix:lifecycle.
static final java.lang.String JCR_CURRENT_LIFECYCLE_STATE
jcr:currentLifecycleState
(in expanded form), declared in node type mix:lifecycle.
static final java.lang.String JCR_IS_CHECKED_OUT
jcr:isCheckedOut (in
expanded form), declared in node type mix:simpleVersionable.
static final java.lang.String JCR_FROZEN_PRIMARY_TYPE
jcr:frozenPrimaryType (in
expanded form), declared in node type nt:frozenNode.
static final java.lang.String JCR_FROZEN_MIXIN_TYPES
jcr:frozenMixinTypes (in
expanded form), declared in node type nt:frozenNode.
static final java.lang.String JCR_FROZEN_UUID
jcr:frozenUuid (in expanded
form), declared in node type nt:frozenNode.
static final java.lang.String JCR_VERSION_HISTORY
jcr:versionHistory (in
expanded form), declared in node type mix:versionable.
static final java.lang.String JCR_BASE_VERSION
jcr:baseVersion (in
expanded form), declared in node type mix:versionable.
static final java.lang.String JCR_PREDECESSORS
jcr:predecessors (in
expanded form), declared in node types mix:versionable and nt:version.
static final java.lang.String JCR_MERGE_FAILED
jcr:mergeFailed (in
expanded form), declared in node type mix:versionable.
static final java.lang.String JCR_ACTIVITY
jcr:activity (in expanded
form), declared in node types mix:versionable and nt:version.
static final java.lang.String JCR_CONFIGURATION
jcr:configuration (in
expanded form), declared in node type mix:versionable.
static final java.lang.String JCR_VERSIONABLE_UUID
jcr:versionableUuid (in
expanded form), declared in node type nt:version.
static final java.lang.String JCR_COPIED_FROM
jcr:copiedFrom (in expanded
form), declared in node type nt:version.
static final java.lang.String JCR_SUCCESSORS
jcr:successors (in expanded
form), declared in node type nt:versione.
static final java.lang.String JCR_CHILD_VERSION_HISTORY
jcr:childVersionHistory (in
expanded form), declared in node type nt:versionedChild.
static final java.lang.String JCR_ROOT
jcr:root (in expanded
form), declared in node type nt:configuration.
static final java.lang.String JCR_STATEMENT
jcr:statement (in expanded
form), declared in node type nt:query.
| Method Detail |
|---|
void setValue(Value value)
throws ValueFormatException,
VersionException,
LockException,
ConstraintViolationException,
RepositoryException
value. If this property's
property type is not constrained by the node type of its parent node,
then the property type is changed to that of the supplied
value. If the property type is constrained, then a
best-effort conversion is attempted.
This method is a session-write and therefore requires a save
to dispatch the change.
A ConstraintViolationException will be thrown either
immediately, on dispatch, or on persist, if the change would violate a
node type or implementation-specific constraint. Implementations may
differ on when this validation is performed.
A VersionException will be thrown either immediately, on
dispatch, or on persist, if this property belongs to a node that is
versionable and checked-in or is non-versionable but whose nearest
versionable ancestor is checked-in. Implementations may differ on when
this validation is performed.
A LockException will be thrown either immediately, on
dispatch, or on persist, if a lock prevents the setting of the value.
Implementations may differ on when this validation is performed.
value - The new value to set the property to.
ValueFormatException - if the type or format of the specified value
is incompatible with the type of this property.
VersionException - if this property belongs to a node that is
read-only due to a checked-in node and this implementation performs this
validation immediately.
LockException - if a lock prevents the setting of the value and
this implementation performs this validation immediately.
ConstraintViolationException - if the change would violate a
node-type or other constraint and this implementation performs this
validation immediately.
RepositoryException - if another error occurs.
void setValue(Value[] values)
throws ValueFormatException,
VersionException,
LockException,
ConstraintViolationException,
RepositoryException
values array. If this
property's property type is not constrained by the node type of its
parent node, then the property type may be changed. If the property type
is constrained, then a best-effort conversion is attempted, according to
an implemention-dependent definition of "best effort". The change will be
persisted (if valid) on save.
A ConstraintViolationException will be thrown either
immediately, on dispatch, or on persist, if the change would violate a
node type or implementation-specific constraint. Implementations may
differ on when this validation is performed.
A VersionException will be thrown either immediately, on
dispatch, or on persist, if this property belongs to a node that is
read-only due to a checked-in node. Implementations may differ on when
this validation is performed.
A LockException will be thrown either immediately, on
dispatch, or on persist, if a lock prevents the setting of the value.
Implementations may differ on when this validation is performed.
values - The new values to set the property to.
ValueFormatException - if the type or format of the specified
values is incompatible with the type of this property.
VersionException - if this property belongs to a node that is
read-only due to a checked-in node and this implementation performs this
validation immediately.
LockException - if a lock prevents the setting of the value and
this implementation performs this validation immediately.
ConstraintViolationException - if the change would violate a
node-type or other constraint and this implementation performs this
validation immediately.
RepositoryException - if another error occurs.
void setValue(java.lang.String value)
throws ValueFormatException,
VersionException,
LockException,
ConstraintViolationException,
RepositoryException
value. Same as
setValue(Value value) except that the value is
specified as a String.
value - The new value to set the property to.
ValueFormatException - if the type or format of the specified
values is incompatible with the type of this property.
VersionException - if this property belongs to a node that is
read-only due to a checked-in node and this implementation performs this
validation immediately.
LockException - if a lock prevents the setting of the value and
this implementation performs this validation immediately.
ConstraintViolationException - if the change would violate a
node-type or other constraint and this implementation performs this
validation immediately.
RepositoryException - if another error occurs.
void setValue(java.lang.String[] values)
throws ValueFormatException,
VersionException,
LockException,
ConstraintViolationException,
RepositoryException
values array. Same as
setValue(Value[] values) except that the values are
specified as a String[].
values - The new values to set the property to.
ValueFormatException - if the type or format of one or more of the
specified values is incompatible with the type of this property.
VersionException - if this property belongs to a node that is
read-only due to a checked-in node and this implementation performs this
validation immediately.
LockException - if a lock prevents the setting of the value and
this implementation performs this validation immediately.
ConstraintViolationException - if the change would violate a
node-type or other constraint and this implementation performs this
validation immediately.
RepositoryException - if another error occurs.
void setValue(java.io.InputStream value)
throws ValueFormatException,
VersionException,
LockException,
ConstraintViolationException,
RepositoryException
setValue(Binary) should be used
instead.
value. Same as
setValue(Value value) except that the value is
specified as an InputStream.
The passed stream is closed before this method returns either normally or because of an exception.
value - The new value to set the property to.
ValueFormatException - if the type or format of the specified value
is incompatible with the type of this property.
VersionException - if this property belongs to a node that is
read-only due to a checked-in node and this implementation performs this
validation immediately.
LockException - if a lock prevents the setting of the value and
this implementation performs this validation immediately.
ConstraintViolationException - if the change would violate a
node-type or other constraint and this implementation performs this
validation immediately.
RepositoryException - if another error occurs.
void setValue(Binary value)
throws ValueFormatException,
VersionException,
LockException,
ConstraintViolationException,
RepositoryException
value. Same as
setValue(Value value) except that the value is
specified as a Binary.
value - The new value to set the property to.
ValueFormatException - if the type or format of the specified value
is incompatible with the type of this property.
VersionException - if this property belongs to a node that is
read-only due to a checked-in node and this implementation performs this
validation immediately.
LockException - if a lock prevents the setting of the value and
this implementation performs this validation immediately.
ConstraintViolationException - if the change would violate a
node-type or other constraint and this implementation performs this
validation immediately.
RepositoryException - if another error occurs.
void setValue(long value)
throws ValueFormatException,
VersionException,
LockException,
ConstraintViolationException,
RepositoryException
value. Same as
setValue(Value value) except that the value is
specified as a long.
value - The new value to set the property to.
ValueFormatException - if the type or format of the specified value
is incompatible with the type of this property.
VersionException - if this property belongs to a node that is
read-only due to a checked-in node and this implementation performs this
validation immediately.
LockException - if a lock prevents the setting of the value and
this implementation performs this validation immediately.
ConstraintViolationException - if the change would violate a
node-type or other constraint and this implementation performs this
validation immediately.
RepositoryException - if another error occurs.
void setValue(double value)
throws ValueFormatException,
VersionException,
LockException,
ConstraintViolationException,
RepositoryException
value. Same as
setValue(Value value) except that the value is
specified as a double.
value - The new value to set the property to.
ValueFormatException - if the type or format of the specified value
is incompatible with the type of this property.
VersionException - if this property belongs to a node that is
read-only due to a checked-in node and this implementation performs this
validation immediately.
LockException - if a lock prevents the setting of the value and
this implementation performs this validation immediately.
ConstraintViolationException - if the change would violate a
node-type or other constraint and this implementation performs this
validation immediately.
RepositoryException - if another error occurs.
void setValue(java.math.BigDecimal value)
throws ValueFormatException,
VersionException,
LockException,
ConstraintViolationException,
RepositoryException
value. Same as
setValue(Value value) except that the value is
specified as a BigDecimal.
value - The new value to set the property to.
ValueFormatException - if the type or format of the specified value
is incompatible with the type of this property.
VersionException - if this property belongs to a node that is
read-only due to a checked-in node and this implementation performs this
validation immediately.
LockException - if a lock prevents the setting of the value and
this implementation performs this validation immediately.
ConstraintViolationException - if the change would violate a
node-type or other constraint and this implementation performs this
validation immediately.
RepositoryException - if another error occurs.
void setValue(java.util.Calendar value)
throws ValueFormatException,
VersionException,
LockException,
ConstraintViolationException,
RepositoryException
value. Same as
setValue(Value value) except that the value is
specified as a Calendar.
value - The new value to set the property to.
ValueFormatException - if the type or format of the specified value
is incompatible with the type of this property.
VersionException - if this property belongs to a node that is
read-only due to a checked-in node and this implementation performs this
validation immediately.
LockException - if a lock prevents the setting of the value and
this implementation performs this validation immediately.
ConstraintViolationException - if the change would violate a
node-type or other constraint and this implementation performs this
validation immediately.
RepositoryException - if another error occurs.
void setValue(boolean value)
throws ValueFormatException,
VersionException,
LockException,
ConstraintViolationException,
RepositoryException
value. Same as
setValue(Value value) except that the value is
specified as a boolean.
value - The new value to set the property to.
ValueFormatException - if the type or format of the specified value
is incompatible with the type of this property.
VersionException - if this property belongs to a node that is
read-only due to a checked-in node and this implementation performs this
validation immediately.
LockException - if a lock prevents the setting of the value and
this implementation performs this validation immediately.
ConstraintViolationException - if the change would violate a
node-type or other constraint and this implementation performs this
validation immediately.
RepositoryException - if another error occurs.
void setValue(Node value)
throws ValueFormatException,
VersionException,
LockException,
ConstraintViolationException,
RepositoryException
REFERENCE or WEAKREFERNCE property to
refer to the specified node.
value - The node to which this property will refer.
ValueFormatException - if the type or format of the specified value
is incompatible with the type of this property the specified node is not
referenceable.
VersionException - if this property belongs to a node that is
read-only due to a checked-in node and this implementation performs this
validation immediately.
LockException - if a lock prevents the setting of the value and
this implementation performs this validation immediately.
ConstraintViolationException - if the change would violate a
node-type or other constraint and this implementation performs this
validation immediately.
RepositoryException - if another error occurs.
Value getValue()
throws ValueFormatException,
RepositoryException
Value object.
The object returned is a copy of the stored value and is immutable.
Value.
ValueFormatException - if the property is multi-valued.
RepositoryException - if another error occurs.
Value[] getValues()
throws ValueFormatException,
RepositoryException
Value array.
ValueFormatException - if the property is single-valued.
RepositoryException - if another error occurs.
java.lang.String getString()
throws ValueFormatException,
RepositoryException
String representation of the value of this
property. A shortcut for Property.getValue().getString().
ValueFormatException - if conversion to a String is
not possible or if the property is multi-valued.
RepositoryException - if another error occurs.Value
java.io.InputStream getStream()
throws ValueFormatException,
RepositoryException
getBinary() should be used instead.
InputStream representation of the value of this
property. A shortcut for Property.getValue().getStream().
It is the responsibility of the caller to close the returned InputStream.
ValueFormatException - if the property is multi-valued.
RepositoryException - if another error occursValue
Binary getBinary()
throws ValueFormatException,
RepositoryException
Binary representation of the value of this
property. A shortcut for Property.getValue().getBinary().
Binary representation of the value of this
property.
ValueFormatException - if the property is multi-valued.
RepositoryException - if another error occurs.Value,
Binary
long getLong()
throws ValueFormatException,
RepositoryException
long representation of the value of this property.
A shortcut for Property.getValue().getLong().
long representation of the value of this
property.
ValueFormatException - if conversion to a long is not
possible or if the property is multi-valued.
RepositoryException - if another error occurs.Value
double getDouble()
throws ValueFormatException,
RepositoryException
double representation of the value of this
property. A shortcut for Property.getValue().getDouble().
double representation of the value of this
property.
ValueFormatException - if conversion to a double is
not possible or if the property is multi-valued.
RepositoryException - if another error occurs.Value
java.math.BigDecimal getDecimal()
throws ValueFormatException,
RepositoryException
BigDecimal representation of the value of this
property. A shortcut for Property.getValue().getDecimal().
BigDecimal representation of the value of this
property.
ValueFormatException - if conversion to a BigDecimal
is not possible or if the property is multi-valued.
RepositoryException - if another error occursValue
java.util.Calendar getDate()
throws ValueFormatException,
RepositoryException
Calendar representation of the value of this
property. A shortcut for Property.getValue().getDate().
Calendar representation of the value of this
property.
ValueFormatException - if conversion to a string is not possible or
if the property is multi-valued.
RepositoryException - if another error occurs.Value
boolean getBoolean()
throws ValueFormatException,
RepositoryException
boolean representation of the value of this
property. A shortcut for Property.getValue().getBoolean().
boolean representation of the value of this
property.
ValueFormatException - if conversion to a boolean is
not possible or if the property is multi-valued.
RepositoryException - if another error occurs.Value
Node getNode()
throws ItemNotFoundException,
ValueFormatException,
RepositoryException
REFERENCE,
WEAKREFERENCE or PATH (or convertible to one of
these types) this method returns the Node to which this
property refers.
If this property is of type PATH and it contains a relative
path, it is interpreted relative to the parent node of this property. For
example "." refers to the parent node itself,
".." to the parent of the parent node and "foo"
to a sibling node of this property.
ValueFormatException - if this property cannot be converted to a
referring type (REFERENCE, WEAKREFERENCE or
PATH), if the property is multi-valued or if this property
is a referring type but is currently part of the frozen state of a
version in version storage.
ItemNotFoundException - If this property is of type
PATH or WEAKREFERENCE and no target node
accessible by the current Session exists in this workspace.
Note that this applies even if the property is a PATHS and a
property exists at the specified location. To dereference to a
target property (as opposed to a target node), the method
Property.getProperty is used.
RepositoryException - if another error occurs.
Property getProperty()
throws ItemNotFoundException,
ValueFormatException,
RepositoryException
PATH (or convertible to this
type) this method returns the Property to which this
property refers.
If this property contains a relative path, it is interpreted relative to
the parent node of this property. Therefore, when resolving such a
relative path, the segment "." refers to
the parent node itself, ".." to the parent of the parent
node and "foo" to a sibling property of this property or
this property itself.
For example, if this property is located at
/a/b/c and it has a value of "../d" then this
method will return the property at /a/d if such exists.
If this property is multi-valued, this method throws a
ValueFormatException.
If this property cannot be converted to a PATH then a
ValueFormatException is thrown.
If this property is currently part of the frozen state of a version in
version storage, this method will throw a ValueFormatException.
ValueFormatException - if this property cannot be converted to a
PATH, if the property is multi-valued or if this property is
a referring type but is currently part of the frozen state of a version
in version storage.
ItemNotFoundException - If no property accessible by the current
Session exists in this workspace at the specified path. Note
that this applies even if a node exists at the specified location.
To dereference to a target node, the method Property.getNode
is used.
RepositoryException - if another error occurs.
long getLength()
throws ValueFormatException,
RepositoryException
For a BINARY property, getLength returns the
number of bytes. For other property types, getLength returns
the same value that would be returned by calling String.length() on the value when it has been converted to a
STRING according to standard JCR property type conversion.
Returns -1 if the implementation cannot determine the length.
long.
ValueFormatException - if this property is multi-valued.
RepositoryException - if another error occurs.
long[] getLengths()
throws ValueFormatException,
RepositoryException
getLength().
Returns a -1 in the appropriate position if the
implementation cannot determine the length of a value.
ValueFormatException - if this property is single-valued.
RepositoryException - if another error occurs.
PropertyDefinition getDefinition()
throws RepositoryException
PropertyDefinition object.
RepositoryException - if an error occurs.NodeType.getPropertyDefinitions()
int getType()
throws RepositoryException
Property. One of: PropertyType.STRINGPropertyType.BINARYPropertyType.DATEPropertyType.DOUBLEPropertyType.LONGPropertyType.BOOLEANPropertyType.NAMEPropertyType.PATHPropertyType.REFERENCEPropertyType.WEAKREFERENCEPropertyType.URIp, the type returned by p.getType() will differ
from the type returned by p.getDefinition.getRequiredType()
only in the case where the latter returns UNDEFINED. The
type of a property instance is never UNDEFINED (it must
always have some actual type).
RepositoryException - if an error occurs
boolean isMultiple()
throws RepositoryException
true if this property is multi-valued and
false if this property is single-valued.
true if this property is multi-valued;
false otherwise.
RepositoryException - if an error occurs.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||