Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2008 BEA Systems, Inc. All Rights Reserved
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.portal.tools.content.controls
Interface ContentNodeControl

    @ControlInterface
    public interface ContentNodeControl

Control to represent interface to node methods in content mgmt system.

Nested Class Summary
`static class` | `ContentNodeControl.NodeType`

Method Summary
`Node` | `addNode(ContentContext context, int type, String parentPath, String newNodeName)` Deprecated Use `addNode(ContentContext, String, String)`
`Node` | `addNode(ContentContext context, int type, String parentPath, String newNodeName, String objectClassName, Property[] properties)` Deprecated Use `addNode(ContentContext, String, String, String, Property[])`
`Node` | `addNode(ContentContext context, String parentPath, String newNodeName)` Create a typeless Node in the repository.
`Node` | `addNode(ContentContext context, String parentPath, String newNodeName, String objectClassName, Property[] properties)` Create a Node in the repository.
`Node` | `addNode(ContentContext context, String parentPath, String newNodeName, String objectClassName, Property[] properties, ID workflowId)` This method adds a new node to the repository.
`Node` | `copy(ContentContext context, ID sourceId, ID destinationId)` Copy a node.
`Node` | `getNode(ContentContext context, String path)` Get a node by path.
`Node` | `getNodeByUUID(ContentContext context, ID nodeId)` This method gets a particular Node based on its ID.
`ISortableFilterablePagedList<Node>` | `getNodeReferences(ContentContext context, ID nodeId)` Retrieve nodes which have a link property referring to the specified node.
`SortableFilterablePagedResult<Node>` | `getNodes(ContentContext context, ID parentId)` Return all the children of the node.
`SortableFilterablePagedResult<Node>` | `getNodes(ContentContext context, ID parentId, int type)` Deprecated Use `getNodes(ContentContext, ID)`.
`SortableFilterablePagedResult<Node>` | `getNodesWithNestedDACheck(ContentContext context, ID parentId)` Return all the children of the node.
`ObjectClass` | `getObjectClassFromNode(Node node, boolean repoIsManaged, javax.servlet.http.HttpServletRequest request)` The only time you can get the ObjectClass directly from Node.getObjectClass() is when the node has published content.
`InputStream` | `getStream(ContentContext context, ID nodeId, String propertyName)` Gets the Binary data for the given Node and its property.
`String` | `getTaxonomy(Node node)` Return the taxonomy of the node used by the DA System.
`boolean` | `hasBrowseCapability(ContentContext context, String repositoryName, Node node)` Check to see if the given node hasBrowseCapability for the current user.
`boolean` | `hasCreateCapability(ContentContext context, String repositoryName, Node node)` Check to see if the given node hasCreateCapability
`boolean` | `hasDeleteCapability(ContentContext context, String repositoryName, Node node)` Check to see if the given node hasDeleteCapability for the current user.
`boolean` | `hasNodeReferences(ContentContext context, ID nodeId)` Determines if there are any nodes (including possibly some which cannot be accessed) which have a link property referring to the specified node.
`boolean` | `hasUpdateCapability(ContentContext context, String repositoryName, Node node)` Check to see if the given node hasUpdateCapability for the current user.
`boolean` | `hasViewCapability(ContentContext context, String repositoryName, Node node)` Check to see if the given node hasViewCapability for the current user.
`boolean` | `isANewContentNode(ContentContext context, ID id, boolean hasVirtualNode)` Check whether or not a node has ever been published.
`boolean` | `isHierarchyNode(Node node, boolean repoIsManaged, javax.servlet.http.HttpServletRequest request)` Determine if the given `Node` is a folder node.
`Node` | `move(ContentContext context, ID sourceId, ID destinationId)` Move a node.
`void` | `orderBefore(ContentContext context, ID srcId, ID destId)` JSR-170 child node ordering
`void` | `remove(ContentContext context, ID nodeId)` Delete a node from the system.
`Node` | `save(ContentContext context, Node node)` This method updates an existing node in a single transaction.

Method Detail

### addNode

    Node addNode(ContentContext context,
                 int type,
                 String parentPath,
                 String newNodeName)
                 throws RepositoryException,
                        NodeExistsException,
                        AuthorizationException,
                        NoSuchObjectClassException

  Deprecated Use `addNode(ContentContext, String, String)`

  Create a Node in the repository. This operation will honor the DA capabilities set on the parent node. For example, if the user does not have CREATE capabilities on the parent node, the operation might fail.

  Parameters
    `context` - The ContentContext Object
    `type` - The type of node - can be Node.HIERARCHY or Node.CONTENT
    `parentPath` - The path to the parent of the new node to create.
    `newNodeName` - The name of the node
  Returns
    The newly created node.
  Throws
    `RepositoryException`
    `NodeExistsException`
    `AuthorizationException`
    `NoSuchObjectClassException`

### addNode

    Node addNode(ContentContext context,
                 String parentPath,
                 String newNodeName)
                 throws RepositoryException,
                        NodeExistsException,
                        AuthorizationException,
                        NoSuchObjectClassException

  Create a typeless Node in the repository. This operation will honor the DA capabilities set on the parent node. For example, if the user does not have CREATE capabilities on the parent node, the operation might fail.

  Parameters
    `context` - The ContentContext Object
    `parentPath` - The path to the parent of the new node to create.
    `newNodeName` - The name of the node
  Returns
    The newly created node.
  Throws
    `RepositoryException`
    `NodeExistsException`
    `AuthorizationException`
    `NoSuchObjectClassException`

### addNode

    Node addNode(ContentContext context,
                 int type,
                 String parentPath,
                 String newNodeName,
                 String objectClassName,
                 Property[] properties)
                 throws RepositoryException,
                        AuthorizationException,
                        NodeExistsException,
                        NoSuchObjectClassException

  Deprecated Use `addNode(ContentContext, String, String, String, Property[])`

  Create a Node in the repository. This operation will honor the DA capabilities set on the parent node. For example, if the user does not have CREATE capabilities on the parent node, the operation might fail. If the repository is a managed repository, it will also check out the node for the user.

  Parameters
    `context` - The ContentContext Object
    `type` - The type of node
    `parentPath` - The path to the parent of the new node to create.
    `newNodeName` - The name of the node
    `objectClassName` - The object class name to be associated with the node.
    `properties` - The properties of the node.
  Returns
    The newly created node. The returned VirtualNode will have all the objectClass information and the properties of the node in the getCurrentVersion() method - irrespective of whether the node is for a managed repository or not.
  Throws
    `RepositoryException`
    `AuthorizationException`
    `NodeExistsException`
    `NoSuchObjectClassException`

### addNode

    Node addNode(ContentContext context,
                 String parentPath,
                 String newNodeName,
                 String objectClassName,
                 Property[] properties)
                 throws RepositoryException,
                        AuthorizationException,
                        NodeExistsException,
                        NoSuchObjectClassException

  Create a Node in the repository. This operation will honor the DA capabilities set on the parent node. For example, if the user does not have CREATE capabilities on the parent node, the operation might fail. If the repository is a managed repository, it will also check out the node for the user.

  Parameters
    `context` - The ContentContext Object
    `parentPath` - The path to the parent of the new node to create.
    `newNodeName` - The name of the node
    `objectClassName` - The object class name to be associated with the node.
    `properties` - The properties of the node.
  Returns
    The newly created node. The returned VirtualNode will have all the objectClass information and the properties of the node in the getCurrentVersion() method - irrespective of whether the node is for a managed repository or not.
  Throws
    `RepositoryException`
    `AuthorizationException`
    `NodeExistsException`
    `NoSuchObjectClassException`

### addNode

    Node addNode(ContentContext context,
                 String parentPath,
                 String newNodeName,
                 String objectClassName,
                 Property[] properties,
                 ID workflowId)
                 throws AuthorizationException,
                        NodeExistsException,
                        NoSuchObjectClassException,
                        RepositoryException

  This method adds a new node to the repository. This operation will honor the security capabilities set on the parent node. For example, if the user does not have CREATE capabilities on the parent node, or INSTANTIATE capabilities on the type of the node, the operation might fail.

  If the repository supports child node ordering, and the parent node type supports child node ordering, this method creates the new child node at the end of the child node list.

  Parameters
    `context` - The ContentContext Object
    `parentPath` - The path to the parent of the new node to create.
    `newNodeName` - The name of the node
    `objectClassName` - The type name of the node to create.
    `properties` - The properties of the node
    `workflowId` - Optional workflow Id for the node. Null will cause it to inherit the workflow.
  Returns
    The newly created node.
  Throws
    `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 exception

### getNodeByUUID

    Node getNodeByUUID(ContentContext context,
                       ID nodeId)
                       throws RepositoryException,
                              AuthorizationException,
                              AuthenticationException,
                              NoSuchNodeException

  This method gets a particular Node based on its ID. If there is an ObjectClass associated with it then it along with the Node Properties will be contained in the Node.

  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 #getPropertyBytes} is necessary.

  The Node Cache will be checked first before going to the spi to retrieve the Node.

  Before retrieving the node it will see if the node has BROWSE & the VIEW capability on it. If either one of them is not set, it'll throw an exception.

  Parameters
    `context` - The contentContext object
    `nodeId` - - the ID for the node to get. The ID must include the repository and uid.
  Returns
    Node - the retrieved Node.
  Throws
    `RepositoryException`
    `AuthorizationException`
    `AuthenticationException`
    `NoSuchNodeException`

### getNode

    Node getNode(ContentContext context,
                 String path)
                 throws RepositoryException,
                        AuthorizationException,
                        NoSuchNodeException

  Get a node by path. throws RepositoryException, AuthorizationException if node does not have VIEW / BROWSE capabilities.

  Parameters
    `context` - The content context object
    `path` -
  Returns
    The virtual node
  Throws
    `RepositoryException`
    `AuthorizationException`
    `NoSuchNodeException`

### getNodes

    SortableFilterablePagedResult<Node> getNodes(ContentContext context,
                                                 ID parentId)
                                                 throws RepositoryException,
                                                        AuthorizationException,
                                                        NoSuchNodeException,
                                                        AuthenticationException

  Return all the children of the node. This will return only the children that have the BROWSE capability set on them. It will throw an exception if the Node represented by parentId does not have BROWSE capability set on it.

  Parameters
    `parentId` -
  Returns
    A PagedResult which allows users to iterate through the nodes.
  Throws
    `RepositoryException`
    `AuthorizationException`
    `NoSuchNodeException`
    `AuthenticationException`

### getNodesWithNestedDACheck

    SortableFilterablePagedResult<Node> getNodesWithNestedDACheck(ContentContext context,
                                                                  ID parentId)
                                                                  throws RepositoryException,
                                                                         AuthorizationException,
                                                                         NoSuchNodeException,
                                                                         AuthenticationException

  Return all the children of the node. This will return all children, both that are directly viewable, and those that have children of their own that may be viewable. It is up to the caller to then check if the user has direct access to each returned node.

  Parameters
    `parentId` -
  Returns
    A PagedResult which allows users to iterate through the nodes.
  Throws
    `RepositoryException`
    `AuthorizationException`
    `NoSuchNodeException`
    `AuthenticationException`

### getNodes

    SortableFilterablePagedResult<Node> getNodes(ContentContext context,
                                                 ID parentId,
                                                 int type)
                                                 throws RepositoryException,
                                                        AuthorizationException,
                                                        NoSuchNodeException,
                                                        AuthenticationException

  Deprecated Use `getNodes(ContentContext, ID)`.

  Returns the children of the provided parent node.

  Parameters
    `context` - The ContentContext object
    `parentId` - The parentId
    `type` - The type of child - Node.HIERARACHY or Node.CONTENT
  Returns
    The pagedResult containing nodes.
  Throws
    `RepositoryException`
    `AuthorizationException`
    `NoSuchNodeException`
    `AuthenticationException`

### getStream

    InputStream getStream(ContentContext context,
                          ID nodeId,
                          String propertyName)
                          throws AuthenticationException,
                                 AuthorizationException,
                                 NoSuchPropertyException,
                                 RepositoryException

  Gets the Binary data for the given Node and its property. This method returns the binary data of the property of the PUBLISHED node [if you have a versioning enabled repository] After calling this method and retrieving the InputStream, you must close the InputStream when finished reading it in a finally block. If this is a nested property type, the name will reflect the nested hierarchy with `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`.

  Parameters
    `nodeId` - - the node Id
    `propertyName` - - the name for the Property that contains the binary data.
  Returns
    InputStream - the binary data.
  Throws
    `AuthenticationException`
    `AuthorizationException` - if the user does not have VIEW capabilities on the node.
    `NoSuchPropertyException` - - if the Property does not exist.
    `RepositoryException`

### remove

    void remove(ContentContext context,
                ID nodeId)
                throws RepositoryException,
                       AuthorizationException,
                       NoSuchNodeException,
                       AuthenticationException

  Delete a node from the system. This method also recursively deletes child nodes of the given node. Throws RepositoryException, AuthorizationException if user does not have CAN_DELETE capabilities.

  Parameters
    `context` -
    `nodeId` -
  Throws
    `RepositoryException`
    `AuthorizationException`
    `NoSuchNodeException`
    `AuthenticationException`

### copy

    Node copy(ContentContext context,
              ID sourceId,
              ID destinationId)
              throws RepositoryException,
                     AuthorizationException,
                     NoSuchNodeException,
                     AuthenticationException

  Copy a node. Throws exception if not allowed.

  Parameters
    `sourceId` -
    `destinationId` -
  Throws
    `RepositoryException`
    `AuthorizationException`
    `NoSuchNodeException`
    `AuthenticationException`

### move

    Node move(ContentContext context,
              ID sourceId,
              ID destinationId)
              throws RepositoryException,
                     AuthorizationException,
                     NoSuchNodeException,
                     AuthenticationException

  Move a node. Will throw exception if user does not have DELETE permission on source or CREATE permission on destination.

  Parameters
    `context` -
    `sourceId` -
    `destinationId` -
  Throws
    `RepositoryException`
    `AuthorizationException`
    `NoSuchNodeException`
    `AuthenticationException`

### hasNodeReferences

    boolean hasNodeReferences(ContentContext context,
                              ID nodeId)
                              throws AuthorizationException,
                                     AuthenticationException,
                                     RepositoryException

  Determines if there are any nodes (including possibly some which cannot be accessed) which have a link property referring to the specified node.

  Parameters
    `context` -
    `nodeId` -
  Returns
    boolean
  Throws
    `AuthorizationException`
    `AuthenticationException`
    `RepositoryException`

### getNodeReferences

    ISortableFilterablePagedList<Node> getNodeReferences(ContentContext context,
                                                         ID nodeId)
                                                         throws AuthenticationException,
                                                                AuthorizationException,
                                                                RepositoryException

  Retrieve nodes which have a link property referring to the specified node. The returned nodes only reflect those the current caller has access to. 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( );

  Parameters
    `context` -
    `nodeId` -
  Returns
    ISortableFilterablePagedList
  Throws
    `AuthorizationException`
    `AuthenticationException`
    `RepositoryException`

### hasCreateCapability

    boolean hasCreateCapability(ContentContext context,
                                String repositoryName,
                                Node node)
                                throws AuthorizationException

  Check to see if the given node hasCreateCapability

  Parameters
    `context` - The ContentContext object
    `repositoryName` - The name of the content repository
    `node` - The node
  Returns
    true or false depending on whether the node has the capability or not.
  Throws
    `AuthorizationException`

### hasDeleteCapability

    boolean hasDeleteCapability(ContentContext context,
                                String repositoryName,
                                Node node)
                                throws AuthorizationException

  Check to see if the given node hasDeleteCapability for the current user.

  Parameters
    `context` - The ContentContext object
    `repositoryName` - The name of the content repository
    `node` - The node
  Returns
    true or false depending on whether the node has the capability or not.
  Throws
    `AuthorizationException`

### hasViewCapability

    boolean hasViewCapability(ContentContext context,
                              String repositoryName,
                              Node node)
                              throws AuthorizationException

  Check to see if the given node hasViewCapability for the current user.

  Parameters
    `context` - The ContentContext object
    `repositoryName` - The name of the content repository
    `node` - The node
  Returns
    true or false depending on whether the node has the capability or not.
  Throws
    `AuthorizationException`

### hasUpdateCapability

    boolean hasUpdateCapability(ContentContext context,
                                String repositoryName,
                                Node node)
                                throws AuthorizationException

  Check to see if the given node hasUpdateCapability for the current user.

  Parameters
    `context` - The ContentContext object
    `repositoryName` - The name of the content repository
    `node` - The node
  Returns
    true or false depending on whether the node has the capability or not.
  Throws
    `AuthorizationException`

### hasBrowseCapability

    boolean hasBrowseCapability(ContentContext context,
                                String repositoryName,
                                Node node)
                                throws AuthorizationException

  Check to see if the given node hasBrowseCapability for the current user.

  Parameters
    `context` - The ContentContext object
    `repositoryName` - The name of the content repository
    `node` - The node
  Returns
    true or false depending on whether the node has the capability or not.
  Throws
    `AuthorizationException`

### getTaxonomy

    String getTaxonomy(Node node)

  Return the taxonomy of the node used by the DA System.

  Parameters
    `node` - The node object If node is null, it will return the taxonomy of the repository root.
  Returns
    The taxonomy

### isANewContentNode

    boolean isANewContentNode(ContentContext context,
                              ID id,
                              boolean hasVirtualNode)
                              throws RepositoryException

  Check whether or not a node has ever been published. A new node which exists in the virtual node layer and has never been published will return true. This is only used when library services are enabled.

  Parameters
    `context` -
    `id` -
    `hasVirtualNode` - true if the node has a virtual node, false if not
  Throws
    `RepositoryException`

### save

    Node save(ContentContext context,
              Node node)
              throws AuthenticationException,
                     AuthorizationException,
                     RepositoryException

  This method updates an existing node in a single transaction. The changed node attributes will be updated accordingly, including changed properties. This is a less granular way of performing similar actions like addNodeContent, moveNode, renameNode, and updateProperties. Additionally this provides access to modify a node's lifecycle status and lifecycle id. The node is assumed to be retrieved from this API and therefore properly formed when this call is made. Therefore if this method is called and some property values are not specified, those property values will be made null. The following node attributes cannot be modified via this API. created by, created date, modified by, modified date and path (modifying the parent will cause the node path to be updated properly). 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.

  Parameters
    `node` - The node to update with the various changes set accordingly.
  Returns
    The updated node
  Throws
    `AuthenticationException`
    `AuthorizationException`
    `RepositoryException`

### getObjectClassFromNode

    ObjectClass getObjectClassFromNode(Node node,
                                       boolean repoIsManaged,
                                       javax.servlet.http.HttpServletRequest request)
                                       throws NoSuchNodeException,
                                              AuthenticationException,
                                              AuthorizationException,
                                              NoSuchObjectClassException,
                                              RepositoryException

  The only time you can get the ObjectClass directly from Node.getObjectClass() is when the node has published content. If you try to get the ObjectClass directly from Node.getObjectClass() and the Node does not have published content, the ObjectClass will be null. If the node does not have published content then you have to get the ObjectClass from the VirtualNode. If library services are not enabled then there is no VirtualNode.

  Parameters
    `node` -
    `repoIsManaged` -
    `request` -
  Throws
    `NoSuchNodeException`
    `AuthenticationException`
    `AuthorizationException`
    `NoSuchObjectClassException`
    `RepositoryException`

### isHierarchyNode

    boolean isHierarchyNode(Node node,
                            boolean repoIsManaged,
                            javax.servlet.http.HttpServletRequest request)
                            throws RepositoryException

  Determine if the given `Node` is a folder node.

  Parameters
    `node` - the `Node`
  Returns
    `true` if the the given `Node` or is a folder node and `false` otherwise
  Throws
    `RepositoryException`

### orderBefore

    void orderBefore(ContentContext context,
                     ID srcId,
                     ID destId)
                     throws ConstraintViolationException,
                            NoSuchNodeException,
                            AuthorizationException,
                            RepositoryException

  JSR-170 child node ordering

  Parameters
    `context` - ContentContext
    `srcId` - the ID of the source node, that is being moved
    `destId` - the ID of the destination node, before which the src node is being moved to
  Throws
    `ConstraintViolationException`
    `NoSuchNodeException`
    `AuthorizationException`
    `RepositoryException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008 BEA Systems, Inc. All Rights Reserved