|
Oracle Fusion Middleware Java API for Oracle WebLogic Portal 10g Release 3 (10.3.4) E14255-03 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface INodeManager
Interface to access and manage content node information in the repository, while honoring security(DA/Visitor) constraints.
Methods returning an ISortableFilterablePagedList
may perform sorting and filtering. See the documentation
in com.bea.content.paging
and Node
.
Note: new methods may be added to this interface periodically -- therefore, this not a good CM extension point.
The recommended extension point is at the Service Provider Interface, in package com.bea.content.spi
.
Method Summary | |
---|---|
Node |
addNode(ContentContext context,
String absPath,
String objectClassName,
Property[] props)
This method adds a new node to a repository. |
Node |
addNode(ContentContext context,
String absPath,
String objectClassName,
Property[] props,
ID workflowId)
This method adds a new node to a repository. |
Node |
copy(ContentContext context,
ID sourceId,
ID destinationParentId)
This method copies a Node and all its descendents to a new location in the node hierarchy. |
Node |
getNode(ContentContext context,
String absPath)
This method retrieves a specific Node based on its absolute path. |
Node |
getNodeByUUID(ContentContext context,
ID nodeId)
This method retrieves a particular Node based on its ID. |
ISortableFilterablePagedList<Node> |
getNodeReferences(ContentContext context,
ID nodeId)
This method retrieve nodes in any federated repositories which have a link property referring to the specified node. |
ISortableFilterablePagedList<Node> |
getNodes(ContentContext context,
ID parentId)
Return all the immediate children of the specified node. |
ISortableFilterablePagedList<Node> |
getNodes(ContentContext context,
ID[] nodeIds)
Retrieve a collection of nodes associated with the array of node id's. |
ISortableFilterablePagedList<Node> |
getNodes(ContentContext context,
ID parentId,
int type)
Deprecated -- use getNodes(ContentContext, ID) |
ISortableFilterablePagedList<Node> |
getNodes(ContentContext context,
String absParentPath)
This method returns all the immediate child Nodes for the given parent Node. |
ISortableFilterablePagedList<Node> |
getNodes(ContentContext context,
String parentPath,
int type)
Deprecated -- use getNodes(ContentContext, String) |
InputStream |
getStream(ContentContext context,
ID nodeId,
String propertyName)
This method retrieves the Binary value data for the given Node and its property. |
boolean |
hasCapability(ContentContext context,
String repositoryName,
Node node,
NodeCapability capability)
Check to see if the caller has the specified SECURITY capability on a node |
boolean |
hasNodeReferences(ContentContext context,
ID nodeId)
This method determines if there are any nodes in any federated repositories (including possibly some nodes which cannot be accessed) that have a link property referring to the specified node. |
Node |
move(ContentContext context,
ID sourceId,
ID destinationId)
This method moves a Node to a new location in the node hierarchy along with all its descendants. |
void |
orderBefore(ContentContext context,
ID srcChildNodeId,
ID destChildNodeId)
If the repository supports child node ordering, and the parent node ObjectClass supports child node ordering, this method inserts the child node at srcChildNodeId before its sibling,
the child node at destChildNodeId , in the child node list. |
void |
remove(ContentContext context,
ID nodeId)
This method performs a full cascade delete on a Node and its children. |
void |
remove(ContentContext context,
String absPath)
This method performs a full cascade delete on a Node and its children. |
void |
removeIfAllowed(ContentContext context,
ID nodeId)
This method performs a full cascade delete on a Node and its children. |
void |
removeIfAllowed(ContentContext context,
String absPath)
This method performs a full cascade delete on a Node and its children. |
Node |
save(ContentContext context,
Node node)
This method updates an existing node in a single transaction. |
Method Detail |
---|
Node addNode(ContentContext context, String absPath, String objectClassName, Property[] props) throws AuthorizationException, NodeExistsException, NoSuchObjectClassException, RepositoryException
NodeFeatureCapability.NodeCreate
capability.
context
- The ContentContext ObjectabsPath
- The absolute path to this node, including the repository name and ending with the node's name.
For example /A/B/C indicates a node C being added under the parent node B in repository A.objectClassName
- The name of the ObjectClass to use. This can be null, meaning there is no
ObjectClass associated with the node. Without an ObjectClass, the node cannot have properties.props
- The properties (and values) of the node. This can be null, even if the 'objectClassName' is
non-null.
AuthorizationException
- - if the user does not have CREATE capability on the parent node, or if the
user does not have INSTANTIATE capability on the ObjectClass of the node. This exception will also be thrown
if the user is not authorizated by the repository.
NodeExistsException
- - if the parent Node already has a child with the same name.
NoSuchObjectClassException
- - if the node's ObjectClass doesn't exist.
RepositoryException
- - for any other exceptionNode addNode(ContentContext context, String absPath, String objectClassName, Property[] props, ID workflowId) throws AuthorizationException, NodeExistsException, NoSuchObjectClassException, RepositoryException
NodeFeatureCapability.NodeCreate
capability.
context
- The ContentContext ObjectabsPath
- The absolute path to this node, including the repository name and ending with the node's name.
For example /A/B/C indicates a node C being added under the parent node B in repository A.objectClassName
- The name of the ObjectClass to use. This can be null, meaning there is no
ObjectClass associated with the node. Without an ObjectClass, the node cannot have properties.props
- The properties (and values) of the node. This can be null, even if the 'objectClassName' is
non-null.workflowId
- Optional workflow Id for the node. Null will cause it to inherit the workflow.
AuthorizationException
- - if the user does not have CREATE capability on the parent node, or if the
user does not have INSTANTIATE capability on the ObjectClass of the node. This exception will also be thrown
if the user is not authorizated by the repository.
NodeExistsException
- - if the parent Node already has a child with the same name.
NoSuchObjectClassException
- - if the node's ObjectClass doesn't exist.
RepositoryException
- - for any other exceptionNode getNodeByUUID(ContentContext context, ID nodeId) throws AuthenticationException, AuthorizationException, NoSuchNodeException, RepositoryException
Binary properties are not contained in the Property's BinaryValue. In order to retrieve the binary value a
call to (@link #getStream} is necessary.
This method requires the caller to have VIEW capability on the node, or the operation will be disallowed
and an exception will be thrown.
Will throw a RepositoryException if the repository specified in the nodeId does not support the
NodeFeatureCapability.NodeRetrieval
capability.
context
- The contentContext objectnodeId
- - the ID for the node to get. Must have both the repositoryName and uid set. Cannot be the
repository root node.
AuthenticationException
- - if the user attempting the operation isn't authenticated against the repository.
This exception will also be thrown if the user is not authorizated by the repository.
NoSuchNodeException
- - if the node to get can't be found, or if the user does not have VIEW capability
on the node
AuthorizationException
- - if the user is not authorizated by the repository.
RepositoryException
- - for any other exceptionISortableFilterablePagedList<Node> getNodes(ContentContext context, ID[] nodeIds) throws RepositoryException
Will throw a RepositoryException if the repository specified in the ID[] does not support the
NodeFeatureCapability.NodeRetrieval
capability.
context
- The ContentContext objectnodeIds
- An array of nodeIds to retrieve
RepositoryException
- - if the operation does not succeed.Node getNode(ContentContext context, String absPath) throws AuthenticationException, AuthorizationException, NoSuchNodeException, RepositoryException
Will throw a RepositoryException if the repository specified in the path does not support the
NodeFeatureCapability.NodeRetrieval
capability.
Throws AuthorizationException if node does not have VIEW capability.
context
- The content context objectabsPath
- - The absolute path to this node, including the repository name and ending with the node's name.
AuthenticationException
- - if the user attempting
the operation isn't authenticated against the repository.
AuthorizationException
- - if the user is not authorizated by the repository.
NoSuchNodeException
- - if the node can't be found, or if the user does not have the VIEW capability on the node..
RepositoryException
- - for any other exceptionISortableFilterablePagedList<Node> getNodes(ContentContext context, ID parentId) throws AuthenticationException, AuthorizationException, NoSuchNodeException, RepositoryException
NodeFeatureCapability.NodeRetrieval
capability.
context
- The contentContext objectparentId
- - the ID for the parent node. Must have both the repositoryName and uid set. Set the uid to null
to fetch children of the repository root node.
AuthenticationException
- - if the user attempting
the operation isn't authenticated against the repository.
AuthorizationException
- - if the user attempting the
operation is not authorized to perform it.
NoSuchNodeException
- - if the nodes can't be found or if the user doesn't have VIEW rights to the parent node.
RepositoryException
- - for any other exceptionISortableFilterablePagedList<Node> getNodes(ContentContext context, ID parentId, int type) throws AuthenticationException, AuthorizationException, NoSuchNodeException, RepositoryException
NodeFeatureCapability.NodeRetrieval
capability.
AuthenticationException
AuthorizationException
NoSuchNodeException
RepositoryException
ISortableFilterablePagedList<Node> getNodes(ContentContext context, String absParentPath) throws AuthenticationException, AuthorizationException, NoSuchNodeException, RepositoryException
NodeFeatureCapability.NodeRetrieval
capability.
context
- The ContentContext objectabsParentPath
- The absolute path from which to retrieve children, including the repository name and
ending with the parent node name.
AuthenticationException
- - if the user attempting
the operation isn't authenticated against the repository.
AuthorizationException
- - if the user attempting the
operation is not authorized to perform it.
NoSuchNodeException
- - if the nodes to get can't be found or it the user doesn't have VIEW rights to the
parent node
RepositoryException
- - for any other exceptionISortableFilterablePagedList<Node> getNodes(ContentContext context, String parentPath, int type) throws AuthenticationException, AuthorizationException, NoSuchNodeException, RepositoryException
NodeFeatureCapability.NodeRetrieval
capability.
AuthenticationException
AuthorizationException
NoSuchNodeException
RepositoryException
void removeIfAllowed(ContentContext context, ID nodeId) throws AuthenticationException, AuthorizationException, NoSuchNodeException, RepositoryException
NodeFeatureCapability.NodeRemove
capability.
context
- The ContentContext objectnodeId
- - the ID representing the node. Must have both the repositoryName and uid set. Cannot be the
repository root node.
AuthenticationException
- - if the user attempting
the operation isn't authenticated against the repository.
AuthorizationException
- - if the user does not have DELETE capabilities on the node
or its children. This exception will also be thrown if the user is not authorizated by the repository.
NoSuchNodeException
- - if a node does not exist or if the user doesn't have VIEW rights to the node
RepositoryException
- - for any other exceptionvoid remove(ContentContext context, ID nodeId) throws AuthenticationException, AuthorizationException, NoSuchNodeException, RepositoryException
NodeFeatureCapability.NodeRemove
capability.
context
- The ContentContext objectnodeId
- - the ID representing the node. Must have both the repositoryName and uid set. Cannot be the
repository root node.
AuthenticationException
- - if the user attempting
the operation isn't authenticated against the repository.
AuthorizationException
- - if user does not have DELETE capabilities on the node.
This exception will also be thrown if the user is not authorizated by the repository.
NoSuchNodeException
- - if the node does not exist or if the user doesn't have VIEW rights to the node.
RepositoryException
- - for any other exceptionvoid remove(ContentContext context, String absPath) throws AuthenticationException, AuthorizationException, NoSuchNodeException, RepositoryException
NodeFeatureCapability.NodeRemove
capability.
context
- The ContentContext objectabsPath
- The absolute path to the node being deleted, including the repository name and the
path within the repository to the node, ie: /MyRepository/a/MyNode
AuthenticationException
- - if the user attempting
the operation isn't authenticated against the repository.
AuthorizationException
- - if the user does not have DELETE capabilities on the node.
NoSuchNodeException
- - if the node does not exist or if the user doesn't have VIEW rights to the node.
RepositoryException
- - for any other exceptionvoid removeIfAllowed(ContentContext context, String absPath) throws AuthenticationException, AuthorizationException, NoSuchNodeException, RepositoryException
NodeFeatureCapability.NodeRemove
capability.
context
- The ContentContext objectabsPath
- The absolute path to the node being deleted, including the repository name and the
path within the repository to the node, ie: /MyRepository/a/MyNode
AuthenticationException
- - if the user attempting
the operation isn't authenticated against the repository.
AuthorizationException
- - if the user attempting the
operation is not authorized to perform it.
NoSuchNodeException
- - if the node does not exist or if the user doesn't have VIEW rights to the parent node.
RepositoryException
- - for any other exception.Node copy(ContentContext context, ID sourceId, ID destinationParentId) throws AuthenticationException, AuthorizationException, NoSuchNodeException, RepositoryException
Each Node will get a new ID, parent ID, new Properties and new children if applicable.
The copy may only be performed within the same repository, therefore the repositoryName must be the same in both the sourceId and the destinationParentId.
The uid must be defined for the sourceId. The repository root node (uid=null or empty string) cannot be used as the sourceId, but can be used as the destinationParentId.
If the repository supports child node ordering, and the destinationParentId node ObjectClass supports child node ordering, this method copies the node tree to the end of the child node list of the destination node. Will throw a RepositoryException if the repository specified in the sourceId or destinationId does not support theNodeFeatureCapability.NodeCopy
capability.
context
- - The ContentContext objectsourceId
- - the ID of the Node to be copied. Must have both the repositoryName and uid set.
Cannot be the repository root node.destinationParentId
- - the ID of the Node under which the sourceId Node (and its descendents) will be copied.
The repositoryName must be defined in the ID and must be the same repositoryId as in sourceId. Can be the
repository root node.
AuthenticationException
- - if the user attempting
the operation isn't authenticated against the repository.
AuthorizationException
- - if the user does not have CREATE capability on the destination.
This exception will also be thrown if the user is not authorizated by the repository.
NoSuchNodeException
- - if the node to copy does not exist or the user doesn't have VIEW rights to this node
RepositoryException
- - for any other exceptionNode move(ContentContext context, ID sourceId, ID destinationId) throws AuthenticationException, AuthorizationException, NoSuchNodeException, RepositoryException
The parent ID for the source node will be changed, but all descendants of the source node will keep their parent relationships intact.
The move may only be performed within the same repository, therefore the repositoryName must be the same in both the sourceId and the destinationId.
The uid must be defined for the sourceId. The repository root node (uid=null or empty string) cannot be used as the sourceId, but can be used as the destinationId. This method throws AuthorizationException if user does not have DELETE capabilities on the node to be moved, or CREATE capabilities on destination. This method does NOT check if the user has DELETE capabilities on the descendants of the source node.
If the repository supports child node ordering, and the destination node ObjectClass supports child node ordering, this method moves the node tree to the end of the child node list of the destination node. Will throw a RepositoryException if the repository specified in the sourceId or destinationId does not support theNodeFeatureCapability.NodeCopy
capability.
context
- - The ContentContext objectsourceId
- - the ID of the Node to be moved. Must have both the repositoryName and uid set.
Cannot be the repository root node.destinationId
- - the ID of the Node under which the sourceId Node is moved. The repositoryName
must be defined in the ID and must be the same repositoryId as in sourceId. Can be the repository root node.
AuthenticationException
- - if the user attempting
the operation isn't authenticated against the repository.
AuthorizationException
- - if user does not have DELETE permission on source or CREATE permission on destination.
NoSuchNodeException
- - if the node does not exist or the user doesn't have VIEW rights to this node
RepositoryException
- - for any other exceptionboolean hasNodeReferences(ContentContext context, ID nodeId) throws AuthorizationException, AuthenticationException, RepositoryException
Will throw a RepositoryException if the repository specified in the nodeId does not support the
TypeFeatureCapability.TypePropertyLink
capability.
context
- - The ContentContext objectnodeId
- - the ID of the Node. Must have both the repositoryName and uid set. Cannot be the repository
root node.
AuthenticationException
- - if the user attempting
the operation isn't authenticated against the repository.
AuthorizationException
- - if the user attempting the
operation is not authorized to perform it.
NoSuchNodeException
- if the node does not exist or the user doesn't have VIEW rights to this node
RepositoryException
- - for any other exceptionISortableFilterablePagedList<Node> getNodeReferences(ContentContext context, ID nodeId) throws AuthenticationException, AuthorizationException, RepositoryException
This will return only nodes for which the caller has the VIEW capability. It's
possible there are additional nodes which the current caller does not have access to,
which refer to the specified node.
To check if any nodes have link properties referring to a node, use hasNodeReferences( );
Will throw a RepositoryException if the repository specified in the nodeId does not support the
TypeFeatureCapability.TypePropertyLink
capability.
context
- - The ContentContext objectnodeId
- - the ID of the Node. Must have both the repositoryName and uid set. Cannot be the repository
root node.
AuthenticationException
- - if the user attempting the
operation is not authenticated to perform it.
NoSuchNodeException
- if the node does not exist or the user doesn't have VIEW rights to this node
AuthorizationException
- - if the user does not have VIEW capabilities on the node.
RepositoryException
- - for any other exceptionInputStream getStream(ContentContext context, ID nodeId, String propertyName) throws AuthenticationException, AuthorizationException, NoSuchPropertyException, RepositoryException
NESTED_DELIMITER
between each parent and child property name.
The delimiter is not valid for use within the actual name, only to seperate the parent/child names.
If the nested property type is multi-valued, then the name passed through should be the indexed name,
which contains an index representing which multivalued property is being referenced.
See Property
indexedName
.
Will throw a RepositoryException if the repository specified in the nodeId does not support the
TypeFeatureCapability.TypePropertyBinary
capability.
nodeId
- - the node Id. Must have both the repositoryName and uid set. Cannot be the repository root
node.propertyName
- - the name for the Property that contains the binary data.
AuthenticationException
- - if the user attempting the
operation is not authenticated to perform it.
NoSuchNodeException
- if the node does not exist or the user doesn't have VIEW rights to this node
AuthorizationException
- if the user is not authorizated by the repository.
NoSuchPropertyException
- - if the Property does not exist.
RepositoryException
void orderBefore(ContentContext context, ID srcChildNodeId, ID destChildNodeId) throws UnsupportedRepositoryOperationException, ConstraintViolationException, NoSuchNodeException, AuthorizationException, RepositoryException
srcChildNodeId
before its sibling,
the child node at destChildNodeId
, in the child node list.
The caller must have UPDATE capability on the parent node, and VIEW capability on both child nodes, which
must be children of the parent node.
To place the node srcChildNodeId
at the end of the list, a destChildNodeId
of null
is used.
If srcChildNodeId
and destChildNodeId
are the same, then no change is made.
If this repository or node do not support child node ordering, then a UnsupportedRepositoryOperationException
is thrown.
If srcChildNodeId
does not exist, then a NoSuchNodeException
is thrown.
If destChildNodeId
is neither null
nor a sibling of srcChildNodeId,
then a NoSuchNodeException
is also thrown.
If this operation would violate a node ObjectClass or implementation-specific constraint,
a ConstraintViolationException
will be thrown.
If the caller does not have UPDATE capability on the parent node, then a AuthorizationException
is thrown.
If the caller does not have VIEW capability on either child node, then a AuthorizationException
is thrown.
Will throw a RepositoryException if the repository specified in the srcChildNodeId does not support the
NodeFeatureCapability.NodeChildNodeReordering
capability.
context
- the ContentContext objectsrcChildNodeId
- the child node to be moved in the ordering. Must have both the repositoryName and
uid set. Cannot be the repository root node.destChildNodeId
- the child node before which the node srcChildNodeId
will be placed, or
null to move the srcChildNode to the last position. If non-null, must have both the
repositoryName and uid set. Cannot be the repository root node.
UnsupportedRepositoryOperationException
- if ordering is not supported.
ConstraintViolationException
- if an implementation-specific constraint is violated
NoSuchNodeException
- if neither child node exists
AuthorizationException
- if the caller does not have UPDATE capability on the node parent,
or VIEW capability on both child nodes.
RepositoryException
- if another error occurs.Node save(ContentContext context, Node node) throws AuthenticationException, AuthorizationException, RepositoryException
Also, the deprecated node type (eg, Node.HIERARCHY) is not reset if the ObjectClass
changes. The user must explicitly reset the node type prior to calling save() if any
internal client logic depends on the node type.
Please note that if the node is library services enabled, this method will
not change any properties of the node. You need to use the VersionManager.save
method to accomplish that.
Will throw a RepositoryException if the repository specified by node.getId() does not support the
NodeFeatureCapability.NodeUpdate
capability.
node
- The node to update with the various changes set accordingly.
AuthenticationException
- - if the user attempting the
operation is not authenticated to perform it.
AuthorizationException
- - if the user does not have UPDATE capability on the node.
This exception will also be thrown if the user is not authorizated by the repository.
RepositoryException
- - for any other exceptionboolean hasCapability(ContentContext context, String repositoryName, Node node, NodeCapability capability) throws AuthorizationException
context
- The ContentContext objectrepositoryName
- The name of the repositorynode
- The node. Null checks at the rootcapability
- The capability to check for.
AuthorizationException
- - if the user attempting the
operation is not authorized to perform it.
|
Oracle Fusion Middleware Java API for Oracle WebLogic Portal 10g Release 3 (10.3.4) E14255-03 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |