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

## com.bea.content.federated
Interface IVersionManager

    public interface IVersionManager

Interface to manage content node versions in the content system.

Methods returning an `ISortableFilterablePagedList` may perform sorting and filtering. See the documentation in `com.bea.content.paging`, `VirtualNode` and `Version`.

Note: new methods may be added to this interface periodically -- therefore, this is not a good CM extension point. The recommended extension point is at the Service Provider Interface, in package com.bea.content.spi

This interface is intended to be implemented only by BEA Weblogic Portal.BEA Systems reserves the right to add abstract methods to this interface without notice. Implementations of this interface by other parties must not be expected to compile without change in future versions of BEA Weblogic Portal.

Method Summary
`void` | `checkIn(ContentContext context, ID nodeId, VersionableContent content)` Checks in the the specified version of the node with the specified id.
`VirtualNode` | `checkOut(ContentContext context, ID nodeId, String version)` Check out the specified version of a content node.
`ISortableFilterablePagedList<VirtualNode>` | `getCheckedOutNodes(ContentContext context)` Return all the checked-out nodes for the user.
`VirtualNode` | `getNode(ContentContext context, ID nodeId)` Get the VirtualNode representing the Node.
`ISortableFilterablePagedList<VirtualNode>` | `getOnlyAssignedNodes(ContentContext context)` Return all the assigned nodes for the user.
`InputStream` | `getStream(ContentContext context, ID nodeId, ID versionedPropertyId)` Gets the property bytes of a given version.
`Version` | `getVersion(ContentContext context, ID nodeId, String versionName)` Get the specified version for a given node.
`ISortableFilterablePagedList<Version>` | `getVersions(ContentContext context, ID nodeId)` Returns all the versions for a given node.
`ISortableFilterablePagedList<VirtualNode>` | `getWorkingNodes(ContentContext context)` Return all the working nodes for the user.
`boolean` | `isCheckedOut(ContentContext context, ID nodeId)` Convenience method to help determine whether a node is checked out or not.
`void` | `revert(ContentContext context, ID nodeId)` Reverts a given checked out node.
`void` | `save(ContentContext context, ID nodeId, VersionableContent versionableContent)` Updates the current version of the node with the specified data.

Method Detail

### getNode

    VirtualNode getNode(ContentContext context,
                        ID nodeId)
                        throws AuthorizationException,
                               NoSuchNodeException,
                               RepositoryException

  Get the VirtualNode representing the Node. If the user does not have VIEW privileges on the node, this operation will be disallowed.

  Parameters
    `context` - The content context object which contains the user profile information.
    `nodeId` - The id of the node to get.
  Returns
    A Virtual node representing the checked out node.
  Throws
    `AuthorizationException` - Thrown if user is not authorized to perform action.
    `NoSuchNodeException` - Thrown if the node does not exist.
    `RepositoryException` - Thrown if an error occurs during this operation.

### checkOut

    VirtualNode checkOut(ContentContext context,
                         ID nodeId,
                         String version)
                         throws AuthorizationException,
                                NoSuchNodeException,
                                RepositoryException

  Check out the specified version of a content node. This method will lock the virtual node such that only the user who checked it out or the super user may be able to revert the operation. If the virtual node requires the user to be in a specified role before checking out, only that user may checkout the node, even though the node may not be checked out. If the user does not have UPDATE privileges on the node, this operation will be disallowed. A node can only be checked once. Multiple checkouts of a node is not allowed.

  Parameters
    `context` - The content context object which contains the user profile information.
    `nodeId` - The id of the node to check out
    `version` - The version to be checked out, null if the latest version is desired.
  Returns
    A Virtual node representing the checked out node.
  Throws
    `AuthorizationException` - Thrown if user is not authorized to perform action.
    `NoSuchNodeException` - Thrown if the node does not exist.
    `RepositoryException` - Thrown if an error occurs during this operation.

### checkIn

    void checkIn(ContentContext context,
                 ID nodeId,
                 VersionableContent content)
                 throws AuthorizationException,
                        NoSuchNodeException,
                        RepositoryException

  Checks in the the specified version of the node with the specified id. Only the user who has checked out the node will be allowed to check in. This will unlock the node after checking it in to allow other users to perform checkout operations. The VersionableContent is assumed to be retrieved from the API and properly formed when this call is made. Unlike INodeManager, this method will not set missing properties to null, but rather missing properties will remain unchanged. If the user does not have UPDATE privileges on the node, this operation will be disallowed. The following rules for setting the assignedToUser and assignedToRole fields will be applied for different status transitions during a checkin :
  --> Status transition to READY : Assigned to user will be null. Assigned To Roles will be set to the roles that can publish this node --> Status transition to PUBLISHED : Assigned to user will be null. Assigned To Roles will be null --> Status transition to REJECTED : Assigned to roles will be null. Assigned to user will be the last user (who is not in the publishers role for that node) that was editing the node. --> Status transition to RETIRED : Assigned to user will be set to null. --> Status transition to DRAFT : Assigned to user will remain as it is.

  Parameters
    `context` - The content context object which contains the user profile information.
    `nodeId` - The id of the node being checked in.
    `content` - The content to be checked in. If null, the latest version will be checked in.
  Throws
    `AuthorizationException` - Thrown if user is not authorized to perform action.
    `NoSuchNodeException` - Thrown if the node does not exist.
    `RepositoryException` - Thrown if an error occurs during this operation.

### getVersion

    Version getVersion(ContentContext context,
                       ID nodeId,
                       String versionName)
                       throws AuthorizationException,
                              NoSuchNodeException,
                              RepositoryException

  Get the specified version for a given node. If the user does not have VIEW privileges on the node, this operation will be disallowed.

  Parameters
    `context` - The content context object which contains the user profile information.
    `nodeId` - The id of the node.
    `versionName` - The version to be retrieved.
  Returns
    Version The version requested for the specified node.
  Throws
    `AuthorizationException` - Thrown if user is not authorized to perform action.
    `NoSuchNodeException` - Thrown if the node does not exist.
    `RepositoryException` - Thrown if an error occurs during this operation.

### getVersions

    ISortableFilterablePagedList<Version> getVersions(ContentContext context,
                                                      ID nodeId)
                                                      throws AuthorizationException,
                                                             NoSuchNodeException,
                                                             RepositoryException

  Returns all the versions for a given node. If the user does not have VIEW privileges on the node, this operation will be disallowed.

  Parameters
    `context` - The content context object which contains the user profile information.
    `nodeId` - The id of the node.
  Returns
    ISortableFilterablePagedList All of the versions for a particular node.
  Throws
    `AuthorizationException` - Thrown if user is not authorized to perform action.
    `NoSuchNodeException` - Thrown if the node does not exist.
    `RepositoryException` - Thrown if an error occurs during this operation.

### getWorkingNodes

    ISortableFilterablePagedList<VirtualNode> getWorkingNodes(ContentContext context)
                                                              throws RepositoryException

  Return all the working nodes for the user. Working nodes constitute nodes which are checked out by the user or nodes that are assigned to that user. If the user does not have VIEW privileges on any of the returned nodes, they will not be included in the returned list.

  Parameters
    `context` - The content context object which contains the user profile information.
  Returns
    ISortableFilterablePagedList The working nodes for a user.
  Throws
    `RepositoryException` - Thrown if an error occurs during this operation.

### getCheckedOutNodes

    ISortableFilterablePagedList<VirtualNode> getCheckedOutNodes(ContentContext context)
                                                                 throws RepositoryException

  Return all the checked-out nodes for the user. Checked-out nodes constitute nodes which are checked out by and are assigned to that user. If the user does not have VIEW privileges on any of the returned nodes, they will not be included in the returned list.

  Parameters
    `context` - The content context object which contains the user profile information.
  Returns
    ISortableFilterablePagedList The working nodes for a user.
  Throws
    `RepositoryException` - Thrown if an error occurs during this operation.

### getOnlyAssignedNodes

    ISortableFilterablePagedList<VirtualNode> getOnlyAssignedNodes(ContentContext context)
                                                                   throws RepositoryException

  Return all the assigned nodes for the user. Assigned nodes constitute nodes which are not checked out by but are assigned to that user. If the user does not have VIEW privileges on any of the returned nodes, they will not be included in the returned list.

  Parameters
    `context` - The content context object which contains the user profile information.
  Returns
    ISortableFilterablePagedList The working nodes for a user.
  Throws
    `RepositoryException` - Thrown if an error occurs during this operation.

### revert

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

  Reverts a given checked out node. If the user does not have UPDATE privileges on the node, this operation will be disallowed.

  Parameters
    `context` - The content context object which contains the user profile information.
    `nodeId` - The id of the node.
  Throws
    `AuthorizationException` - Thrown if user is not authorized to perform action.
    `NoSuchNodeException` - Thrown if the node does not exist.
    `RepositoryException` - Thrown if an error occurs during this operation.

### isCheckedOut

    boolean isCheckedOut(ContentContext context,
                         ID nodeId)
                         throws RepositoryException

  Convenience method to help determine whether a node is checked out or not.

  Parameters
    `context` - The content context object which contains the user profile information.
    `nodeId` - The id of the node.
  Returns
    boolean True if checked out, false otheriwse. Will also return false if repository does not support library services.
  Throws
    `RepositoryException` - Thrown if an error occurs during this operation.

### getStream

    InputStream getStream(ContentContext context,
                          ID nodeId,
                          ID versionedPropertyId)
                          throws AuthorizationException,
                                 NoSuchPropertyException,
                                 RepositoryException

  Gets the property bytes of a given version. It is assumed that the user already has information about the propertyID of the property whose bytes are to be retrieved. If the user does not have VIEW privileges on the node, this operation will be disallowed.

  Parameters
    `context` - The content context object which contains the user profile information.
    `nodeId` - The id of the node.
    `versionedPropertyId` - The ID of the versioned property. ID should contain a valid repositoryName and a UID.
  Returns
    An InputStream representing the bytes. It is the developers responsibility to close the InputStream once data has been read from it.
  Throws
    `AuthorizationException` - Thrown if user is not authorized to perform action.
    `NoSuchNodeException` - Thrown if the node does not exist.
    `RepositoryException` - Thrown if an error occurs during this operation.
    `NoSuchPropertyException`

### save

    void save(ContentContext context,
              ID nodeId,
              VersionableContent versionableContent)
              throws AuthorizationException,
                     RepositoryException

  Updates the current version of the node with the specified data. The node must be checked out by the user for this operation to succeed. The VersionableContent is assumed to be retrieved from the API and properly formed when this call is made. Unlike INodeManager, this method will not set missing properties to null, but rather missing properties will remain unchanged. If the user does not have UPDATE privileges on the node, this operation will be disallowed.

  Parameters
    `context` - The content context object which contains the user profile information.
    `nodeId` - The id of the node.
    `versionableContent` - The data to save.
  Throws
    `AuthorizationException` - Thrown if user is not authorized to perform action.
    `RepositoryException` - If the node is not checked out by the user, or if the repository is non library service enabled, or if any other error occurs.

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

Copyright © 2006 BEA Systems, Inc. All Rights Reserved