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.portal.tools.content.controls
Interface ContentVersionControl

    public interface ContentVersionControl

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

Method Summary
`void` | `checkIn(com.bea.content.ContentContext context, com.bea.content.ID nodeId, com.bea.content.virtual.version.VersionableContent content)` Checks in the the specified version of the node with the specified id.
`com.bea.content.virtual.VirtualNode` | `checkOut(com.bea.content.ContentContext context, com.bea.content.ID nodeId, String version)` Check out the specified version of a content node.
`com.bea.content.virtual.version.Version` | `getActivePublishedVersion(List<com.bea.content.virtual.version.Version> versionList)` Finds the most recently published Version.
`com.bea.p13n.pagination.SortableFilterablePagedResult<com.bea.content.virtual.VirtualNode>` | `getCheckedOutNodes(com.bea.content.ContentContext context)` Return all the checked-out nodes for the user.
`com.bea.p13n.pagination.SortableFilterablePagedResult<com.bea.content.virtual.VirtualNode>` | `getOnlyAssignedNodes(com.bea.content.ContentContext context)` Return all the assigned nodes for the user.
`InputStream` | `getStream(com.bea.content.ContentContext context, com.bea.content.ID nodeId, com.bea.content.ID propertyId)` Gets the Binary data for the given Node and Property Id.
`com.bea.content.virtual.version.Version` | `getVersion(com.bea.content.ContentContext context, com.bea.content.ID nodeId, String versionName)` Get the specified version for a given node.
`com.bea.p13n.pagination.SortableFilterablePagedResult<com.bea.content.virtual.version.Version>` | `getVersionHistory(com.bea.content.ContentContext context, com.bea.content.ID nodeId)` Returns all the versions for a given node.
`List<com.bea.content.virtual.version.Version>` | `getVersions(com.bea.content.ContentContext context, com.bea.content.ID nodeId)` Returns all the versions for a given node.
`com.bea.content.virtual.VirtualNode` | `getVirtualNode(com.bea.content.ContentContext context, com.bea.content.ID nodeId)` Returns a `VirtualNode` corresponding to the provided `Node` id.
`com.bea.p13n.pagination.SortableFilterablePagedResult<com.bea.content.virtual.VirtualNode>` | `getWorkingNodes(com.bea.content.ContentContext context)` Return all the working nodes for the user.
`boolean` | `isCheckedOut(com.bea.content.ContentContext context, com.bea.content.ID nodeId)` Convenience method to help determine whether a node is checked out or not.
`boolean` | `isCheckedOutByCurrentUser(com.bea.content.ID nodeId, HttpServletRequest request)` Returns true if the VirtualNode exists and is checked out by the currently logged in user
`void` | `revert(com.bea.content.ContentContext context, com.bea.content.ID nodeId)` Reverts a given checked out node.
`void` | `save(com.bea.content.ContentContext context, com.bea.content.ID id, com.bea.content.virtual.version.VersionableContent content)` Updates the current version of the node with the specified data.

Method Detail

### getVirtualNode

    com.bea.content.virtual.VirtualNode getVirtualNode(com.bea.content.ContentContext context,
                                                       com.bea.content.ID nodeId)
                                                       throws com.bea.content.NoSuchNodeException,
                                                              com.bea.content.RepositoryException

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

  Parameters
    `context` -
    `nodeId` -
  Returns
  Throws
    `com.bea.content.NoSuchNodeException`
    `com.bea.content.RepositoryException`

### isCheckedOut

    boolean isCheckedOut(com.bea.content.ContentContext context,
                         com.bea.content.ID nodeId)
                         throws com.bea.content.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
    `com.bea.content.RepositoryException`

### checkOut

    com.bea.content.virtual.VirtualNode checkOut(com.bea.content.ContentContext context,
                                                 com.bea.content.ID nodeId,
                                                 String version)
                                                 throws com.bea.content.RepositoryException,
                                                        com.bea.content.AuthorizationException,
                                                        com.bea.content.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
    `com.bea.content.RepositoryException`
    `com.bea.content.AuthorizationException`
    `com.bea.content.NoSuchNodeException`

### checkIn

    void checkIn(com.bea.content.ContentContext context,
                 com.bea.content.ID nodeId,
                 com.bea.content.virtual.version.VersionableContent content)
                 throws com.bea.content.RepositoryException,
                        com.bea.content.AuthorizationException,
                        com.bea.content.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
    `com.bea.content.RepositoryException`
    `com.bea.content.AuthorizationException`
    `com.bea.content.NoSuchNodeException`

### getVersion

    com.bea.content.virtual.version.Version getVersion(com.bea.content.ContentContext context,
                                                       com.bea.content.ID nodeId,
                                                       String versionName)
                                                       throws com.bea.content.RepositoryException,
                                                              com.bea.content.AuthorizationException,
                                                              com.bea.content.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` -
  Returns
  Throws
    `com.bea.content.RepositoryException`
    `com.bea.content.AuthorizationException`
    `com.bea.content.NoSuchNodeException`

### getVersions

    List<com.bea.content.virtual.version.Version> getVersions(com.bea.content.ContentContext context,
                                                              com.bea.content.ID nodeId)
                                                              throws com.bea.content.RepositoryException,
                                                                     com.bea.content.AuthorizationException,
                                                                     com.bea.content.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` -
  Returns
  Throws
    `com.bea.content.RepositoryException`
    `com.bea.content.AuthorizationException`
    `com.bea.content.NoSuchNodeException`

### getVersionHistory

    com.bea.p13n.pagination.SortableFilterablePagedResult<com.bea.content.virtual.version.Version> getVersionHistory(com.bea.content.ContentContext context,
                                                                                                                     com.bea.content.ID nodeId)
                                                                                                                     throws com.bea.content.RepositoryException,
                                                                                                                            com.bea.content.AuthorizationException,
                                                                                                                            com.bea.content.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` -
  Returns
  Throws
    `com.bea.content.RepositoryException`
    `com.bea.content.AuthorizationException`
    `com.bea.content.NoSuchNodeException`

### getWorkingNodes

    com.bea.p13n.pagination.SortableFilterablePagedResult<com.bea.content.virtual.VirtualNode> getWorkingNodes(com.bea.content.ContentContext context)
                                                                                                               throws com.bea.content.RepositoryException

  Return all the working nodes for the user.

  Parameters
    `context` -
  Returns
  Throws
    `com.bea.content.RepositoryException`

### getCheckedOutNodes

    com.bea.p13n.pagination.SortableFilterablePagedResult<com.bea.content.virtual.VirtualNode> getCheckedOutNodes(com.bea.content.ContentContext context)
                                                                                                                  throws com.bea.content.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
    `com.bea.content.RepositoryException` - Thrown if an error occurs during this operation.

### getOnlyAssignedNodes

    com.bea.p13n.pagination.SortableFilterablePagedResult<com.bea.content.virtual.VirtualNode> getOnlyAssignedNodes(com.bea.content.ContentContext context)
                                                                                                                    throws com.bea.content.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
    `com.bea.content.RepositoryException` - Thrown if an error occurs during this operation.

### revert

    void revert(com.bea.content.ContentContext context,
                com.bea.content.ID nodeId)
                throws com.bea.content.RepositoryException,
                       com.bea.content.AuthorizationException,
                       com.bea.content.NoSuchNodeException

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

  Parameters
    `context` -
    `nodeId` -
  Throws
    `com.bea.content.RepositoryException`
    `com.bea.content.AuthorizationException`
    `com.bea.content.NoSuchNodeException`

### getStream

    InputStream getStream(com.bea.content.ContentContext context,
                          com.bea.content.ID nodeId,
                          com.bea.content.ID propertyId)
                          throws com.bea.content.RepositoryException,
                                 com.bea.content.AuthorizationException,
                                 com.bea.content.AuthenticationException,
                                 com.bea.content.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
    `com.bea.content.RepositoryException`
    `com.bea.content.AuthorizationException`
    `com.bea.content.AuthenticationException`
    `com.bea.content.NoSuchPropertyException`

### save

    void save(com.bea.content.ContentContext context,
              com.bea.content.ID id,
              com.bea.content.virtual.version.VersionableContent content)
              throws com.bea.content.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
    `com.bea.content.RepositoryException`

### isCheckedOutByCurrentUser

    boolean isCheckedOutByCurrentUser(com.bea.content.ID nodeId,
                                      HttpServletRequest request)
                                      throws com.bea.content.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
    `com.bea.content.RepositoryException`

### getActivePublishedVersion

    com.bea.content.virtual.version.Version getActivePublishedVersion(List<com.bea.content.virtual.version.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 © 2006 BEA Systems, Inc. All Rights Reserved