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 ContentVersionControl

    @ControlInterface
    public interface ContentVersionControl

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

Method Summary
`void` | `checkIn(ContentContext context, ID nodeId, VersionableContent content)` Checks in the the specified version of the node with the specified id.
`JobResult` | `checkIn(ContentContext context, List<ID> nodeIds, String description, int endStatus)` CheckIn a group of nodes with the given end status.
`VirtualNode` | `checkOut(ContentContext context, ID nodeId, String version)` Check out the specified version of a content node.
`JobResult` | `checkOut(ContentContext context, List<ID> nodeIds)` CheckOut a list of nodes.
`Version` | `getActivePublishedVersion(List<Version> versionList)` Finds the most recently published Version.
`SortableFilterablePagedResult<VirtualNode>` | `getCheckedOutNodes(ContentContext context)` Return all the checked-out nodes for the user.
`Version` | `getLatestPublishedVersion(ContentContext context, ID nodeId)` Return the latest published version for the given node.
`SortableFilterablePagedResult<VirtualNode>` | `getOnlyAssignedNodes(ContentContext context)` Return all the assigned nodes for the user.
`InputStream` | `getStream(ContentContext context, ID nodeId, ID propertyId)` Gets the Binary data for the given Node and Property Id.
`Version` | `getVersion(ContentContext context, ID nodeId, String versionName)` Get the specified version for a given node.
`SortableFilterablePagedResult<Version>` | `getVersionHistory(ContentContext context, ID nodeId)` Returns all the versions for a given node.
`List<Version>` | `getVersions(ContentContext context, ID nodeId)` Deprecated use `getVersionHistory(ContentContext, ID)`
`VirtualNode` | `getVirtualNode(ContentContext context, ID nodeId)` Returns a `VirtualNode` corresponding to the provided `Node` id.
`SortableFilterablePagedResult<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.
`boolean` | `isCheckedOutByCurrentUser(ID nodeId, javax.servlet.http.HttpServletRequest request)` Returns true if the VirtualNode exists and is checked out by the currently logged in user
`boolean` | `isCheckedOutByCurrentUser(VirtualNode vNode, javax.servlet.http.HttpServletRequest request)` Returns true if the VirtualNode is not null and it is checked out by the currently logged in user
`void` | `revert(ContentContext context, ID nodeId)` Reverts a given checked out node.
`void` | `save(ContentContext context, ID id, VersionableContent content)` Updates the current version of the node with the specified data.

Method Detail

### getVirtualNode

    VirtualNode getVirtualNode(ContentContext context,
                               ID nodeId)
                               throws NoSuchNodeException,
                                      RepositoryException

  Returns a `VirtualNode` corresponding to the provided `Node` id.

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

### isCheckedOut

    boolean isCheckedOut(ContentContext context,
                         ID nodeId)
                         throws RepositoryException

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

  Parameters
    `context` -
    `nodeId` -
  Returns
    True if checked out, false otheriwse.
  Throws
    `RepositoryException`

### checkOut

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

  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 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
    `RepositoryException`
    `AuthorizationException`
    `NoSuchNodeException`

### checkOut

    JobResult checkOut(ContentContext context,
                       List<ID> nodeIds)
                       throws AuthorizationException,
                              NoSuchNodeException,
                              RepositoryException

  CheckOut a list of nodes. The nodes must exist and be checkedIn before attempting this operation.

  Parameters
    `context` -
    `nodeIds` -
  Returns
    JobResult object describing the result of the checkOut process
  Throws
    `AuthorizationException`
    `NoSuchNodeException`
    `RepositoryException`

### checkIn

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

  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 following rules for setting the assignedToUser and assignedToRole fields will be applied for different status transitions during a checkin :

  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
    `RepositoryException`
    `AuthorizationException`
    `NoSuchNodeException`

### checkIn

    JobResult checkIn(ContentContext context,
                      List<ID> nodeIds,
                      String description,
                      int endStatus)
                      throws RepositoryException

  CheckIn a group of nodes with the given end status. The nodes must be checked out by the current user. This method will return a JobResult object which will contain information about the nodes which were successfully checked in, and the nodes which did not get checked in, along with the error message.

  Parameters
    `context` - The ContentContext object
    `nodeIds` - The list of node id objects
    `description` - The description for the changes
    `endStatus` - The new checkedIn status of the nodes.
  Returns
    The JobResult object which contains information about nodes which were succesfully checked in and the nodes which failed to check in
  Throws
    `RepositoryException` - if there's an error in checking in the nodes

### getVersion

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

  Get the specified version for a given node. Throws a Authorization exception if the user does not have VIEW capabilities on the node.

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

### getVersions

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

  Deprecated use `getVersionHistory(ContentContext, ID)`

  Returns all the versions for a given node. throws RepositoryException, AuthorizationException if the user does not have the VIEW capability on the node.

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

### getLatestPublishedVersion

    Version getLatestPublishedVersion(ContentContext context,
                                      ID nodeId)
                                      throws AuthorizationException,
                                             NoSuchNodeException,
                                             RepositoryException

  Return the latest published version for the given node.

  Parameters
    `context` - The content context object which contains the user profile information.
    `nodeId` - The id of the node.
  Returns
    The latest published version if the node has been published, null otherwise.
  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.

### getVersionHistory

    SortableFilterablePagedResult<Version> getVersionHistory(ContentContext context,
                                                             ID nodeId)
                                                             throws RepositoryException,
                                                                    AuthorizationException,
                                                                    NoSuchNodeException

  Returns all the versions for a given node. throws RepositoryException, AuthorizationException if the user does not have the VIEW capability on the node.

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

### getWorkingNodes

    SortableFilterablePagedResult<VirtualNode> getWorkingNodes(ContentContext context)
                                                               throws RepositoryException

  Return all the working nodes for the user.

  Parameters
    `context` -
  Throws
    `RepositoryException`

### getCheckedOutNodes

    SortableFilterablePagedResult<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
    The checked out nodes for a user.
  Throws
    `RepositoryException` - Thrown if an error occurs during this operation.

### getOnlyAssignedNodes

    SortableFilterablePagedResult<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
    The assigned nodes for a user.
  Throws
    `RepositoryException` - Thrown if an error occurs during this operation.

### revert

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

  Reverts a given checked out node. Throws an exception if user does not have UPDATE privileges on the node

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

### getStream

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

  Gets the Binary data for the given Node and Property Id.

  After calling this method and retrieving the InputStream, you must close the InputStream when finished reading it in a finally block.

  If retrieving binary content from a published repository, the uid of the propertyId parameter should be /. If retrieving binary content from a managed repository, the uid should be where uid is the value of PROPERTY_ID column in the CMV_VALUE table.

  Parameters
    `nodeId` - - the ID for the node.
    `propertyId` - - the ID for the Property that contains the binary data.
  Returns
    InputStream - the binary data.
  Throws
    `RepositoryException`
    `AuthorizationException`
    `AuthenticationException`
    `NoSuchPropertyException`

### save

    void save(ContentContext context,
              ID id,
              VersionableContent content)
              throws 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.

  Parameters
    `context` - A ContentContext object
    `id` - the node to update
    `content` - the data to save
  Throws
    `RepositoryException`

### isCheckedOutByCurrentUser

    boolean isCheckedOutByCurrentUser(ID nodeId,
                                      javax.servlet.http.HttpServletRequest request)
                                      throws RepositoryException

  Returns true if the VirtualNode exists and is checked out by the currently logged in user

  Parameters
    `nodeId` -
    `request` -
  Returns
    true if the VirtualNode exists and is checked out by the currently logged in user
  Throws
    `RepositoryException`

### isCheckedOutByCurrentUser

    boolean isCheckedOutByCurrentUser(VirtualNode vNode,
                                      javax.servlet.http.HttpServletRequest request)
                                      throws RepositoryException

  Returns true if the VirtualNode is not null and it is checked out by the currently logged in user

  Parameters
    `vNode` -
    `request` -
  Returns
    true if the VirtualNode is not null and is checked out by the currently logged in user
  Throws
    `RepositoryException`

### getActivePublishedVersion

    Version getActivePublishedVersion(List<Version> versionList)

  Finds the most recently published Version. Only the most recently published Version is the active published version

  Parameters
    `versionList` -
  Returns
    null if there are no published versions

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