|
Oracle Fusion Middleware Java API for Oracle WebLogic Portal 10g Release 3 (10.3.2) E14255-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Deprecated Replaced with NodeOpsV2
@Deprecated
public interface NodeOpsV1
NodeOps is a Ticket interface for Node CRUD operations.
It is used to manage Nodes, including their Property values, in a content repository. Nodes are objects in a hierarchy of nodes, which have Properties. Properties have property Values.
NodeOpsV1 rules are defined below.
All Nodes are uniquely identified through:
The repository root (path /) is an artificial construct and cannot be fetched; no node can have this path. However, it has an ID (UID is empty), and this can be used to retrieve all children at the top level of the repository.
All Properties are identified through their ID, which includes a uid that uniquely identifies the Property (and containing node) in the repository.
A Node may either be a Content Node or a Hierarchy Node as defined by its node type, an attribute of a Node. This concept is deprecated; a newly written repository should only support Content nodes.
If a node has an ObjectClass, it may contain a Property for each PropertyDefinition of its ObjectClass and each Property must match the shape as defined by its corresponding PropertyDefinition. For example, if the ObjectClass has a single-valued property called 'sProp' of type String, a Node of that ObjectClass has a single-valued property called 'sProp' of type String. Properties are associated with PropertyDefinitions by property name.
Many operations use ID objects as parameters. Before ac node has been created, or when a new property is being added, the ID (or UID) may be null, because the property has not been created yet. After a node has been created, it must have a non-null ID (and UID). All nodes (and properties) returned by the repository must have a non-null UID.
The ID uid will be null when dealing with the repository root node. For all other nodes in the repository, the ID uid must be non-null. For example a call to getNodeChildren(ID id) with a correct repository name and a null uid will return all Nodes at the top level of that repository.
The repository implementation may have more specific validation rules than those defined above. If a repository considers an attempted operation invalid, it can throw a RepositoryException or UnsupportedRepositoryOperationException. If a repository does not implement a certain operation, it should report this via the method Ticket.getCapabilitySupport(Set<ICapabilityDefinition> capabilities), so applications can detect support for capabilities before attempting them.
If a Node has an ObjectClass associated with it, whenever it is retrieved, the ObjectClass must be configured on the Node.
The node's User Properties (the properties defined by the ObjectClass) need not be present on the node when it is returned by the repository. For performance reasons, these can optionally be lazy loaded by the call to Node.getProperties().
If the repository is returning all properties immmediately, it should set the properties on the returned Node. If the repository wants the properties to be lazy-loaded, it should use NULL for the Node properties on the returned Node.
The properties approach can be selected on a per-method basis. For the getNode implementations, it is best to initially set the Properties on the return.
Nested Class Summary | |
---|---|
static class |
NodeOpsV1.MethodName Deprecated |
Method Summary | |
---|---|
Node |
addNodeContent(ID nodeId, ID objectClassId, Property[] properties) Deprecated Updates the node with the specified id to contain the specified objectClass and properties (content and meta-content). |
Node |
copyNode(ID sourceId, ID destinationId) Deprecated This method copies a Node (and its descendents) to a new location in the node hierarchy. |
Node |
createNodeWithNodeType(ID parentId, String newNodeName, int type) Deprecated This method creates a new Node underneath a parent node. |
Node |
createNodeWithNodeTypeAndObjectClass(ID parentId, String newNodeName, int type, ID objectClassId, Property[] properties) Deprecated This method creates a new Node underneath a parent node. |
Node |
createNodeWithNodeTypeAndObjectClassAndWorkflow(ID parentId, String newNodeName, int type, ID objectClassId, Property[] properties, ID workflowId) Deprecated This method creates a new Node underneath a parent node with the specified workflow. |
Node |
createNodeWithNodeTypeAndWorkflow(ID parentId, String newNodeName, int type, ID workflowId) Deprecated This method creates a new Node underneath a parent node using the specified workflow. |
void |
deleteNode(ID nodeId) Deprecated This method performs a full cascade delete on a Node and its children. |
Set<String> |
getNativeFilterableProperties(String repositoryName) Deprecated Returns a set of property names which the repository can filter natively (within the repository instead of the federated API) for methods using a QueryCriteria. |
Set<String> |
getNativeSortableProperties(String repositoryName) Deprecated Returns a set of property names which the repository can sort natively (within the repository instead of the federated API) for methods using a QueryCriteria. |
Node[] |
getNodeChildren(ID parentId, int type) Deprecated This method returns an array of all child Nodes for the specified parent Node (and type), which the caller can view. |
ID[] |
getNodeChildrenAsNodeIds(ID parentId, int type) Deprecated This method returns an array of all child Node IDs for the specified parent Node (and type), which the caller can view. |
QueryResult<Node> |
getNodeChildrenWithQueryCriteria(ID parentId, int type, QueryCriteria queryCriteria) Deprecated This method returns a QueryResult of all child Nodes for the specified parent Node (and type), which the caller can view, according to the QueryCriteria. |
ID[] |
getNodeReferences(ID nodeId) Deprecated Retrieve all nodes in this repository which have a link property referring to the specified node. |
Node[] |
getNodesWithIds(ID[] nodeIds) Deprecated This method retrieves a batch of Nodes, given a batch of Node IDs. |
QueryResult<Node> |
getNodesWithIdsAndQueryCriteria(ID[] nodeIds, QueryCriteria queryCriteria, boolean failSilently) Deprecated This method retrieves a batch of Nodes, given a batch of Node IDs. |
Node |
getNodeWithId(ID nodeId) Deprecated This method retrieves a particular Node (and its metadata) based on its ID. |
Node |
getNodeWithPath(String path) Deprecated This method retrieves a particular Node (and its metadata) based on its path. |
Property[] |
getProperties(ID nodeId) Deprecated Retrieve all Properties for a Node, except the binary value content of a binary property. |
InputStream |
getPropertyBytes(ID propertyId) Deprecated Retrieves binary content for the given binary property ID. |
Node |
moveNode(ID sourceId, ID destinationId) Deprecated This method moves a Node (and its descendents) to a new location in the node hierarchy. |
void |
orderBefore(ID parentNodeId, ID srcChildNodeId, ID destChildNodeId) Deprecated If the parent node type supports child node ordering, this method inserts the child node at srcChildNodeId before its sibling, the child node at destChildNodeId . |
Node |
removeNodeContent(ID nodeId) Deprecated Removes the Node's properties and its ObjectClass. |
Node |
renameNode(ID nodeId, String newName) Deprecated This method renames a node. |
Node |
save(Node node) Deprecated This method updates an existing node (and its metadata) in a single transaction. |
Node |
updateProperties(ID nodeId, Property[] properties) Deprecated Updates the node with the specified id with the specified property values. |
Method Detail |
---|
Node createNodeWithNodeType(ID parentId, String newNodeName, int type) throws RepositoryException
parentId
- - the id for the parent of the node. The parentId's uid is null if the parent is the repository root node.newNodeName
- - the name of Node to create.type
- - the type of the node, either Node.HIERARCHY
or #CONTENT
. Use of Node.HIERARCHY and Node.CONTENT will be deprecated in future releases.AuthorizationException
- - if the user attempting the operation is not authorized to perform it.NoSuchNodeException
- - if the parent node does not exist, or if the user attempting the operation does not have view privileges on the parent nodeNodeExistsException
- - if the parent Node already has a child with the same name.RepositoryException
- - if a validation error occurs.Node createNodeWithNodeTypeAndObjectClass(ID parentId, String newNodeName, int type, ID objectClassId, Property[] properties) throws RepositoryException
parentId
- - the id for the parent of the node. The parentId's uid is null if the parent is the repository root node.newNodeName
- - the name of the Node to create.type
- - the type of the node, either Node.HIERARCHY
or #CONTENT
. Use of Node.HIERARCHY and Node.CONTENT will be deprecated in future releases.objectClassId
- - the ID for the ObjectClass to associate the new Node to.properties
- - the properties to add to the new Node. A PropertyDefinition must exist for each property.AuthorizationException
- for Authorization errorsNoSuchNodeException
- - if the parent node does not exist, or if the user attempting the operation does not have view privileges on the parent nodeNodeExistsException
- - if the parent Node already has a child with the same name.NoSuchObjectClassException
- - if the ObjectClass doesn't exist.RepositoryException
- - if a validation error occurs.Node createNodeWithNodeTypeAndObjectClassAndWorkflow(ID parentId, String newNodeName, int type, ID objectClassId, Property[] properties, ID workflowId) throws RepositoryException
parentId
- - the id for the parent of the node. The parentId's uid is null if the parent is the repository root node.newNodeName
- - the name of the Node to create.type
- - the type of the node, either Node.HIERARCHY
or #CONTENT
. Use of Node.HIERARCHY and Node.CONTENT will be deprecated in future releases.objectClassId
- - the ID for the ObjectClass to associate the new Node to.properties
- - the properties to add to the new Node. A PropertyDefinition must exist for each property.workflowId
- - the workflow to be associated with the node. If NULL, node uses the default workflowAuthorizationException
- - if the user attempting the operation is not authorized to create nodes beneath the parentIdNoSuchNodeException
- - if the parent node does not exist, or if the user attempting the operation does not have view privileges on the parent nodeNodeExistsException
- - if the parent Node already has a child with the same name.NoSuchObjectClassException
- - if the ObjectClass doesn't exist.RepositoryException
- - if a validation error occurs.Node createNodeWithNodeTypeAndWorkflow(ID parentId, String newNodeName, int type, ID workflowId) throws RepositoryException
parentId
- - the id for the parent of the node. The parentId's uid is null if the parent is the repository root node.newNodeName
- - the name of Node to create.type
- - the type of the node, either Node.HIERARCHY
or #CONTENT
. Use of Node.HIERARCHY and Node.CONTENT will be deprecated in future releases.workflowId
- - the workflow to be associated with the node. If null, node uses the default workflowAuthorizationException
- - if the user attempting the operation is not authorized to create nodes beneath the parentIdNoSuchNodeException
- - if the parent node does not exist, or if the user attempting the operation does not have view privileges on the parent nodeNodeExistsException
- - if the parent Node already has a child with the same name.RepositoryException
- - if a validation error occurs.Node getNodeWithId(ID nodeId) throws RepositoryException
nodeId
- - the id for the node to retrieve.NoSuchNodeException
- - if the node can't be found or if the user attempting the operation is not authorized to view the nodeRepositoryException
- - if nodeId is invalid or other exceptions in the repository occurNode getNodeWithPath(String path) throws RepositoryException
path
- - the path for the node to retrieve.NoSuchNodeException
- - if the node can't be found or if the user attempting the operation is not authorized to view the nodeRepositoryException
- - if path is invalid or other exceptions in the repository occurNode[] getNodesWithIds(ID[] nodeIds) throws RepositoryException
nodeIds
- - the Node IDs to retrieve the Nodes for.NoSuchNodeException
- - if a node cannot be retrieved or if the user attempting the operation is not authorized to view one of the nodeIdsRepositoryException
QueryResult<Node> getNodesWithIdsAndQueryCriteria(ID[] nodeIds, QueryCriteria queryCriteria, boolean failSilently) throws RepositoryException
nodeIds
- - the Node IDs to retrieve the Nodes for.queryCriteria
- - the query criteria (possibly unsorted and unfiltered)failSilently
- - if true, then if a node cannot be found, no exception will be thrownNoSuchNodeException
- - if a node to get cannot be retrieved and failSilently is false or if the user attempting the operation is not authorized to view one of the nodeIdsRepositoryException
ID[] getNodeChildrenAsNodeIds(ID parentId, int type) throws RepositoryException
parentId
- - the parent Node ID (if uid is null, the repository root node)type
- - the node type of children to return, either Node.HIERARCHY
, #CONTENT
or Node.NODE
. If the type is Node.NODE
then all children (both Node.HIERARCHY
and #CONTENT
will be returned. Use of Node.HIERARCHY and Node.CONTENT will be deprecated in future releases. <p/>NoSuchNodeException
- - if the parent node can't be found or if the user attempting the operation is not authorized to view the parentId or one of its child nodes.RepositoryException
Node[] getNodeChildren(ID parentId, int type) throws RepositoryException
parentId
- - the parent Node ID (if uid is null, the repository root node)type
- - the type of children to return, either Node.HIERARCHY
, #CONTENT
or Node.NODE
. If the type is Node.NODE
then all children (both Node.HIERARCHY
and #CONTENT
will be returned. Use of Node.HIERARCHY and Node.CONTENT will be deprecated in future releases. <p/>NoSuchNodeException
- - if the parent node can't be found or if the user attempting the operation is not authorized to view the parentId or one of its child nodes.RepositoryException
QueryResult<Node> getNodeChildrenWithQueryCriteria(ID parentId, int type, QueryCriteria queryCriteria) throws RepositoryException
parentId
- - the parent Node ID (if uid is null, the repository root node)type
- - the type of children to return, either Node.HIERARCHY
, #CONTENT
or Node.NODE
. If the type is Node.NODE
then all children (both Node.HIERARCHY
and #CONTENT
will be returned. Use of Node.HIERARCHY and Node.CONTENT will be deprecated in future releases. <p/>queryCriteria
- - the query criteria (possibly unsorted and unfiltered)NoSuchNodeException
- - if the parent node can't be found or if the user attempting the operation is not authorized to view the parentId or one of its child nodes.RepositoryException
ID[] getNodeReferences(ID nodeId) throws RepositoryException
nodeId
- The ID
of the referred-to node.NoSuchNodeException
- - if the user attempting the operation is not authorized to view the nodeIdRepositoryException
void orderBefore(ID parentNodeId, ID srcChildNodeId, ID destChildNodeId) throws RepositoryException
srcChildNodeId
before its sibling, the child node at destChildNodeId
. Both nodes must be immediate children of the parent node, parentNodeId
. If parentNodeId's uid is null, then the parent node is the repository root node. <p/> To place the node srcChildNodeId
at the end of the list, a destChildNodeId
of null
is used. <p/> If srcChildNodeId
and destChildNodeId
are the same, then no change is made. <p/> If this node does not support child node ordering, then a UnsupportedRepositoryOperationException
is thrown. <p/> If one of the nodes does not exist, then a NoSuchNodeException
is thrown. <p/> If destChildNodeId
is neither null
nor a sibling of srcChildNodeId, then a NoSuchNodeException
is also thrown. <p/> If this operation would violate a node type or implementation-specific constraint, a ConstraintViolationException
will be thrown. <p/>parentNodeId
- the parent of both srcChildNodeId and destChildNodeId (null uid for repo root)srcChildNodeId
- the child node to be moved in the orderingdestChildNodeId
- the child node before which the node srcChildNodeId
will be placed, or null to move the srcChildNode to the last position. <p/>ConstraintViolationException
- if an implementation-specific constraint is violatedNoSuchNodeException
- if neither child node exists or if the user attempting the operation is not authorized to view any of the parentNodeId, srcChildNodeId, or destChildNodeIdAuthorizationException
- if the user attempting the operation is not authorized to perform itRepositoryException
- if another error occursvoid deleteNode(ID nodeId) throws RepositoryException
nodeId
- - the id of the Node to be deleted. Cannot be the repository root node. (uid=null) <p/>NoSuchNodeException
- - if the node to delete can't be found, or if the user attempting the operation is not authorized view the node.AuthorizationException
- if the user attempting the operation is not authorized to perform itRepositoryException
- - if validation error occurs.Node moveNode(ID sourceId, ID destinationId) throws RepositoryException
sourceId
- - the id of the Node to be moveddestinationId
- - the id of the Node under which the sourceId Node is moved. If uid is null, the repository root node.AuthorizationException
- - if the user attempting the operation is not authorized to perform it.NoSuchNodeException
- - if the source or destination node can't be found or if the user attempting the operation is not authorized view the node specified by the sourceId.NodeExistsException
- - if attempting to move a Node to a location that already exists.RepositoryException
- - if validation error occurs.Node copyNode(ID sourceId, ID destinationId) throws RepositoryException
sourceId
- - the id of the Node to be copieddestinationId
- - the id of the Node under which the sourceId Node is copied. If uid is null, the repository root node.AuthorizationException
- - if the user attempting the operation is not authorized to perform it.NoSuchNodeException
- - if the source or destination node can't be found or if the user attempting the operation is not authorized view the node specified by the sourceId.RepositoryException
- - if validation error occurs.Node renameNode(ID nodeId, String newName) throws RepositoryException
nodeId
- - the id for the node to renamenewName
- - a String for the new node nameNoSuchNodeException
- - if the node to rename can't be found or if the user attempting the operation is not authorized to view the nodeAuthorizationException
- - if the user attempting the operation is not authorized to perform it.NodeExistsException
- - if the newName already exists as a sibling.RepositoryException
- - if validation error occurs.Node addNodeContent(ID nodeId, ID objectClassId, Property[] properties) throws RepositoryException
nodeId
- - the ID for the node to update.objectClassId
- - the ID for new objectClass.properties
- - the new properties on the Node. Additional unspecified properties may also exist.AuthorizationException
- - if the user attempting the operation is not authorized to perform it.NoSuchObjectClassException
- thrown if the ObjectClass to set on the Node does not exist.NoSuchNodeException
- - if the Node to update does not exist or the caller has no rights to view it.RepositoryException
- - if validation error occurs.Node updateProperties(ID nodeId, Property[] properties) throws RepositoryException
nodeId
- - the ID of the node to update. The ID must include the repositoryName.properties
- - the properties to update on the Node. Existing unspecified properties may also exist.AuthenticationException
- - if the user attempting the operation isn't authenticated against the repository.NoSuchNodeException
- - if the Node to update does not exist or the caller has no rights to view the nodeAuthorizationException
- - if the user attempting the operation is not authorized to perform it.NoSuchPropertyException
- - if a Property does not exist on the Node.RepositoryException
- - if system or validation error occurs.Node save(Node node) throws RepositoryException
node
- The node to update with the new state configured.AuthorizationException
- - if the user attempting the operation is not authorized to perform it.RepositoryException
- - if validation error occurs.Node removeNodeContent(ID nodeId) throws RepositoryException
nodeId
- - the id for the Node to remove the ObjectClass (and properties) from.NoSuchNodeException
- - if the node does not exist or the caller has no rights to view the nodeAuthorizationException
- - if the user attempting the operation is not authorized to perform it.RepositoryException
- - if validation error occurs.Property[] getProperties(ID nodeId) throws RepositoryException
nodeId
- - the id for the node.NoSuchNodeException
- - if the node does not exist or the caller has no rights to view the nodeAuthorizationException
- - if the user attempting the operation is not authorized to perform it.RepositoryException
InputStream getPropertyBytes(ID propertyId) throws RepositoryException
propertyId
- - the id for the binary property that contains the binary data. <p/>InputStream
containing the binary data for the given property id. The caller must close the InputStream.NoSuchPropertyException
- - if the Property does not exist if the user attempting the operation is not authorized to perform it.RepositoryException
Set<String> getNativeSortableProperties(String repositoryName) throws RepositoryException
repositoryName
- The name of the repository.AuthorizationException
- - if the user attempting the operation is not authorized to perform it.RepositoryException
- - if validation error occurs.Set<String> getNativeFilterableProperties(String repositoryName) throws RepositoryException
repositoryName
- The name of the repository.AuthorizationException
- - if the user attempting the operation is not authorized to perform it.RepositoryException
- - if validation error occurs.
|
Oracle Fusion Middleware Java API for Oracle WebLogic Portal 10g Release 3 (10.3.2) E14255-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2010, Oracle. All rights reserved.