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

## com.bea.content.virtual
Interface WorkspaceOps

All Superinterfaces:
  EJBLocalObject, Serializable

public interface WorkspaceOps
extends Serializable, EJBLocalObject

LibraryOps is a service for performing library functionality on virtual nodes. Nodes that are either versionable, and or have a life cycle may be managed through this api. Versionable and non-versionable nodes are handled the same through the life cycle. They are also handled the same through the versioning api, the only difference being that for versionable nodes, the version history is maintained. Both versionable and non-versionable nodes have a working version that is maintained through the life cycle.

This api only supports versioning and life cycle of content nodes. Hierarchy nodes may be created and deleted, but they will be published/unpublished at the same time and will not have version history.

Method Summary
`void` | `checkIn(ContentContext context, ID nodeId)` Checks in the latest version of the node with the specified id.
`void` | `checkIn(ContentContext context, ID nodeId, VersionableContent versionableContent)` Checks in the node with the specified id.
`VirtualNode` | `checkOut(ContentContext context, ID nodeId)` Check out the specified version of a content node.
`VirtualNode` | `checkOut(ContentContext context, ID nodeId, String version)` Check out the specified version of a content node.
`VirtualNode` | `createAndCheckIn(ContentContext context, ID parentId, String newNodeName, ID objectClassId, Property[] properties, int type, int lifeCycleStatus)` Creates the Node and then checks it in with the given status.
`VirtualNode` | `getNode(ContentContext context, ID nodeId)` Return the virtual node for the given ID.
`InputStream` | `getPropertyBytes(ContentContext context, String propertyId)` Gets the Binary data for the given Property Id.
`Version` | `getVersion(ContentContext context, ID nodeId, String versionName)` Returns a specific version for the given Virtual Node.
`VersionIterator` | `getVersions(ContentContext context, ID nodeId)` Returns all versions for the given Virtual Node.
`VirtualNodeIterator` | `getWorkingNodes(ContentContext context)` Return all the nodes which belong to the user's workspace.
`void` | `revert(ContentContext context, ID nodeId)` This method removes the working version of the node and unlocks it.
`void` | `save(ContentContext context, ID nodeId, VersionableContent versionableContent)` Updates the node with the specified data.

Methods inherited from interface javax.ejb.EJBLocalObject
`getEJBLocalHome, getPrimaryKey, isIdentical, remove`

Method Detail

### checkIn

    public void checkIn(ContentContext context,
                        ID nodeId)
                 throws NoSuchNodeException,
                        RepositoryException

  Checks in the latest 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. Please review the javadoc for `LifeCycle` to better understand the available status transitions on checkin and what occurs for different transitions.

  Parameters:
    `context` - The content context object which contains the user profile information.
    `nodeId` - The id of the node being checked in. properties as defined by the node type, or else a validation error will be thrown by the system.
  Throws:
    `NoSuchNodeException` - If the node does not exist
    `RepositoryException`

### checkIn

    public void checkIn(ContentContext context,
                        ID nodeId,
                        VersionableContent versionableContent)
                 throws NoSuchNodeException,
                        RepositoryException

  Checks in 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 : Please review the javadoc for `LifeCycle` to better understand the available status transitions on checkin and what occurs for different transitions.

  Parameters:
    `context` - The content context object which contains the user profile information.
    `nodeId` - The id of the node being checked in.
    `versionableContent` - The node data to be checked in. This data should contain the same properties as defined by the node type, or else a validation error will be thrown by the system.
  Throws:
    `NoSuchNodeException` - If the node does not exist
    `RepositoryException`

### checkOut

    public VirtualNode checkOut(ContentContext context,
                                ID nodeId)
                         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 specified role before checking out, only that user may checkout the node, even though the node may not be checked out. 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
  Returns:
    A Virtual node representing the checked out node
  Throws:
    `AuthorizationException` - if user is not authorized to perform action
    `NoSuchNodeException` - If the node does not exist
    `RepositoryException`

### checkOut

    public 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 specified role before checking out, only that user may checkout the node, even though the node may not be checked out. 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` - if user is not authorized to perform action
    `NoSuchNodeException` - If the node does not exist
    `RepositoryException`

### createAndCheckIn

    public VirtualNode createAndCheckIn(ContentContext context,
                                        ID parentId,
                                        String newNodeName,
                                        ID objectClassId,
                                        Property[] properties,
                                        int type,
                                        int lifeCycleStatus)
                                 throws AuthorizationException,
                                        NodeExistsException,
                                        NoSuchObjectClassException,
                                        RepositoryException

  Creates the Node and then checks it in with the given status. Because this is a new Node, checkin in with a REJECTED status is not valid. Please review the javadoc for `LifeCycle` to better understand the available statuses, status transitions on checkin and what occurs for different transitions.

  Parameters:
    `context` - The content context object which contains the user profile information.
    `parentId` - The parent Id of the node to create the new Node under.
    `newNodeName` - The name of the new Node
    `objectClassId` - The Id of the ObjectClass to assign to the new Node
    `properties` - The properties for the Node
    `type` - The type of Node, either Hierarchy or Content
    `lifeCycleStatus` - The lifecycle status to checkin the node as.
  Returns:
  Throws:
    `AuthorizationException`
    `NodeExistsException`
    `NoSuchObjectClassException`
    `RepositoryException`

### getNode

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

  Return the virtual node for the given ID.

  Parameters:
    `context` - The content context object which contains the user profile information.
    `nodeId` - The id of the node being retrieved.
  Returns:
    The virtual node.
  Throws:
    `NoSuchNodeException` - If the node does not exist
    `RepositoryException`

### getPropertyBytes

    public InputStream getPropertyBytes(ContentContext context,
                                        String propertyId)
                                 throws NoSuchPropertyException,
                                        RepositoryException

  Gets the Binary data for the given Property Id.

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

  WARNING: If using this interface to retrieve binary content from a BEA Repository, please read the javadoc for `RepositoryConfig`.

  Parameters:
    `propertyId` - - the ID for the Property that contains the binary data. The ID must include the repositoryName.
  Returns:
    InputStream - the binary data.
  Throws:
    `NoSuchPropertyException` - - if the Property does not exist.
    `RepositoryException`

### getVersion

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

  Returns a specific version for the given Virtual Node. If the node is checked out by the user calling this method, it will also return the working version if so called. For everybody else this method will not return the working version if the user tries to find that version.

  Parameters:
    `context` - The content context object which contains the user profile information.
    `nodeId` - The id of the node for the version being retrieved.
    `versionName` - The version name (number) that should be retrieved.
  Returns:
    Version the Version for the nodeId and versionName requested.
  Throws:
    `NoSuchNodeException` - If the node version does not exist.
    `RepositoryException`

### getVersions

    public VersionIterator getVersions(ContentContext context,
                                       ID nodeId)
                                throws NoSuchNodeException,
                                       RepositoryException

  Returns all versions for the given Virtual Node. If the node is checked out by the user calling this method, it will also return the working version in the iterator. For everybody else this method will not return all versions except the working version of that node.

  Parameters:
    `context` - The content context object which contains the user profile information.
    `nodeId` - The id of the node for the versions being retrieved.
  Returns:
    a version iterator object which contains the versions of the node.
  Throws:
    `NoSuchNodeException` - If the node does not exist
    `RepositoryException`

### getWorkingNodes

    public VirtualNodeIterator getWorkingNodes(ContentContext context)
                                        throws RepositoryException

  Return all the nodes which belong to the user's workspace. This includes nodes which can belong in any of the following category : a) Nodes checked out by the user. b) Nodes not checked out by the user, but which still belong to the user (ie checked in item in DRAFT state, items REJECTED by a publisher) c) Nodes which are waiting to be approved if a user is in a publisher role. (The nodes for which assignedToRole matches the role of the user).

  Parameters:
    `context` - The content context object which contains the user profile information.
  Returns:
    A VirtualNodeIterator object which contains all the working virtual nodes for the user.
  Throws:
    `RepositoryException`

### revert

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

  This method removes the working version of the node and unlocks it. It also sets the assignedToUser field to null. The node must be checked out before it can be reverted. Only the user who has the node checked out, or the System administrator can perform a revert operation on a node.

  Parameters:
    `context` - The content context object which contains the user profile information.
    `nodeId` - The id of the node being reverted.
  Throws:
    `NoSuchNodeException` - If the node does not exist
    `RepositoryException`

### save

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

  Updates the node with the specified data. The node must be checked out before this method is called on it. Only the user who has the node checked out can perform a save on the node. The status should not change as part of the save. After the save, the node will remain in a locked state as before.

  Parameters:
    `context` - The content context object which contains the user profile information.
    `nodeId` - The id of the node being saved.
    `versionableContent` - The node data to be checked in. This data should contain the same properties as defined by the node type, or else a validation error will be thrown by the system.
  Throws:
    `NoSuchNodeException` - If the node does not exist
    `RepositoryException`

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

Copyright © 2004 BEA Systems, Inc. All Rights Reserved