|
Oracle Beehive Java Content Repository Java API Reference Release 1 (1.5) E14840-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface OracleProperty
A OracleProperty
object represents the smallest granularity of content storage. A property must have one and only one parent node. A property does not have children. When we say that node A "has" property B it means that B is a child of A.
A property consists of a name and a value. See
. Following piece of code shows the operations done on OraclePropertyOracleValue
// Assume we have node /entName/orgName/wspName/Documents/myFolder and
// property /entName/orgName/wspName/Documents/myFolder/beehive:createdon
// Assume that mySession is the Session obtained after javax.jcr.Repository.login()
Node myNode = (Node) mySession.getItem("/entName/orgName/wspName/Documents/myFolder");
Property createdOnProperty = myNode.getProperty(BEEHIVE_CREATEDON
);
Field Summary | |
---|---|
static java.lang.String |
BEEHIVE_CONTENT The beehive:content represents Content Services - content property of document. |
static java.lang.String |
BEEHIVE_CONTENTENCODING The beehive:contentencoding represents Content Services - contentencoding property. |
static java.lang.String |
BEEHIVE_CREATEDON The beehive:createdon represents Content Services createdOn property. |
static java.lang.String |
BEEHIVE_CREATOR The beehive:creator represents Content Services - creator property. |
static java.lang.String |
BEEHIVE_DELETEDBY The beehive:deletedBy represents Content Services - deletedBy property. |
static java.lang.String |
BEEHIVE_DELETEDDATE The beehive:deletedDate represents Content Services - deletedDate property. |
static java.lang.String |
BEEHIVE_DELETEDENTITYSIZE The beehive:deletedEntitySize represents Content Services - deletedEntitySize property. |
static java.lang.String |
BEEHIVE_DELETEDENTITYUUID The beehive:deletedEntityUuid represents Content Services - deletedEntityUuid property. |
static java.lang.String |
BEEHIVE_LENGTH The beehive:length represents Content Services - length property. |
static java.lang.String |
BEEHIVE_MEDIATYPE The beehive:mediatype represents Content Services - mediatype property. |
static java.lang.String |
BEEHIVE_MODIFIEDBY The beehive:modifiedby represents Content Services - modifiedby property. |
static java.lang.String |
BEEHIVE_MODIFIEDON The beehive:modifiedon represents Content Services - modifiedon property. |
static java.lang.String |
BEEHIVE_NAME The beehive:name represents Content Services name property. |
static java.lang.String |
BEEHIVE_ORIGINALNAME The beehive:originalName represents Content Services - originalName property. |
static java.lang.String |
BEEHIVE_ORIGINALPARENTUUID The beehive:originalParentUuid represents Content Services - originalParentUuid property. |
static java.lang.String |
BEEHIVE_PATH The beehive:path represents Content Services - path property. |
static java.lang.String |
BEEHIVE_URL The beehive:url represents Content Services - url property. |
static java.lang.String |
JCR_CREATED The jcr:created represents created property. |
static java.lang.String |
JCR_FROZENMIXINTYPES The jcr:frozenMixinTypes represents frozenMixinTypes property. |
static java.lang.String |
JCR_FROZENPRIMARYTYPE The jcr:frozenPrimaryType represents frozenPrimaryType property. |
static java.lang.String |
JCR_FROZENUUID The jcr:frozenUuid represents frozenUuid property. |
static java.lang.String |
JCR_PREDECESSORS The jcr:predecessors represents predecessors property. |
static java.lang.String |
JCR_SUCCESSORS The jcr:successors represents successors property. |
static java.lang.String |
JCR_UUID The jcr:uuid represents Content Services - CollabId property. |
static java.lang.String |
JCR_VERSIONABLEUUID The jcr:versionableUuid represents versionableUuid property. |
Method Summary | |
---|---|
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. |
javax.jcr.nodetype.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() throws Exception since multivalue properties are not supported. |
long |
getLong() Returns a long representation of the value of this property. |
javax.jcr.Node |
getNode() If this property is of type REFERENCE this method returns the node to which this property refers. |
java.io.InputStream |
getStream() Returns an InputStream representation of the value of this property. |
java.lang.String |
getString() Returns a String representation of the value of this property. |
int |
getType() Returns the type of this Property . |
javax.jcr.Value |
getValue() Returns the value of this property as a generic Value object. |
javax.jcr.Value[] |
getValues() Returns an array of all the values of this property. |
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) Sets the value of this property to value . |
void |
setValue(long value) Sets the value of this property to value . |
void |
setValue(javax.jcr.Node value) This operation throws Exception since setting Reference property is not supported. |
void |
setValue(java.lang.String value) Sets the value of this property to value . |
void |
setValue(java.lang.String[] values) This operation throws Exception since multi-value properties are not supported. |
void |
setValue(javax.jcr.Value value) Sets the value of this property to value . |
void |
setValue(javax.jcr.Value[] values) This operation throws Exception since multi-value properties are not supported. |
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 BEEHIVE_CREATEDON
static final java.lang.String BEEHIVE_NAME
static final java.lang.String BEEHIVE_MODIFIEDBY
static final java.lang.String BEEHIVE_MODIFIEDON
static final java.lang.String BEEHIVE_CREATOR
static final java.lang.String BEEHIVE_PATH
static final java.lang.String BEEHIVE_CONTENT
static final java.lang.String BEEHIVE_MEDIATYPE
static final java.lang.String BEEHIVE_CONTENTENCODING
static final java.lang.String BEEHIVE_LENGTH
static final java.lang.String BEEHIVE_URL
static final java.lang.String BEEHIVE_DELETEDBY
static final java.lang.String BEEHIVE_DELETEDENTITYUUID
static final java.lang.String BEEHIVE_DELETEDENTITYSIZE
static final java.lang.String BEEHIVE_DELETEDDATE
static final java.lang.String BEEHIVE_ORIGINALNAME
static final java.lang.String BEEHIVE_ORIGINALPARENTUUID
static final java.lang.String JCR_FROZENPRIMARYTYPE
static final java.lang.String JCR_FROZENMIXINTYPES
static final java.lang.String JCR_FROZENUUID
static final java.lang.String JCR_CREATED
static final java.lang.String JCR_PREDECESSORS
static final java.lang.String JCR_SUCCESSORS
static final java.lang.String JCR_VERSIONABLEUUID
static final java.lang.String JCR_UUID
Method Detail |
---|
void setValue(javax.jcr.Value value) throws javax.jcr.ValueFormatException, javax.jcr.version.VersionException, javax.jcr.lock.LockException, javax.jcr.nodetype.ConstraintViolationException, javax.jcr.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. If conversion fails, a ValueFormatException
is thrown immediately (not on save
). The change will be persisted (if valid) on save
<p/> A ConstraintViolationException
will be thrown immediately if the change would violate a node type constraint. <p/> A VersionException
will be thrown immediately if this property belongs to a node that is versionable and checked-in <p/> A LockException
will be thrown either immediately or on save
, if a lock prevents the setting of the value. Implementations may differ on when this validation is performed.setValue
in interface javax.jcr.Property
value
- The new value to set the property to.javax.jcr.ValueFormatException
- if the type or format of the specified value is incompatible with the type of this property.javax.jcr.version.VersionException
- if this property belongs to a node that is versionable and checked-in this implementation performs this validation immediately instead of waiting until save
.javax.jcr.lock.LockException
- if a lock prevents the setting of the value and this implementation performs this validation immediately instead of waiting until save
.javax.jcr.nodetype.ConstraintViolationException
- if the change would violate a node-type constraint and this implementation performs this validation immediately instead of waiting until save
.javax.jcr.RepositoryException
- if another error occurs.void setValue(javax.jcr.Value[] values) throws javax.jcr.ValueFormatException, javax.jcr.version.VersionException, javax.jcr.lock.LockException, javax.jcr.nodetype.ConstraintViolationException, javax.jcr.RepositoryException
setValue
in interface javax.jcr.Property
RepositoryException.
javax.jcr.ValueFormatException
javax.jcr.version.VersionException
javax.jcr.lock.LockException
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.RepositoryException
void setValue(java.lang.String value) throws javax.jcr.ValueFormatException, javax.jcr.version.VersionException, javax.jcr.lock.LockException, javax.jcr.nodetype.ConstraintViolationException, javax.jcr.RepositoryException
value
. Same as setValue(Value value)
except that the value is specified as a String
.setValue
in interface javax.jcr.Property
value
- The new value to set the property to.javax.jcr.ValueFormatException
- if the type or format of the specified value is incompatible with the type of this property.javax.jcr.version.VersionException
- if this property belongs to a node that is versionable and checked-in this implementation performs this validation immediately instead of waiting until save
.javax.jcr.lock.LockException
- if a lock prevents the setting of the value and this implementation performs this validation immediately instead of waiting until save
.javax.jcr.nodetype.ConstraintViolationException
- if the change would violate a node-type constraint and this implementation performs this validation immediately instead of waiting until save
.javax.jcr.RepositoryException
- if another error occurs.void setValue(java.lang.String[] values) throws javax.jcr.ValueFormatException, javax.jcr.version.VersionException, javax.jcr.lock.LockException, javax.jcr.nodetype.ConstraintViolationException, javax.jcr.RepositoryException
setValue
in interface javax.jcr.Property
RepositoryException.
javax.jcr.ValueFormatException
javax.jcr.version.VersionException
javax.jcr.lock.LockException
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.RepositoryException
void setValue(java.io.InputStream value) throws javax.jcr.ValueFormatException, javax.jcr.version.VersionException, javax.jcr.lock.LockException, javax.jcr.nodetype.ConstraintViolationException, javax.jcr.RepositoryException
value
. Same as setValue(Value value)
except that the value is specified as a InputStream
.setValue
in interface javax.jcr.Property
value
- The new value to set the property to.javax.jcr.ValueFormatException
- if the type or format of the specified value is incompatible with the type of this property.javax.jcr.version.VersionException
- if this property belongs to a node that is versionable and checked-in this implementation performs this validation immediately instead of waiting until save
.javax.jcr.lock.LockException
- if a lock prevents the setting of the value and this implementation performs this validation immediately instead of waiting until save
.javax.jcr.nodetype.ConstraintViolationException
- if the change would violate a node-type constraint and this implementation performs this validation immediately instead of waiting until save
.javax.jcr.RepositoryException
- if another error occurs.void setValue(long value) throws javax.jcr.ValueFormatException, javax.jcr.version.VersionException, javax.jcr.lock.LockException, javax.jcr.nodetype.ConstraintViolationException, javax.jcr.RepositoryException
value
. Same as setValue(Value value)
except that the value is specified as a long
.setValue
in interface javax.jcr.Property
value
- The new value to set the property to.javax.jcr.ValueFormatException
- if the type or format of the specified value is incompatible with the type of this property.javax.jcr.version.VersionException
- if this property belongs to a node that is versionable and checked-in this implementation performs this validation immediately instead of waiting until save
.javax.jcr.lock.LockException
- if a lock prevents the setting of the value and this implementation performs this validation immediately instead of waiting until save
.javax.jcr.nodetype.ConstraintViolationException
- if the change would violate a node-type constraint and this implementation performs this validation immediately instead of waiting until save
.javax.jcr.RepositoryException
- if another error occurs.void setValue(double value) throws javax.jcr.ValueFormatException, javax.jcr.version.VersionException, javax.jcr.lock.LockException, javax.jcr.nodetype.ConstraintViolationException, javax.jcr.RepositoryException
value
. Same as setValue(Value value)
except that the value is specified as a double
.setValue
in interface javax.jcr.Property
value
- The new value to set the property to.javax.jcr.ValueFormatException
- if the type or format of the specified value is incompatible with the type of this property.javax.jcr.version.VersionException
- if this property belongs to a node that is versionable and checked-in this implementation performs this validation immediately instead of waiting until save
.javax.jcr.lock.LockException
- if a lock prevents the setting of the value and this implementation performs this validation immediately instead of waiting until save
.javax.jcr.nodetype.ConstraintViolationException
- if the change would violate a node-type constraint and this implementation performs this validation immediately instead of waiting until save
.javax.jcr.RepositoryException
- if another error occurs.void setValue(java.util.Calendar value) throws javax.jcr.ValueFormatException, javax.jcr.version.VersionException, javax.jcr.lock.LockException, javax.jcr.nodetype.ConstraintViolationException, javax.jcr.RepositoryException
value
. Same as setValue(Value value)
except that the value is specified as a Calendar
.setValue
in interface javax.jcr.Property
value
- The new value to set the property to.javax.jcr.ValueFormatException
- if the type or format of the specified value is incompatible with the type of this property.javax.jcr.version.VersionException
- if this property belongs to a node that is versionable and checked-in this implementation performs this validation immediately instead of waiting until save
.javax.jcr.lock.LockException
- if a lock prevents the setting of the value and this implementation performs this validation immediately instead of waiting until save
.javax.jcr.nodetype.ConstraintViolationException
- if the change would violate a node-type constraint and this implementation performs this validation immediately instead of waiting until save
.javax.jcr.RepositoryException
- if another error occurs.void setValue(boolean value) throws javax.jcr.ValueFormatException, javax.jcr.version.VersionException, javax.jcr.lock.LockException, javax.jcr.nodetype.ConstraintViolationException, javax.jcr.RepositoryException
value
. Same as setValue(Value value)
except that the value is specified as a boolean
.setValue
in interface javax.jcr.Property
value
- The new value to set the property to.javax.jcr.ValueFormatException
- if the type or format of the specified value is incompatible with the type of this property.javax.jcr.version.VersionException
- if this property belongs to a node that is versionable and checked-in this implementation performs this validation immediately instead of waiting until save
.javax.jcr.lock.LockException
- if a lock prevents the setting of the value and this implementation performs this validation immediately instead of waiting until save
.javax.jcr.nodetype.ConstraintViolationException
- if the change would violate a node-type constraint and this implementation performs this validation immediately instead of waiting until save
.javax.jcr.RepositoryException
- if another error occurs.void setValue(javax.jcr.Node value) throws javax.jcr.ValueFormatException, javax.jcr.version.VersionException, javax.jcr.lock.LockException, javax.jcr.nodetype.ConstraintViolationException, javax.jcr.RepositoryException
setValue
in interface javax.jcr.Property
RepositoryException.
javax.jcr.ValueFormatException
javax.jcr.version.VersionException
javax.jcr.lock.LockException
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.RepositoryException
javax.jcr.Value getValue() throws javax.jcr.ValueFormatException, javax.jcr.RepositoryException
Value
object.
If the property is multi-valued, this method throws a ValueFormatException
. <p/> The object returned is a copy of the stored value and is immutable.
getValue
in interface javax.jcr.Property
javax.jcr.ValueFormatException
- if the property is multi-valued.javax.jcr.RepositoryException
- if another error occurs.javax.jcr.Value[] getValues() throws javax.jcr.ValueFormatException, javax.jcr.RepositoryException
ValueFormatException
. The array returned is a copy of the stored values, so changes to it are not reflected in internal storage.getValues
in interface javax.jcr.Property
Value
arrayjavax.jcr.ValueFormatException
- if the property is single-valued.javax.jcr.RepositoryException
- if another error occurs.java.lang.String getString() throws javax.jcr.ValueFormatException, javax.jcr.RepositoryException
String
representation of the value of this property. A shortcut for Property.getValue().getString()
. See Value
. If this property is multi-valued, this method throws a ValueFormatException
.
If the value of this property cannot be converted to a string, a ValueFormatException
is thrown.
A RepositoryException
is thrown if another error occurs.
getString
in interface javax.jcr.Property
javax.jcr.ValueFormatException
- if conversion to a string is not possiblejavax.jcr.RepositoryException
- if another error occurs.java.io.InputStream getStream() throws javax.jcr.ValueFormatException, javax.jcr.RepositoryException
InputStream
representation of the value of this property. A shortcut for Property.getValue().getStream()
. See Value
.
A RepositoryException
is thrown if another error occurs.
getStream
in interface javax.jcr.Property
javax.jcr.ValueFormatException
- if the property is multi-valued.javax.jcr.RepositoryException
- if another error occurslong getLong() throws javax.jcr.ValueFormatException, javax.jcr.RepositoryException
long
representation of the value of this property. A shortcut for Property.getValue().getLong()
. See Value
.
If the value of this property cannot be converted to a long
, a ValueFormatException
is thrown.
A RepositoryException
is thrown if another error occurs.
getLong
in interface javax.jcr.Property
long
representation of the value of this property.javax.jcr.ValueFormatException
- if conversion to a string is not possible.javax.jcr.RepositoryException
- if another error occursdouble getDouble() throws javax.jcr.ValueFormatException, javax.jcr.RepositoryException
double
representation of the value of this property. A shortcut for Property.getValue().getDouble()
. See Value
. If the value of this property cannot be converted to a double, a ValueFormatException
is thrown.
A RepositoryException
is thrown if another error occurs.
getDouble
in interface javax.jcr.Property
javax.jcr.ValueFormatException
- if conversion to a string is not possiblejavax.jcr.RepositoryException
- if another error occursjava.util.Calendar getDate() throws javax.jcr.ValueFormatException, javax.jcr.RepositoryException
Calendar
representation of the value of this property. A shortcut for Property.getValue().getDate()
. See Value
. <p/> The object returned is a copy of the stored value, so changes to it are not reflected in internal storage. <p/> If the value of this property cannot be converted to a date, a ValueFormatException
is thrown.
A RepositoryException
is thrown if another error occurs.
getDate
in interface javax.jcr.Property
Calendar
object) representation of the value of this property.javax.jcr.ValueFormatException
- if conversion to a string is not possiblejavax.jcr.RepositoryException
- if another error occursboolean getBoolean() throws javax.jcr.ValueFormatException, javax.jcr.RepositoryException
boolean
representation of the value of this property. A shortcut for Property.getValue().getBoolean()
. See Value
.
If the value of this property cannot be converted to a boolean, a ValueFormatException
is thrown.
A RepositoryException
is thrown if another error occurs.
getBoolean
in interface javax.jcr.Property
javax.jcr.ValueFormatException
- if conversion to a string is not possiblejavax.jcr.RepositoryException
- if another error occursjavax.jcr.Node getNode() throws javax.jcr.ValueFormatException, javax.jcr.RepositoryException
REFERENCE
this method returns the node to which this property refers. If this property is not of type reference, then a ValueFormatException
is thrown.
If this property is a REFERENCE property but is currently part of the frozen state of a version in version storage, this method will throw a ValueFormatException
.
A RepositoryException
is thrown if another error occurs.
getNode
in interface javax.jcr.Property
javax.jcr.ValueFormatException
- if this property cannot be converted to a reference, if the property is multi-valued or if this property is a REFERENCE property but is currently part of the frozen state of a version in version storage.javax.jcr.RepositoryException
- if another error occurslong getLength() throws javax.jcr.ValueFormatException, javax.jcr.RepositoryException
Returns the length in bytes if the value is a PropertyType.BINARY
, otherwise it returns the number of characters needed to display the value in its string form. <p/> Returns -1 if the implementation cannot determine the length. <p/>
getLength
in interface javax.jcr.Property
long
.javax.jcr.RepositoryException
- if another error occurs.javax.jcr.ValueFormatException
long[] getLengths() throws javax.jcr.ValueFormatException, javax.jcr.RepositoryException
getLengths
in interface javax.jcr.Property
ValueFormatException.
RepositoryException.
javax.jcr.ValueFormatException
javax.jcr.RepositoryException
javax.jcr.nodetype.PropertyDefinition getDefinition() throws javax.jcr.RepositoryException
getDefinition
in interface javax.jcr.Property
PropertyDefinition
object.javax.jcr.RepositoryException
- if an error occurs.NodeType.getPropertyDefinitions()
int getType() throws javax.jcr.RepositoryException
Property
. One of:
PropertyType.STRING
PropertyType.BINARY
PropertyType.DATE
PropertyType.DOUBLE
PropertyType.LONG
PropertyType.BOOLEAN
PropertyType.NAME
PropertyType.PATH
PropertyType.REFERENCE
p
, the type returned by p.getType()
may 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).getType
in interface javax.jcr.Property
javax.jcr.RepositoryException
- if an error occurs
|
Oracle Beehive Java Content Repository Java API Reference Release 1 (1.5) E14840-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |