|
Copyright © 2006 BEA Systems, Inc. All Rights Reserved | ||||||||
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 placed on them.
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 relPath,
String primaryNodeTypeName,
Property[] props)
This method adds a new node to the repository. |
Node |
copy(ContentContext context,
ID sourceId,
ID destinationId)
This method copies a Node to a new location in the hierarchy along with all its descendants. |
Node |
getNode(ContentContext context,
String path)
This method gets a particular Node based on its path. |
Node |
getNodeByUUID(ContentContext context,
ID nodeId)
This method gets a particular Node based on its ID. |
ISortableFilterablePagedList<Node> |
getNodeReferences(ContentContext context,
ID nodeId)
This method retrieve nodes which have a link property referring to the specified node. |
ISortableFilterablePagedList<Node> |
getNodes(ContentContext context,
ID parentId)
Return all the children of the node. |
ISortableFilterablePagedList<Node> |
getNodes(ContentContext context,
ID[] nodeIds)
Return an node array out of the id's. |
ISortableFilterablePagedList<Node> |
getNodes(ContentContext context,
ID parentId,
int type)
Deprecated -- use getNodes(ContentContext, ID) |
ISortableFilterablePagedList<Node> |
getNodes(ContentContext context,
String parentPath)
This method returns the children 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 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 (including possibly some which cannot be accessed) which 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 hierarchy along with all its descendants. |
void |
remove(ContentContext context,
ID nodeId)
This method performs a full cascade delete on a Node. |
void |
remove(ContentContext context,
String path)
This method performs a full cascade delete on a Node. |
void |
removeIfAllowed(ContentContext context,
ID nodeId)
This method performs a full cascade delete on a Node. |
void |
removeIfAllowed(ContentContext context,
String path)
This method performs a full cascade delete on a Node. |
Node |
save(ContentContext context,
Node node)
This method updates an existing node in a single transaction. |
Method Detail |
---|
Node addNode(ContentContext context, String relPath, String primaryNodeTypeName, Property[] props) throws AuthorizationException, NodeExistsException, NoSuchObjectClassException, RepositoryException
context
- The ContentContext ObjectrelPath
- The absolute path to this node, appended with the node's name. For example /A/B/C indicates a
node C being added under the parent node B.primaryNodeTypeName
- The type name of the node to create.props
- The properties of the node
AuthorizationException
- - if the user does not have CREATE capability on the parent node, or if the user does not have
INSTANTIATE capability on the type 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
If a Property is Binary, then the bytes will not be contained in the BinaryValue. In order to get the bytes a call to (@link #getStream} is necessary. Before retrieving the node it will see if the node has VIEW capability on it. If the capability is not set, the method will disallow the operation & throw an exception.
context
- The contentContext objectnodeId
- - the ID for the node to get. The ID must include the repository and uid.
AuthenticationException
- - if the user attempting the operation isn't authenticated against the repository.
AuthorizationException
- - if the user does not have VIEW capability on the node
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.
RepositoryException
- - for any other exceptionISortableFilterablePagedList<Node> getNodes(ContentContext context, ID[] nodeIds) throws RepositoryException
context
- The ContentContext objectnodeIds
- An array of nodeIds
RepositoryException
- - if the operation does not succeed.Node getNode(ContentContext context, String path) throws AuthenticationException, AuthorizationException, NoSuchNodeException, RepositoryException
context
- The content context objectpath
- - The absolute path to this node, appended with the node's name.
AuthenticationException
- - if the user attempting
the operation isn't authenticated against the repository.
AuthorizationException
- - if the user does not have the VIEW capability on the node.
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.
RepositoryException
- - for any other exceptionISortableFilterablePagedList<Node> getNodes(ContentContext context, ID parentId) throws AuthenticationException, AuthorizationException, NoSuchNodeException, RepositoryException
parentId
-
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
RepositoryException
- - for any other exceptionISortableFilterablePagedList<Node> getNodes(ContentContext context, ID parentId, int type) throws AuthenticationException, AuthorizationException, NoSuchNodeException, RepositoryException
AuthenticationException
AuthorizationException
NoSuchNodeException
RepositoryException
ISortableFilterablePagedList<Node> getNodes(ContentContext context, String parentPath) throws AuthenticationException, AuthorizationException, NoSuchNodeException, RepositoryException
context
- The ContentContext objectparentPath
- The path from which to get the children of.
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
RepositoryException
- - for any other exceptionISortableFilterablePagedList<Node> getNodes(ContentContext context, String parentPath, int type) throws AuthenticationException, AuthorizationException, NoSuchNodeException, RepositoryException
AuthenticationException
AuthorizationException
NoSuchNodeException
RepositoryException
void removeIfAllowed(ContentContext context, ID nodeId) throws AuthenticationException, AuthorizationException, NoSuchNodeException, RepositoryException
context
- The ContentContext objectnodeId
- The nodeId representing the 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 the nodes does not exist
RepositoryException
- - for any other exceptionvoid remove(ContentContext context, ID nodeId) throws AuthenticationException, AuthorizationException, NoSuchNodeException, RepositoryException
context
- The ContentContext objectnodeId
- The nodeId representing the 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.
RepositoryException
- - for any other exceptionvoid remove(ContentContext context, String path) throws AuthenticationException, AuthorizationException, NoSuchNodeException, RepositoryException
context
- The ContentContext objectpath
- The path to the node being deleted ie: /MyRepository/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
RepositoryException
- - for any other exceptionvoid removeIfAllowed(ContentContext context, String path) throws AuthenticationException, AuthorizationException, NoSuchNodeException, RepositoryException
context
- The ContentContext objectpath
- The path to the node being deleted ie: /MyRepository/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.
RepositoryException
- - for any other exception.Node copy(ContentContext context, ID sourceId, ID destinationId) 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 destinationId.
The uid must be defined for the sourceId, but if the uid is null for the destinationId, the desination will be the repository root.
context
- - The ContentContext objectsourceId
- - the ID of the Node to be copied. Both
the repositoroyName and the uid must be defined in the ID.destinationId
- - the ID of the Node under which
the sourceId Node is copied. The repositoryName must
be defined in the ID. If the uid is null, the destination
will be the repository root.
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
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, but if the uid is null for the destinationId, the desination will be the repository root. 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.
context
- - The ContentContext objectsourceId
- - the ID of the Node to be moved.destinationId
- - the ID of the Node under which
the sourceId Node is moved.
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
RepositoryException
- - for any other exceptionboolean hasNodeReferences(ContentContext context, ID nodeId) throws AuthorizationException, AuthenticationException, RepositoryException
context
- - The ContentContext objectnodeId
- - the ID of the 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.
RepositoryException
- - for any other exceptionISortableFilterablePagedList<Node> getNodeReferences(ContentContext context, ID nodeId) throws AuthenticationException, AuthorizationException, RepositoryException
context
- - The ContentContext objectnodeId
- - the ID of the node
AuthenticationException
- - if the user attempting the
operation is not authenticated to perform it.
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
.
nodeId
- - the node IdpropertyName
- - the name for the Property that contains the binary data.
AuthenticationException
- - if the user attempting the
operation is not authenticated to perform it.
AuthorizationException
- if the user does not have VIEW capabilities on the node.
This exception will also be thrown if the user is not authorizated by the repository.
NoSuchPropertyException
- - if the Property does not exist.
RepositoryException
Node save(ContentContext context, Node node) throws AuthenticationException, AuthorizationException, RepositoryException
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.
|
Copyright © 2006 BEA Systems, Inc. All Rights Reserved | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |