edu.mit.stellar.api.ecm
Interface NodeM

All Superinterfaces:
Node

public interface NodeM
extends Node

NodeM Interface for accessing writable properties of a node in the ECM. An object implementing this interface is mutable.

Version:
$Revision: 29988 $, $Date: 2008-02-09 22:10:42 -0500 (Sat, 09 Feb 2008) $
Author:
MIT Stellar team

Method Summary
 Node addNode(java.lang.String relPath)
          From JCR Node interface, needed.
 boolean isModified()
          From JCR Item interface, probably useful.
 boolean isNew()
          From JCR Item interface, probably useful.
 void orderBefore(java.lang.String srcChildRelPath, java.lang.String destChildRelPath)
          From JCR Node interface, needed.
 void refresh(boolean keepChanges)
          From JCR Item interface, probably useful.
 void remove()
          From JCR Item interface, probably useful.
 void save()
          From JCR Item interface, probably useful.
 void setDescription(java.lang.String description)
          cm:description mandatory property with direct accessor.
 javax.jcr.Property setProperty(java.lang.String name, boolean value)
          From JCR Node interface, needed.
 javax.jcr.Property setProperty(java.lang.String name, java.util.Calendar value)
          From JCR Node interface, needed.
 javax.jcr.Property setProperty(java.lang.String name, double value)
          From JCR Node interface, needed.
 javax.jcr.Property setProperty(java.lang.String name, java.io.InputStream value)
          From JCR Node interface, needed.
 javax.jcr.Property setProperty(java.lang.String name, long value)
          From JCR Node interface, needed.
 javax.jcr.Property setProperty(java.lang.String name, Node value)
          From JCR Node interface, needed.
 javax.jcr.Property setProperty(java.lang.String name, java.lang.String value)
          From JCR Node interface, needed.
 javax.jcr.Property setProperty(java.lang.String name, java.lang.String[] values)
          From JCR Node interface, needed.
 javax.jcr.Property setProperty(java.lang.String name, java.lang.String[] values, int type)
          Sets the specified property to the specified array of values and to the specified type.
 javax.jcr.Property setProperty(java.lang.String name, java.lang.String value, int type)
          From JCR Node interface, needed.
 javax.jcr.Property setProperty(java.lang.String name, javax.jcr.Value value)
          From JCR Node interface, needed.
 javax.jcr.Property setProperty(java.lang.String name, javax.jcr.Value[] values)
          From JCR Node interface, needed.
 javax.jcr.Property setProperty(java.lang.String name, javax.jcr.Value[] values, int type)
          From JCR Node interface, needed.
 javax.jcr.Property setProperty(java.lang.String name, javax.jcr.Value value, int type)
          From JCR Node interface, needed.
 void setTitle(java.lang.String title)
          cm:title mandatory property with direct accessor.
 
Methods inherited from interface edu.mit.stellar.api.ecm.Node
getAccessed, getAncestor, getCorrespondingNodePath, getCreated, getCreator, getDepth, getDescription, getIndex, getModified, getModifier, getName, getNode, getNodes, getNodes, getParent, getPath, getPrimaryItem, getProperties, getProperties, getProperty, getTitle, getUUID, hasNode, hasNodes, hasProperties, hasProperty, isSame
 

Method Detail

isModified

boolean isModified()
From JCR Item interface, probably useful. Returns true if this Item has been saved but has subsequently been modified through the current session and therefore the state of this item as recorded in the session differs from the state of this item as saved.


isNew

boolean isNew()
From JCR Item interface, probably useful. Returns true if this is a new item, meaning that it exists only in transient storage on the Session and has not yet been saved.


refresh

void refresh(boolean keepChanges)
From JCR Item interface, probably useful. If keepChanges is false, this method discards all pending changes currently recorded in this Session that apply to this Item or any of its descendants (that is, the subtree rooted at this Item)and returns all items to reflect the current saved state.


remove

void remove()
From JCR Item interface, probably useful. Removes this node (and its subtree).


save

void save()
From JCR Item interface, probably useful. Validates all pending changes currently recorded in this Session that apply to this Node or any of its descendants (that is, the subtree rooted at this Node).


addNode

Node addNode(java.lang.String relPath)
             throws java.lang.Exception
From JCR Node interface, needed. Creates a new node at relPath. The new node will only be persisted on save() if it meets the constraint criteria of the parent node's node type.

In order to save a newly added node, save must be called either on the Session, or on the new node's parent or higher-order ancestor (grandparent, etc.). An attempt to call save only on the newly added node will throw a RepositoryException.

In the context of this method the relPath provided must not have an index on its final element. If it does then a RepositoryException is thrown.

Strictly speaking, the parameter is actually a relative path to the parent node of the node to be added, appended with the name desired for the new node (if the a node is being added directly below this node then only the name need be specified). It does not specify a position within the child node ordering. If ordering is supported by the node type of the parent node then the new node is appended to the end of the child node list.

Since this signature does not allow explicit node type assignment, the new node's primary node type will be determined (either immediately or on save, depending on the implementation) by the child node definitions in the node types of its parent.

An ItemExistsException will be thrown either immediately (by this method), or on save, if an item at the specified path already exists and same-name siblings are not allowed. Implementations may differ on when this validation is performed.

A PathNotFoundException will be thrown either immediately, or on save, if the specified path implies intermediary nodes that do not exist. Implementations may differ on when this validation is performed.

A ConstraintViolationException will be thrown either immediately or on save if adding the node would violate a node type or implementation-specific constraint or if an attempt is made to add a node as the child of a property. Implementations may differ on when this validation is performed.

A VersionException will be thrown either immediately or on save, if the node to which the new child is being added is versionable and checked-in or is non-versionable but its nearest versionable ancestor is checked-in. Implementations may differ on when this validation is performed.

A LockException will be thrown either immediately (by this method), or on save, if a lock prevents the addition of the node. Implementations may differ on when this validation is performed.

Parameters:
relPath - The path of the new node to be created.
Returns:
The node that was added.
Throws:
ItemExistsException - if an item at the specified path already exists, same-name siblings are not allowed and this implementation performs this validation immediately instead of waiting until save.
PathNotFoundException - if the specified path implies intermediary Nodes that do not exist or the last element of relPath has an index, and this implementation performs this validation immediately instead of waiting until save.
ConstraintViolationException - if a node type or implementation-specific constraint is violated or if an attempt is made to add a node as the child of a property and this implementation performs this validation immediately instead of waiting until save.
VersionException - if the node to which the new child is being added is versionable and checked-in or is non-versionable but its nearest versionable ancestor is checked-in and this implementation performs this validation immediately instead of waiting until save.
LockException - if a lock prevents the addition of the node and this implementation performs this validation immediately instead of waiting until save.
RepositoryException - If the last element of relPath has an index or if another error occurs.
java.lang.Exception

orderBefore

void orderBefore(java.lang.String srcChildRelPath,
                 java.lang.String destChildRelPath)
                 throws java.lang.Exception
From JCR Node interface, needed. If this node supports child node ordering, this method inserts the child node at srcChildRelPath before its sibling, the child node at destChildRelPath, in the child node list.

To place the node srcChildRelPath at the end of the list, a destChildRelPath of null is used.

Note that (apart from the case where destChildRelPath is null) both of these arguments must be relative paths of depth one, in other words they are the names of the child nodes, possibly suffixed with an index.

If srcChildRelPath and destChildRelPath are the same, then no change is made.

Changes to ordering of child nodes are persisted on save of the parent node. But, if this node does not support child node ordering, then a UnsupportedRepositoryOperationException thrown.

If srcChildRelPath is not the relative path to a child node of this node then an ItemNotFoundException is thrown.

If destChildRelPath is neither the relative path to a child node of this node nor null, then an ItemNotFoundException is also thrown.

A ConstraintViolationException will be thrown either immediately or on save if this operation 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 or on save, if this node is versionable and checked-in or is non-versionable but its nearest versionable ancestor is checked-in. Implementations may differ on when this validation is performed.

A LockException will be thrown either immediately (by this method), or on save, if a lock prevents the re-ordering. Implementations may differ on when this validation is performed.

Parameters:
srcChildRelPath - the relative path to the child node (that is, name plus possible index) to be moved in the ordering
destChildRelPath - the the relative path to the child node (that is, name plus possible index) before which the node srcChildRelPath will be placed.
Throws:
UnsupportedRepositoryOperationException - if ordering is not supported.
ConstraintViolationException - if an implementation-specific ordering restriction is violated and this implementation performs this validation immediately instead of waiting until save.
ItemNotFoundException - if either parameter is not the relative path of a child node of this node.
VersionException - if this node is versionable and checked-in or is non-versionable but its nearest versionable ancestor is checked-in and this implementation performs this validation immediately instead of waiting until save..
LockException - if a lock prevents the re-ordering and this implementation performs this validation immediately instead of waiting until save..
RepositoryException - if another error occurs.
java.lang.Exception

setProperty

javax.jcr.Property setProperty(java.lang.String name,
                               javax.jcr.Value value)
                               throws java.lang.Exception
From JCR Node interface, needed. Sets the specified (single-value) property of this node to the specified value. If the property does not yet exist, it is created. The property type of the property will be that specified by the node type of this node.

If the property type of the supplied Value object is different from that required, then a best-effort conversion is attempted. If the conversion fails, a ValueFormatException is thrown. If another error occurs, a RepositoryException is thrown.

If the node type of this node does not indicate a specific property type, then the property type of the supplied Value object is used and if the property already exists it assumes both the new value and new property type.

If the property is multi-valued, a ValueFormatException is thrown.

Passing a null as the second parameter removes the property. It is equivalent to calling remove on the Property object itself. For example, N.setProperty("P", (Value)null) would remove property called "P" of the node in N.

To persist the addition, removal or change of a property to the workspace, save must be called on the session, this node, or a higher-order ancestor of the property.

A ConstraintViolationException will be thrown either immediately or on save 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 or on save if this node is versionable and checked-in or is non-versionable but its nearest versionable ancestor is checked-in. Implementations may differ on when this validation is performed.

A LockException will be thrown either immediately or on save if a lock prevents the setting of the property. Implementations may differ on when this validation is performed.

Parameters:
name - The name of a property of this node
value - The value to be assigned
Returns:
The updated Property object
Throws:
ValueFormatException - if value cannot be converted to the type of the specified property or if the property already exists and is multi-valued.
VersionException - if this node is versionable and checked-in or is non-versionable but its nearest versionable ancestor is checked-in and this implementation performs this validation immediately instead of waiting until save.
LockException - if a lock prevents the setting of the property and this implementation performs this validation immediately instead of waiting until save.
ConstraintViolationException - if the change would violate a node-type or other constraint and this implementation performs this validation immediately instead of waiting until save.
RepositoryException - if another error occurs.
java.lang.Exception

setProperty

javax.jcr.Property setProperty(java.lang.String name,
                               javax.jcr.Value value,
                               int type)
                               throws java.lang.Exception
From JCR Node interface, needed. Sets the specified (single-value) property to the specified value. If the property does not yet exist, it is created.

The type of the new property is determined by the type parameter specified.

If the property type of the supplied Value object is different from that required, then a best-effort conversion is attempted. If the conversion fails, a ValueFormatException is thrown.

If the property is not single-valued then a ValueFormatException is also thrown.

If the property already exists it assumes both the new value and the new property type.

Passing a null as the second parameter removes the property. It is equivalent to calling remove on the Property object itself. For example, N.setProperty("P", (Value)null, type) would remove property called "P" of the node in N.

To persist the addition or removal of a property, save must be called on the Session, this Node, or an ancestor of this Node.

To persist a change in the value of a property or in the type of a property (assuming the change is permitted by the applicable property definition) a save on the Property object itself is sufficent, though a save on the Session, this Node or an ancestor of this Node will also work.

A ConstraintViolationException will be thrown either immediately or on save 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 or on save if this node is versionable and checked-in or is non-versionable but its nearest versionable ancestor is checked-in. Implementations may differ on when this validation is performed.

A LockException will be thrown either immediately or on save if a lock prevents the setting of the property. Implementations may differ on when this validation is performed.

Parameters:
name - the name of the property to be set.
value - a Value object.
type - the type of the property.
Returns:
the Property object set, or null if this method was used to remove a property (by setting its value to null).
Throws:
ValueFormatException - if value cannot be converted to the specified type or if the property already exists and is multi-valued.
VersionException - if this node is versionable and checked-in or is non-versionable but its nearest versionable ancestor is checked-in and this implementation performs this validation immediately instead of waiting until save.
LockException - if a lock prevents the setting of the property and this implementation performs this validation immediately instead of waiting until save.
ConstraintViolationException - if the change would violate a node-type or other constraint and this implementation performs this validation immediately instead of waiting until save.
RepositoryException - if another error occurs.
java.lang.Exception

setProperty

javax.jcr.Property setProperty(java.lang.String name,
                               javax.jcr.Value[] values)
                               throws java.lang.Exception
From JCR Node interface, needed. Sets the specified (multi-value) property to the specified array of values. If the property does not yet exist, it is created. Same as setProperty(String name, Value value) except that an array of Value objects is assigned instead of a single Value.

The property type of the property will be that specified by the node type of this node. If the property type of the supplied Value objects is different from that required, then a best-effort conversion is attempted. If the conversion fails, a ValueFormatException is thrown.

All Value objects in the array must be of the same type, otherwise a ValueFormatException is thrown. If the property is not multi-valued then a ValueFormatException is also thrown. If another error occurs, a RepositoryException is thrown.

If the node type of this node does not indicate a specific property type, then the property type of the supplied Value objects is used and if the property already exists it assumes both the new values and the new property type.

Passing a null as the second parameter removes the property. It is equivalent to calling remove on the Property object itself. For example, N.setProperty("P", (Value[])null) would remove property called "P" of the node in N.

Note that this is different from passing an array that contains null elements. In such a case, the array is compacted by removing the nulls. The resulting set of values never contains nulls. However, the set may be empty: N.setProperty("P", new Value[]{null}) would set the property to the empty set of values.

To persist the addition, removal or change of a property to the workspace, save must be called on the session, this node, or a higher-order ancestor of the property.

A ConstraintViolationException will be thrown either immediately or on save 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 or on save if this node is versionable and checked-in or is non-versionable but its nearest versionable ancestor is checked-in. Implementations may differ on when this validation is performed.

A LockException will be thrown either immediately or on save if a lock prevents the setting of the property. Implementations may differ on when this validation is performed.

Parameters:
name - the name of the property to be set.
values - an array of Value objects.
Returns:
the updated Property object.
Throws:
ValueFormatException - if value cannot be converted to the type of the specified property or if the property already exists and is not multi-valued.
VersionException - if this node is versionable and checked-in or is non-versionable but its nearest versionable ancestor is checked-in and this implementation performs this validation immediately instead of waiting until save.
LockException - if a lock prevents the setting of the property and this implementation performs this validation immediately instead of waiting until save.
ConstraintViolationException - if the change would violate a node-type or other constraint and this implementation performs this validation immediately instead of waiting until save.
RepositoryException - if another error occurs.
java.lang.Exception

setProperty

javax.jcr.Property setProperty(java.lang.String name,
                               javax.jcr.Value[] values,
                               int type)
                               throws java.lang.Exception
From JCR Node interface, needed. Sets the specified (multi-value) property to the specified array of values. If the property does not yet exist, it is created. The type of the property is determined by the type parameter specified.

If the property type of the supplied Value objects is different from that specified, then a best-effort conversion is attempted. If the conversion fails, a ValueFormatException is thrown.

If the property already exists it assumes both the new values and the new property type.

All Value objects in the array must be of the same type, otherwise a ValueFormatException is thrown. If the property is not multi-valued then a ValueFormatException is also thrown. If another error occurs, a RepositoryException is thrown.

Passing a null as the second parameter removes the property. It is equivalent to calling remove on the Property object itself. For example, N.setProperty("P", (Value[])null, type) would remove property called "P" of the node in N.

Note that this is different from passing an array that contains null elements. In such a case, the array is compacted by removing the nulls. The resulting set of values never contains nulls. However, the set may be empty: N.setProperty("P", new Value[]{null}, type) would set the property to the empty set of values.

To persist the addition, removal or change of a property to the workspace, save must be called on the session, this node, or a higher-order ancestor of the property.

A ConstraintViolationException will be thrown either immediately or on save 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 or on save if this node is versionable and checked-in or is non-versionable but its nearest versionable ancestor is checked-in. Implementations may differ on when this validation is performed.

A LockException will be thrown either immediately or on save if a lock prevents the setting of the property. Implementations may differ on when this validation is performed.

Parameters:
name - the name of the property to be set.
values - an array of Value objects.
type - the type of the property.
Returns:
the updated Property object.
Throws:
ValueFormatException - if value cannot be converted to the specified type or if the property already exists and is not multi-valued.
VersionException - if this node is versionable and checked-in or is non-versionable but its nearest versionable ancestor is checked-in and this implementation performs this validation immediately instead of waiting until save.
LockException - if a lock prevents the setting of the property and this implementation performs this validation immediately instead of waiting until save.
ConstraintViolationException - if the change would violate a node-type or other constraint and this implementation performs this validation immediately instead of waiting until save.
RepositoryException - if another error occurs.
java.lang.Exception

setProperty

javax.jcr.Property setProperty(java.lang.String name,
                               java.lang.String[] values)
                               throws java.lang.Exception
From JCR Node interface, needed. Sets the specified property to the specified array of values. Same as setProperty(String name, Value[] values) except that the values are specified as String objects instead of Value objects.

Parameters:
name - the name of the property to be set.
values - an array of Value objects.
Returns:
the updated Property object.
Throws:
ValueFormatException - if value cannot be converted to the type of the specified property or if the property already exists and is not multi-valued.
VersionException - if this node is versionable and checked-in or is non-versionable but its nearest versionable ancestor is checked-in and this implementation performs this validation immediately instead of waiting until save.
LockException - if a lock prevents the setting of the property and this implementation performs this validation immediately instead of waiting until save.
ConstraintViolationException - if the change would violate a node-type or other constraint and this implementation performs this validation immediately instead of waiting until save.
RepositoryException - if another error occurs.
java.lang.Exception

setProperty

javax.jcr.Property setProperty(java.lang.String name,
                               java.lang.String[] values,
                               int type)
                               throws java.lang.Exception
Sets the specified property to the specified array of values and to the specified type. Same as setProperty(String name, Value[] values, int type) except that the values are specified as String objects instead of Value objects.

Parameters:
name - the name of the property to be set.
values - an array of Value objects.
type - the type of the property.
Returns:
the updated Property object.
Throws:
ValueFormatException - if value cannot be converted to the specified type or if the property already exists and is not multi-valued.
VersionException - if this node is versionable and checked-in or is non-versionable but its nearest versionable ancestor is checked-in and this implementation performs this validation immediately instead of waiting until save.
LockException - if a lock prevents the setting of the property and this implementation performs this validation immediately instead of waiting until save.
ConstraintViolationException - if the change would violate a node-type or other constraint and this implementation performs this validation immediately instead of waiting until save.
RepositoryException - if another error occurs.
java.lang.Exception

setProperty

javax.jcr.Property setProperty(java.lang.String name,
                               java.lang.String value)
                               throws java.lang.Exception
From JCR Node interface, needed. Sets the specified property to the specified value. If the property does not yet exist, it is created. The property type of the property being set is determined by the node type of this node (the one on which this method is being called). If this is something other than PropertyType.STRING, a best-effort conversion is attempted. If the conversion fails, a ValueFormatException is thrown. If the property is multi-valued, a ValueFormatException is also thrown. If another error occurs, a RepositoryException is thrown.

If the node type of this node does not specify a particular property type for the property being set then PropertyType.STRING is used and, if the property already exists, it assumes both the new value and type PropertyType.STRING.

Passing a null as the second parameter removes the property. It is equivalent to calling remove on the Property object itself. For example, N.setProperty("P", (String)null) would remove property called "P" of the node in N.

To persist the addition, removal or change of a property save must be called.

A ConstraintViolationException will be thrown either immediately or on save 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 or on save if this node is versionable and checked-in or is non-versionable but its nearest versionable ancestor is checked-in. Implementations may differ on when this validation is performed.

A LockException will be thrown either immediately or on save if a lock prevents the setting of the property. Implementations may differ on when this validation is performed.

Parameters:
name - The name of a property of this node
value - The value to assigned
Returns:
The updated Property object
Throws:
ValueFormatException - if value cannot be converted to the type of the specified property or if the property already exists and is multi-valued.
VersionException - if this node is versionable and checked-in or is non-versionable but its nearest versionable ancestor is checked-in and this implementation performs this validation immediately instead of waiting until save.
LockException - if a lock prevents the setting of the property and this implementation performs this validation immediately instead of waiting until save.
ConstraintViolationException - if the change would violate a node-type or other constraint and this implementation performs this validation immediately instead of waiting until save.
RepositoryException - If another error occurs.
java.lang.Exception

setProperty

javax.jcr.Property setProperty(java.lang.String name,
                               java.lang.String value,
                               int type)
                               throws java.lang.Exception
From JCR Node interface, needed. Sets the specified (single-value) property to the specified value. If the property does not yet exist, it is created.

The type of the property is determined by the type parameter specified.

If the property type specified is not PropertyType.STRING, then a best-effort conversion is attempted. If the conversion fails, a ValueFormatException is thrown.

If the property is not single-valued then a ValueFormatException is also thrown.

If the property already exists it assumes both the new value and the new property type.

Passing a null as the second parameter removes the property. It is equivalent to calling remove on the Property object itself. For example, N.setProperty("P", (Value)null, type) would remove property called "P" of the node in N.

To persist the addition or removal of a property, save must be called on the Session, this Node, or an ancestor of this Node.

To persist a change in the value of a property or in the type of a property (assuming the change is permitted by the applicable property definition) a save on the Property object itself is sufficent, though a save on the Session, this Node or an ancestor of this Node will also work.

A ConstraintViolationException will be thrown either immediately or on save 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 or on save if this node is versionable and checked-in or is non-versionable but its nearest versionable ancestor is checked-in. Implementations may differ on when this validation is performed.

A LockException will be thrown either immediately or on save if a lock prevents the setting of the property. Implementations may differ on when this validation is performed.

Parameters:
name - the name of the property to be set.
value - a String object.
type - the type of the property.
Returns:
the Property object set, or null if this method was used to remove a property (by setting its value to null).
Throws:
ValueFormatException - if value cannot be converted to the specified type or if the property already exists and is multi-valued.
VersionException - if this node is versionable and checked-in or is non-versionable but its nearest versionable ancestor is checked-in and this implementation performs this validation immediately instead of waiting until save.
LockException - if a lock prevents the setting of the property and this implementation performs this validation immediately instead of waiting until save.
ConstraintViolationException - if the change would violate a node-type or other constraint and this implementation performs this validation immediately instead of waiting until save.
RepositoryException - if another error occurs.
java.lang.Exception

setProperty

javax.jcr.Property setProperty(java.lang.String name,
                               java.io.InputStream value)
                               throws java.lang.Exception
From JCR Node interface, needed. Sets the specified property to the specified value. If the property does not yet exist, it is created. The property type of the property being set is determined by the node type of this node (the one on which this method is being called). If this is something other than PropertyType.BINARY, a best-effort conversion is attempted. If the conversion fails, a ValueFormatException is thrown. If the property is multi-valued, a ValueFormatException is also thrown. If another error occurs, a RepositoryException is thrown.

If the node type of this node does not specify a particular property type for the property being set then PropertyType.BINARY is used and, if the property already exists, it assumes both the new value and type PropertyType.BINARY.

Passing a null as the second parameter removes the property. It is equivalent to calling remove on the Property object itself. For example, N.setProperty("P", (InputStream)null) would remove property called "P" of the node in N.

To persist the addition, removal or change of a property save must be called.

A ConstraintViolationException will be thrown either immediately or on save 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 or on save if this node is versionable and checked-in or is non-versionable but its nearest versionable ancestor is checked-in. Implementations may differ on when this validation is performed.

A LockException will be thrown either immediately or on save if a lock prevents the setting of the property. Implementations may differ on when this validation is performed.

Parameters:
name - The name of a property of this node
value - The value to assigned
Returns:
The updated Property object
Throws:
ValueFormatException - if value cannot be converted to the type of the specified property or if the property already exists and is multi-valued.
VersionException - if this node is versionable and checked-in or is non-versionable but its nearest versionable ancestor is checked-in and this implementation performs this validation immediately instead of waiting until save.
LockException - if a lock prevents the setting of the property and this implementation performs this validation immediately instead of waiting until save.
ConstraintViolationException - if the change would violate a node-type or other constraint and this implementation performs this validation immediately instead of waiting until save.
RepositoryException - If another error occurs.
java.lang.Exception

setProperty

javax.jcr.Property setProperty(java.lang.String name,
                               boolean value)
                               throws java.lang.Exception
From JCR Node interface, needed. Sets the specified property to the specified value. If the property does not yet exist, it is created. The property type of the property being set is determined by the node type of this node (the one on which this method is being called). If this is something other than PropertyType.BOOLEAN, a best-effort conversion is attempted. If the conversion fails, a ValueFormatException is thrown. If the property is multi-valued, a ValueFormatException is also thrown. If another error occurs, a RepositoryException is thrown.

If the node type of this node does not specify a particular property type for the property being set then PropertyType.BOOLEAN is used and, if the property already exists, it assumes both the new value and type PropertyType.BOOLEAN.

To persist the addition, removal or change of a property save must be called.

A ConstraintViolationException will be thrown either immediately or on save 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 or on save if this node is versionable and checked-in or is non-versionable but its nearest versionable ancestor is checked-in. Implementations may differ on when this validation is performed.

A LockException will be thrown either immediately or on save if a lock prevents the setting of the property. Implementations may differ on when this validation is performed.

Parameters:
name - The name of a property of this node
value - The value to assigned
Returns:
The updated Property object
Throws:
ValueFormatException - if value cannot be converted to the type of the specified property or if the property already exists and is multi-valued.
VersionException - if this node is versionable and checked-in or is non-versionable but its nearest versionable ancestor is checked-in and this implementation performs this validation immediately instead of waiting until save.
LockException - if a lock prevents the setting of the property and this implementation performs this validation immediately instead of waiting until save.
ConstraintViolationException - if the change would violate a node-type or other constraint and this implementation performs this validation immediately instead of waiting until save.
RepositoryException - If another error occurs.
java.lang.Exception

setProperty

javax.jcr.Property setProperty(java.lang.String name,
                               double value)
                               throws java.lang.Exception
From JCR Node interface, needed. Sets the specified property to the specified value. If the property does not yet exist, it is created. The property type of the property being set is determined by the node type of this node (the one on which this method is being called). If this is something other than PropertyType.DOUBLE, a best-effort conversion is attempted. If the conversion fails, a ValueFormatException is thrown. If the property is multi-valued, a ValueFormatException is also thrown. If another error occurs, a RepositoryException is thrown.

If the node type of this node does not specify a particular property type for the property being set then PropertyType.DOUBLE is used and, if the property already exists, it assumes both the new value and type PropertyType.DOUBLE.

To persist the addition, removal or change of a property save must be called.

A ConstraintViolationException will be thrown either immediately or on save 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 or on save if this node is versionable and checked-in or is non-versionable but its nearest versionable ancestor is checked-in. Implementations may differ on when this validation is performed.

A LockException will be thrown either immediately or on save if a lock prevents the setting of the property. Implementations may differ on when this validation is performed.

Parameters:
name - The name of a property of this node
value - The value to assigned
Returns:
The updated Property object
Throws:
ValueFormatException - if value cannot be converted to the type of the specified property or if the property already exists and is multi-valued.
VersionException - if this node is versionable and checked-in or is non-versionable but its nearest versionable ancestor is checked-in and this implementation performs this validation immediately instead of waiting until save.
LockException - if a lock prevents the setting of the property and this implementation performs this validation immediately instead of waiting until save.
ConstraintViolationException - if the change would violate a node-type or other constraint and this implementation performs this validation immediately instead of waiting until save.
RepositoryException - If another error occurs.
java.lang.Exception

setProperty

javax.jcr.Property setProperty(java.lang.String name,
                               long value)
                               throws java.lang.Exception
From JCR Node interface, needed. Sets the specified property to the specified value. If the property does not yet exist, it is created. The property type of the property being set is determined by the node type of this node (the one on which this method is being called). If this is something other than PropertyType.LONG, a best-effort conversion is attempted. If the conversion fails, a ValueFormatException is thrown. If the property is multi-valued, a ValueFormatException is also thrown. If another error occurs, a RepositoryException is thrown.

If the node type of this node does not specify a particular property type for the property being set then PropertyType.LONG is used and, if the property already exists, it assumes both the new value and type PropertyType.LONG.

To persist the addition, removal or change of a property save must be called.

A ConstraintViolationException will be thrown either immediately or on save 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 or on save if this node is versionable and checked-in or is non-versionable but its nearest versionable ancestor is checked-in. Implementations may differ on when this validation is performed.

A LockException will be thrown either immediately or on save if a lock prevents the setting of the property. Implementations may differ on when this validation is performed.

Parameters:
name - The name of a property of this node
value - The value to assigned
Returns:
The updated Property object
Throws:
ValueFormatException - if value cannot be converted to the type of the specified property or if the property already exists and is multi-valued.
VersionException - if this node is versionable and checked-in or is non-versionable but its nearest versionable ancestor is checked-in and this implementation performs this validation immediately instead of waiting until save.
LockException - if a lock prevents the setting of the property and this implementation performs this validation immediately instead of waiting until save.
ConstraintViolationException - if the change would violate a node-type or other constraint and this implementation performs this validation immediately instead of waiting until save.
RepositoryException - If another error occurs.
java.lang.Exception

setProperty

javax.jcr.Property setProperty(java.lang.String name,
                               java.util.Calendar value)
                               throws java.lang.Exception
From JCR Node interface, needed. Sets the specified property to the specified value. If the property does not yet exist, it is created. The property type of the property being set is determined by the node type of this node (the one on which this method is being called). If this is something other than PropertyType.DATE, a best-effort conversion is attempted. If the conversion fails, a ValueFormatException is thrown. If the property is multi-valued, a ValueFormatException is also thrown. If another error occurs, a RepositoryException is thrown.

If the node type of this node does not specify a particular property type for the property being set then PropertyType.DATE is used and, if the property already exists, it assumes both the new value and type PropertyType.DATE.

Passing a null as the second parameter removes the property. It is equivalent to calling remove on the Property object itself. For example, N.setProperty("P", (Calendar)null) would remove property called "P" of the node in N.

To persist the addition, removal or change of a property save must be called.

A ConstraintViolationException will be thrown either immediately or on save 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 or on save if this node is versionable and checked-in or is non-versionable but its nearest versionable ancestor is checked-in. Implementations may differ on when this validation is performed.

A LockException will be thrown either immediately or on save if a lock prevents the setting of the property. Implementations may differ on when this validation is performed.

Parameters:
name - The name of a property of this node
value - The value to assigned
Returns:
The updated Property object
Throws:
ValueFormatException - if value cannot be converted to the type of the specified property or if the property already exists and is multi-valued.
VersionException - if this node is versionable and checked-in or is non-versionable but its nearest versionable ancestor is checked-in and this implementation performs this validation immediately instead of waiting until save.
LockException - if a lock prevents the setting of the property and this implementation performs this validation immediately instead of waiting until save.
ConstraintViolationException - if the change would violate a node-type or other constraint and this implementation performs this validation immediately instead of waiting until save.
RepositoryException - If another error occurs.
java.lang.Exception

setProperty

javax.jcr.Property setProperty(java.lang.String name,
                               Node value)
                               throws java.lang.Exception
From JCR Node interface, needed. Sets the specified (REFERENCE)property to refer to the specified Node. If the property does not yet exist, it is created. The property type of the property being set is determined by the node type of this node (the one on which this method is being called). If the property type of this property is something other than either PropertyType.REFERENCE or undefined then a ValueFormatException is thrown. If the property is multi-valued, a ValueFormatException is also thrown. If another error occurs, a RepositoryException is thrown.

If the node type of this node does not specify a particular property type for the property being set then PropertyType.REFERENCE is used and, if the property already exists, it assumes both the new value and type PropertyType.REFERENCE.

Passing a null as the second parameter removes the property. It is equivalent to calling remove on the Property object itself. For example, N.setProperty("P", (Node)null) would remove property called "P" of the node in N.

To persist the addition, removal or change of a property save must be called.

A ConstraintViolationException will be thrown either immediately or on save 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 or on save if this node is versionable and checked-in or is non-versionable but its nearest versionable ancestor is checked-in. Implementations may differ on when this validation is performed.

A LockException will be thrown either immediately or on save if a lock prevents the setting of the property. Implementations may differ on when this validation is performed.

Parameters:
name - The name of a property of this node
value - The value to assigned
Returns:
The updated Property object
Throws:
ValueFormatException - if value cannot be converted to the type of the specified property or if the property already exists and is multi-valued.
VersionException - if this node is versionable and checked-in or is non-versionable but its nearest versionable ancestor is checked-in and this implementation performs this validation immediately instead of waiting until save.
LockException - if a lock prevents the setting of the property and this implementation performs this validation immediately instead of waiting until save.
ConstraintViolationException - if the change would violate a node-type or other constraint and this implementation performs this validation immediately instead of waiting until save.
RepositoryException - If another error occurs.
java.lang.Exception

setTitle

void setTitle(java.lang.String title)
              throws java.lang.Exception
cm:title mandatory property with direct accessor. Equal to Stellar legacy setLongName(String longName).

Parameters:
title - cm:title property
Throws:
RepositoryException - if an error occurs.
java.lang.Exception

setDescription

void setDescription(java.lang.String description)
                    throws java.lang.Exception
cm:description mandatory property with direct accessor. Equal to Stellar legacy setDescription(String description).

Parameters:
description - cm:description property
Throws:
RepositoryException - if an error occurs.
java.lang.Exception


Copyright © 2007-2008 MIT IS&T ISDA. All Rights Reserved.