|
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 As of 10.2, replaced by NodeOpsV1
. The SPI interfaces in the com.bea.content.spi package have all been deprecated as of 10.2. Oracle does not intend to remove these interfaces during the next major release of WebLogic Portal. However, please note that new development should take place using the com.bea.content.spi.flexspi interfaces going forward.
@Deprecated
public interface NodeOps
NodeOps is a service for Node CRUD operations. It is used to manage nodes, including their Properties, in a content repository.
NodeOps rules are defined below.
All nodes are uniquely identified through:
All Properties are identified through their ID, which includes the uid that uniquely identifies the Property in the repository.
A Node may either be a Content Node or a Hierarchy Node as defined by its type. A Hierarchy Node may contain both Hierarchy and Content Nodes, but a Conent Node may only contain other Content Nodes.
Node names must not contain either forward, or backslashes.
If a node contains an ObjectClass, it will also contain a Property for each PropertyDefinition of its ObjectClass and each Property will be in the shape as defined by its corresponding PropertyDefinition.
Most operations use ID objects as parameters. Whenever an ID is used, it must not be null. The uid may be null when dealing with root. For example a call to getNodeChildren(ID id) with a correct repository name and a null uid will return all Nodes at root for that repository. It may also be null on create operations, in which the uid has not been created yet, but will be created and returned by the repository.
The repository implementation may have more specific validation rules than that defined above. If a repository considers an attempted operation invalid, it will throw a RepositoryException.
If a Node has an ObjectClass associated with it, whenever it is retrieved it must contain the ObjectClass. However, the Node Properties need not be present as they may be lazy loaded by the call to getProperties() on the Node. For the getNode implementations, it is best to initially set the Properties on the return.
ExtendedNodeOps
Method Summary | |
---|---|
Node |
addNodeContent(ID nodeId, ID objectClassId, Property[] properties) Deprecated Updates the node with the given id to contain the given objectClass and properties (content and meta-content). |
Node |
copyNode(ID sourceId, ID destinationId) Deprecated This method copies a Node to a new location in the hierarchy along with all its descendants. |
Node |
createNode(ID parentId, String newNodeName, int type) Deprecated This method creates a new Node underneath the parent. |
Node |
createNode(ID parentId, String newNodeName, int type, ID objectClassId, Property[] properties) Deprecated This method creates a new Node underneath the parent. |
void |
deleteNode(ID nodeId) Deprecated This method performs a full cascade delete on a Node. |
Node |
getNode(ID nodeId) Deprecated This method gets a particular Node based on its id. |
Node |
getNode(String path) Deprecated This method gets a particular Node based on its path. |
Node[] |
getNodeChildren(ID parentId, int type) Deprecated This method returns an array of all children Nodes for the parent Node. |
Node[] |
getNodes(ID[] nodeIds) Deprecated This method gets the Node for each node ID passed in. |
Property[] |
getProperties(ID nodeId) Deprecated Gets all Properties for a Node. |
InputStream |
getPropertyBytes(ID propertyId) Deprecated Gets the Binary data for the given Property Id. |
Node |
moveNode(ID sourceId, ID destinationId) Deprecated This method moves a Node to a new location in the hierarchy along with all its descendants. |
Node |
removeNodeContent(ID nodeId) Deprecated Removes the ObjectClass reference from the given Node and deletes the Node's properties. |
Node |
renameNode(ID nodeId, String newName) Deprecated This method renames a node and implicitly all of its descendants paths. |
Node |
updateProperties(ID nodeId, Property[] properties) Deprecated Updates the node with the given id with the given properties. |
Method Detail |
---|
Node createNode(ID parentId, String newNodeName, int type) throws AuthorizationException, NodeExistsException, RepositoryException
parentId
- - the id for the parent of the node. The uid is null if the parent is root.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.NodeExistsException
- - if the name for the node already exists as a child of the parent.RepositoryException
- - if validation error occurs.Node createNode(ID parentId, String newNodeName, int type, ID objectClassId, Property[] properties) throws AuthorizationException, NodeExistsException, NoSuchObjectClassException, RepositoryException
parentId
- - the id for the parent of the node. The parentId's uid is null if the parent is root.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.objectClassId
- The ID of the ObjectClass to use. This can be null, meaning there is no type associated with the node. Without a type, the node cannot have properties.properties
- The properties (and values) of the node. This can be null, even if the 'objectClassId' is non-null.AuthorizationException
NodeExistsException
- - 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 getNode(ID nodeId) throws AuthorizationException, NoSuchNodeException
nodeId
- - the id for the node to get.AuthorizationException
- - if the user attempting the operation is not authorized to perform it.NoSuchNodeException
- - if the node to get can't be found.Node getNode(String path) throws AuthorizationException, NoSuchNodeException
path
- - the path for the node to get.AuthorizationException
- - if the user attempting the operation is not authorized to perform it.NoSuchNodeException
- - if the node to get can't be found.Node[] getNodes(ID[] nodeIds) throws AuthorizationException, NoSuchNodeException
nodeIds
- - the Node IDs to retrieve the Nodes for.AuthorizationException
- - if the user attempting the operation is not authorized to perform it.NoSuchNodeException
- - if a node to get can't be found.Node[] getNodeChildren(ID parentId, int type) throws AuthorizationException, NoSuchNodeException
parentId
- - the Node which may have childrentype
- - 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.AuthorizationException
- - if the user attempting the operation is not authorized to perform it.NoSuchNodeException
- - if the parent node can't be found.void deleteNode(ID nodeId) throws AuthorizationException, NoSuchNodeException, RepositoryException
nodeId
- - the id of the Node to be deletedAuthorizationException
- - if the user attempting the operation is not authorized to perform it.NoSuchNodeException
- - if the node to delete can't be found.RepositoryException
- - if validation error occurs.Node moveNode(ID sourceId, ID destinationId) throws AuthorizationException, NodeExistsException, NoSuchNodeException, RepositoryException
A Hierarchy Node may only be moved under another Hierarchy Node. The parent id for the source node will be changed, but all descendants of the source node will keep their parent relationships intact.
If the uid is null for the destinationId, the desination will be the repository root.
sourceId
- - the id of the Node to be moveddestinationId
- - the id of the Node under which the sourceId Node is movedAuthorizationException
- - if the user attempting the operation is not authorized to perform it.NodeExistsException
- - if attempting to move a Node to a path that already exists.NoSuchNodeException
- - if the source or destination node can't be found.RepositoryException
- - if validation error occurs.Node copyNode(ID sourceId, ID destinationId) throws AuthorizationException, NoSuchNodeException, RepositoryException
Each Node will get a new Id, parent id and new Properties.
If the uid is null for the destinationId, the desination will be the repository root.
sourceId
- - the id of the Node to be copieddestinationId
- - the id of the Node under which the sourceId Node is copiedAuthorizationException
- - if the user attempting the operation is not authorized to perform it.NoSuchNodeException
- - if the source or destination node can't be found.RepositoryException
- - if validation error occurs.Node renameNode(ID nodeId, String newName) throws AuthorizationException, NoSuchNodeException, NodeExistsException, RepositoryException
nodeId
- - the id for the node to renamenewName
- - a String for the new node nameAuthorizationException
- - if the user attempting the operation is not authorized to perform it.NoSuchNodeException
- - if the node to rename can't be found.NodeExistsException
- - if the newName already exists as a sibling.RepositoryException
- - if validation error occurs.Node addNodeContent(ID nodeId, ID objectClassId, Property[] properties) throws AuthorizationException, NoSuchObjectClassException, NoSuchNodeException, RepositoryException
nodeId
- - the ID for the node to update.objectClassId
- The ID of the ObjectClass to use. This can be null, meaning there is no type associated with the node. Without a type, the node cannot have properties.properties
- The properties (and values) of the node. This can be null, even if the 'objectClassId' is non-null.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.RepositoryException
- - if validation error occurs.Node updateProperties(ID nodeId, Property[] properties) throws AuthenticationException, AuthorizationException, NoSuchNodeException, NoSuchPropertyException, RepositoryException
nodeId
- - the ID of the node to update. The ID must include the repositoryName.properties
- - the properties to update on 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.NoSuchNodeException
- - if the Node to update does not exist.NoSuchPropertyException
- - if a Property does not exist on the Node.RepositoryException
- - if system or validation error occurs.Node removeNodeContent(ID nodeId) throws AuthorizationException, NoSuchNodeException, RepositoryException
nodeId
- - the id for the Node to remove the ObjectClass from.AuthorizationException
- - if the user attempting the operation is not authorized to perform it.NoSuchNodeException
- if the node does not exist.RepositoryException
- - if validation error occurs.Property[] getProperties(ID nodeId) throws AuthorizationException, NoSuchNodeException
nodeId
- - the id for the node.AuthorizationException
- - if the user attempting the operation is not authorized to perform it.NoSuchNodeException
- - if the node can't be found.InputStream getPropertyBytes(ID propertyId) throws AuthorizationException, NoSuchPropertyException
propertyId
- - the id for the Property that contains the binary data.InputStream
containing the binary data for the given property id.AuthorizationException
- - if the user attempting the operation is not authorized to perform it.NoSuchPropertyException
- - if the Property does not exist.
|
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.