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 ContentWorkflowControl

    public interface ContentWorkflowControl

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

Method Summary
`com.bea.content.virtual.workflow.Workflow` | `addWorkflow(com.bea.content.ContentContext context, String repositoryName, String name, String comment, byte[] data)` Add a new workflow document to the system.
`com.bea.p13n.pagination.SortableFilterablePagedResult<com.bea.content.virtual.workflow.Workflow>` | `getAllAssociableWorkflows(com.bea.content.ContentContext context, String repositoryName, int pageSize)` Returns all the workflows in the specified repository [Including the Default Workflow document] to which the user has can_associate capability.
`com.bea.content.virtual.workflow.Workflow[]` | `getAllWorkflows(com.bea.content.ContentContext context, String repositoryName)` Returns all the workflows in the specified repository [Including the Default Lifecycle document] Please note that these workflow documents are lightweight objects and do not contain the actual workflow data.
`com.bea.p13n.pagination.SortableFilterablePagedResult<com.bea.content.virtual.workflow.Workflow>` | `getAllWorkflows(com.bea.content.ContentContext context, String repositoryName, int pageSize)` Returns all the workflows in the specified repository [Including the Default Lifecycle document] Please note that these workflow documents are lightweight objects and do not contain the actual workflow data.
`com.bea.content.virtual.workflow.Workflow` | `getDefaultWorkflow(com.bea.content.ContentContext context, String repositoryName)` Returns the default workflow for the given repository.
`com.bea.content.Node[]` | `getNodesForWorkflow(com.bea.content.ContentContext context, com.bea.content.ID workflowId)` Returns the Nodes associated with the given workflow.
`com.bea.p13n.pagination.SortableFilterablePagedResult<com.bea.content.Node>` | `getNodesForWorkflow(com.bea.content.ContentContext context, com.bea.content.ID workflowId, int pageSize)` Returns the Nodes associated with the given workflow.
`List<String>` | `getStatusOptions(com.bea.content.Node node, com.bea.content.virtual.version.Version version, com.bea.content.ContentContext contentContext)` Gets a list of valid workflow statuses that the given node version can transition to, considering the current workflow status
`Map<Integer,String>` | `getStatusOptionsMap(com.bea.content.Node node, com.bea.content.virtual.version.Version version, com.bea.content.ContentContext contentContext)` Gets a list of valid workflow statuses (with corresponding int value) that the given node version can transition to, considering the current workflow status
`byte[]` | `getStream(com.bea.content.ContentContext context, com.bea.content.ID workflowId)` Allow users to download the byte[] representing the document of the workflow.
`com.bea.content.ObjectClass[]` | `getTypesForWorkflow(com.bea.content.ContentContext context, com.bea.content.ID workflowId)` Returns the Types associated with the given workflow.
`com.bea.p13n.pagination.SortableFilterablePagedResult<com.bea.content.ObjectClass>` | `getTypesForWorkflow(com.bea.content.ContentContext context, com.bea.content.ID workflowId, int pageSize)` Returns the Types associated with the given workflow.
`com.bea.content.virtual.workflow.Workflow` | `getWorkflow(com.bea.content.ContentContext context, com.bea.content.ID id)` Return a specific workflow document with the given id
`com.bea.content.virtual.workflow.Workflow` | `getWorkflow(com.bea.content.ContentContext context, String repositoryName, String name)` Return a specific workflow document with the given name
`com.bea.content.virtual.workflow.Workflow` | `getWorkflowForNode(com.bea.content.ContentContext context, com.bea.content.ID nodeId)` Returns the workflow document associated with the node.
`com.bea.content.virtual.workflow.Workflow` | `getWorkflowForType(com.bea.content.ContentContext context, com.bea.content.ID typeId)` Get the workflow for the type.
`com.bea.content.virtual.workflow.Workflow` | `getWorkflowOrDefaultWorkflowForNode(com.bea.content.ContentContext contentContext, com.bea.content.Node node)` If the given node has a workflow expicitly assigned to it, it is returned.
`boolean` | `hasAssociateCapability(com.bea.content.ContentContext context, String repositoryName, com.bea.content.virtual.workflow.Workflow workflow)` Check to see if the given workflow has CAN_ASSOCIATE capability for it to be associated with a node for the current user.
`boolean` | `hasCreateCapability(com.bea.content.ContentContext context, String repositoryName, com.bea.content.virtual.workflow.Workflow workflow)` Check to see if the given workflow hasCreateCapability
`boolean` | `hasDeleteCapability(com.bea.content.ContentContext context, String repositoryName, com.bea.content.virtual.workflow.Workflow workflow)` Check to see if the given workflow hasDeleteCapability for the current user.
`boolean` | `hasUpdateCapability(com.bea.content.ContentContext context, String repositoryName, com.bea.content.virtual.workflow.Workflow workflow)` Check to see if the given workflow hasUpdateCapability for the current user.
`boolean` | `hasViewCapability(com.bea.content.ContentContext context, String repositoryName, com.bea.content.virtual.workflow.Workflow workflow)` Check to see if the given workflow hasViewCapability for the current user.
`void` | `remove(com.bea.content.ContentContext context, com.bea.content.ID id)` Delete the specified workflow document from the system.
`void` | `save(com.bea.content.ContentContext context, com.bea.content.ID id, byte[] data)` Updates the workflow document data.
`void` | `save(com.bea.content.ContentContext context, com.bea.content.ID id, String name, String comment)` Update the workflow document meta-data.
`void` | `setDefaultWorkflow(com.bea.content.ContentContext context, String repositoryName, byte[] data)` Sets a default workflow for the repository
`void` | `setNodeWorkflow(com.bea.content.ContentContext context, com.bea.content.ID nodeId, com.bea.content.ID workflowId)` Sets the specific workflow document to the given node.
`void` | `setTypeWorkflow(com.bea.content.ContentContext context, com.bea.content.ID typeId, com.bea.content.ID workflowId)` Sets the specific workflow document to the given type.

Method Detail

### addWorkflow

    com.bea.content.virtual.workflow.Workflow addWorkflow(com.bea.content.ContentContext context,
                                                          String repositoryName,
                                                          String name,
                                                          String comment,
                                                          byte[] data)
                                                          throws com.bea.content.WorkflowExistsException,
                                                                 com.bea.content.DefaultWorkflowException,
                                                                 com.bea.content.RepositoryException

  Add a new workflow document to the system. A user will need create capabilities to create a new workflow.

  Parameters
    `context` - The ContentContext object
    `name` - Name of the workflow
    `comment` - The comment associated with the workflow.
    `data` - Byte Array of the file representing workflow data.
  Throws
    `com.bea.content.WorkflowExistsException` - If the workflow with the specified name already exists.
    `com.bea.content.DefaultWorkflowException` - If user tried to add a default workflow in the system.
    `com.bea.content.RepositoryException` - If the workflow was not added due to other problem.

### remove

    void remove(com.bea.content.ContentContext context,
                com.bea.content.ID id)
                throws com.bea.content.DefaultWorkflowException,
                       com.bea.content.RepositoryException

  Delete the specified workflow document from the system. This operation will be disallowed if user does not have delete privileges on the workflow.

  Parameters
    `context` - The ContentContext object
    `id` - The ID associated with the workflow object
  Throws
    `com.bea.content.DefaultWorkflowException` - If user tried to delete the default workflow.
    `com.bea.content.RepositoryException` - If the workflow was not deleted due to some other problem.

### getAllWorkflows

    com.bea.content.virtual.workflow.Workflow[] getAllWorkflows(com.bea.content.ContentContext context,
                                                                String repositoryName)
                                                                throws com.bea.content.RepositoryException

  Returns all the workflows in the specified repository [Including the Default Lifecycle document] Please note that these workflow documents are lightweight objects and do not contain the actual workflow data. The workflow document is lazily loaded on demand from the spi. This method will only return workflows to which the user has view capabilities.

  Parameters
    `context` - The ContentContext object
    `repositoryName` - The name of the repository.
  Throws
    `com.bea.content.RepositoryException` - If workflows cannot be retrieved due to some other issue.

### getAllWorkflows

    com.bea.p13n.pagination.SortableFilterablePagedResult<com.bea.content.virtual.workflow.Workflow> getAllWorkflows(com.bea.content.ContentContext context,
                                                                                                                     String repositoryName,
                                                                                                                     int pageSize)
                                                                                                                     throws com.bea.content.RepositoryException

  Returns all the workflows in the specified repository [Including the Default Lifecycle document] Please note that these workflow documents are lightweight objects and do not contain the actual workflow data. The workflow document is lazily loaded on demand from the spi. This method will only return workflows to which the user has view capabilities.

  Parameters
    `context` - The ContentContext object
    `repositoryName` - The name of the repository.
    `pageSize` - the number of items per page in the PagedResult
  Returns
    A PagedResult of all the workflows in the repository
  Throws
    `com.bea.content.RepositoryException` - If there is another exception in the repository.

### getAllAssociableWorkflows

    com.bea.p13n.pagination.SortableFilterablePagedResult<com.bea.content.virtual.workflow.Workflow> getAllAssociableWorkflows(com.bea.content.ContentContext context,
                                                                                                                               String repositoryName,
                                                                                                                               int pageSize)
                                                                                                                               throws com.bea.content.RepositoryException

  Returns all the workflows in the specified repository [Including the Default Workflow document] to which the user has can_associate capability. Please note that these workflow documents are lightweight objects and do not contain the actual workflow data, until explicitly asked for.

  Parameters
    `context` - The ContentContext object
    `repositoryName` - The name of the repository.
    `pageSize` - the number of items per page in the PagedResult
  Returns
    A PagedResult of all associable workflows in the repository
  Throws
    `com.bea.content.RepositoryException` - If workflows cannot be retrieved due to some other issue.

### getWorkflow

    com.bea.content.virtual.workflow.Workflow getWorkflow(com.bea.content.ContentContext context,
                                                          com.bea.content.ID id)
                                                          throws com.bea.content.NoSuchWorkflowException,
                                                                 com.bea.content.RepositoryException

  Return a specific workflow document with the given id

  Parameters
    `context` - The ContentContext object
    `id` - The ID of the workflow
  Returns
    The Workflow representing the workflow document.
  Throws
    `com.bea.content.NoSuchWorkflowException` - If the workflow document does not exist.
    `com.bea.content.RepositoryException` - If some other error happens.

### getWorkflow

    com.bea.content.virtual.workflow.Workflow getWorkflow(com.bea.content.ContentContext context,
                                                          String repositoryName,
                                                          String name)
                                                          throws com.bea.content.NoSuchWorkflowException,
                                                                 com.bea.content.RepositoryException

  Return a specific workflow document with the given name

  Parameters
    `context` - The ContentContext object
    `repositoryName` - The name of the repository
    `name` - The name of the workflow
  Returns
    The Workflow representing the workflow document.
  Throws
    `com.bea.content.NoSuchWorkflowException` - If the workflow document does not exist.
    `com.bea.content.RepositoryException` - If some other error happens.

### getDefaultWorkflow

    com.bea.content.virtual.workflow.Workflow getDefaultWorkflow(com.bea.content.ContentContext context,
                                                                 String repositoryName)
                                                                 throws com.bea.content.RepositoryException

  Returns the default workflow for the given repository. Every repository has one default workflow associated with it.

  Parameters
    `context` - The ContentContext object
    `repositoryName` - The name of the repository
  Returns
    The Workflow representing the workflow documemnt.
  Throws
    `com.bea.content.RepositoryException` - If there is another exception in the repository.

### setDefaultWorkflow

    void setDefaultWorkflow(com.bea.content.ContentContext context,
                            String repositoryName,
                            byte[] data)
                            throws com.bea.content.RepositoryException

  Sets a default workflow for the repository

  Parameters
    `context` - The ContentContext object
    `repositoryName` - The name of the repository
    `data` - The data for the workflow xml document. The document should conform to the workflow schema
  Throws
    `com.bea.content.RepositoryException`

### save

    void save(com.bea.content.ContentContext context,
              com.bea.content.ID id,
              String name,
              String comment)
              throws com.bea.content.RepositoryException

  Update the workflow document meta-data. This operation will not succeed if user tries to update default workflow meta-data. Also the operation might fail if the user tried to update the name of the workflow to a workflow which already exists in the system.

  Parameters
    `context` - The ContentContext object
    `id` - The id of the workflow
    `name` - The new name of the workflow
    `comment` - The new comment for the workflow.
  Throws
    `com.bea.content.RepositoryException` - If the the update of the metadata fails for some reason

### save

    void save(com.bea.content.ContentContext context,
              com.bea.content.ID id,
              byte[] data)
              throws com.bea.content.RepositoryException

  Updates the workflow document data. This operation will disallow updating Default LifeCycle's meta-data

  Parameters
    `context` - The ContentContext object
    `id` - The ID of the workflow
    `data` - The data associated with the workflow
  Throws
    `com.bea.content.RepositoryException` - If the update of the workflow does not work, or if the workflow is in use by another node in the system.

### setNodeWorkflow

    void setNodeWorkflow(com.bea.content.ContentContext context,
                         com.bea.content.ID nodeId,
                         com.bea.content.ID workflowId)
                         throws com.bea.content.RepositoryException

  Sets the specific workflow document to the given node. This allows all further operations like checkIn/checkOut to follow the workflow specified in the workflow document.

  Parameters
    `context` - The ContentContext object
    `nodeId` - The NodeId
    `workflowId` - The workflowId. The UID in this variable can be set to null to remove the workflow from the node.
  Throws
    `com.bea.content.RepositoryException` - If the operation fails for some reason. This can also be thrown if a node already has a workflow associated with it.

### setTypeWorkflow

    void setTypeWorkflow(com.bea.content.ContentContext context,
                         com.bea.content.ID typeId,
                         com.bea.content.ID workflowId)
                         throws com.bea.content.RepositoryException

  Sets the specific workflow document to the given type. This allows all further operations like checkIn/checkOut for all instances of that type to follow the specified workflow.

  Parameters
    `context` - The ContentContext object
    `typeId` - The Type ID
    `workflowId` - The workflowId. The UID in this variable can be set to null to remove the workflow from the type.
  Throws
    `com.bea.content.RepositoryException` - If the operation fails for some reason.

### getWorkflowForNode

    com.bea.content.virtual.workflow.Workflow getWorkflowForNode(com.bea.content.ContentContext context,
                                                                 com.bea.content.ID nodeId)
                                                                 throws com.bea.content.AuthorizationException,
                                                                        com.bea.content.RepositoryException

  Returns the workflow document associated with the node. The order of precedence by which a workflow document is returned is as follows : a) If a workflow document is explicitly set on that node, it is returned. b) If no workflow document is set on that node, the workflow document associated with the type of the node is returned. c) If node has no type associated with it, or there is no workflow set on the type the system walks up the hierarchy to see if there is any parent node in the hierarchy which has a workflow set and returns that.

  Parameters
    `context` - The ContentContext object
    `nodeId` - The node ID object.
  Returns
    The workflowObject for that node. If the node has no workflow object associated with it, it should return null. This will indicate the system to use the default workflow for that node when the node has been checked out.
  Throws
    `com.bea.content.RepositoryException` - if the operation does not succeed.
    `com.bea.content.AuthorizationException`

### getWorkflowForType

    com.bea.content.virtual.workflow.Workflow getWorkflowForType(com.bea.content.ContentContext context,
                                                                 com.bea.content.ID typeId)
                                                                 throws com.bea.content.AuthorizationException,
                                                                        com.bea.content.RepositoryException

  Get the workflow for the type.

  Parameters
    `context` - The ContentContext object
    `typeId` - The type ID object.
  Returns
    The workflow associated with the type. Will return null if type has no workflow associated with it.
  Throws
    `com.bea.content.AuthorizationException`
    `com.bea.content.RepositoryException`

### getNodesForWorkflow

    com.bea.content.Node[] getNodesForWorkflow(com.bea.content.ContentContext context,
                                               com.bea.content.ID workflowId)
                                               throws com.bea.content.RepositoryException

  Returns the Nodes associated with the given workflow. Will not return any nodes the user does not have view privileges on. This will also not return the nodes on which the workflow is inherited but will only return the nodes on which the workflow is explicitly set.

  Parameters
    `context` - The ContentContext object
    `workflowId` - The Workflow ID object
  Returns
    An Array of Nodes representing the workflow.
  Throws
    `com.bea.content.RepositoryException` - If the opoeration does not succeed.

### getNodesForWorkflow

    com.bea.p13n.pagination.SortableFilterablePagedResult<com.bea.content.Node> getNodesForWorkflow(com.bea.content.ContentContext context,
                                                                                                    com.bea.content.ID workflowId,
                                                                                                    int pageSize)
                                                                                                    throws com.bea.content.RepositoryException

  Returns the Nodes associated with the given workflow. Will not return any nodes the user does not have view privileges on. This will also not return the nodes on which the workflow is inherited but will only return the nodes on which the workflow is explicitly set.

  Parameters
    `context` - The ContentContext object
    `workflowId` - The Workflow ID object
    `pageSize` - number of items per page in the PagedResult
  Returns
    A PagedResult of all the nodes for the workflow
  Throws
    `com.bea.content.RepositoryException`

### getTypesForWorkflow

    com.bea.content.ObjectClass[] getTypesForWorkflow(com.bea.content.ContentContext context,
                                                      com.bea.content.ID workflowId)
                                                      throws com.bea.content.RepositoryException

  Returns the Types associated with the given workflow. Will not return any types the user does not have view privileges on. This will also not return the types on which the workflow is inherited but will only return the types on which the workflow is explicitly set.

  Parameters
    `context` - The ContentContext object
    `workflowId` - The Workflow ID object
  Returns
    An Array of Types representing the workflow.
  Throws
    `com.bea.content.RepositoryException` - If the opoeration does not succeed.

### getTypesForWorkflow

    com.bea.p13n.pagination.SortableFilterablePagedResult<com.bea.content.ObjectClass> getTypesForWorkflow(com.bea.content.ContentContext context,
                                                                                                           com.bea.content.ID workflowId,
                                                                                                           int pageSize)
                                                                                                           throws com.bea.content.RepositoryException

  Returns the Types associated with the given workflow. Will not return any types the user does not have view privileges on. This will also not return the types on which the workflow is inherited but will only return the types on which the workflow is explicitly set.

  Parameters
    `context` - The ContentContext object
    `workflowId` - The Workflow ID object
    `pageSize` - number of items per page in the PagedResult
  Returns
    A PagedResult of all the types for the workflow
  Throws
    `com.bea.content.RepositoryException`

### getStream

    byte[] getStream(com.bea.content.ContentContext context,
                     com.bea.content.ID workflowId)
                     throws com.bea.content.RepositoryException

  Allow users to download the byte[] representing the document of the workflow.

  Parameters
    `context` -
    `workflowId` -
  Returns
    the byte[] representing the document of the workflow
  Throws
    `com.bea.content.RepositoryException`

### hasCreateCapability

    boolean hasCreateCapability(com.bea.content.ContentContext context,
                                String repositoryName,
                                com.bea.content.virtual.workflow.Workflow workflow)
                                throws com.bea.content.AuthorizationException

  Check to see if the given workflow hasCreateCapability

  Parameters
    `context` - The ContentContext object
    `repositoryName` - The name of the repository.
    `workflow` - The workflow. Null checks at the root
  Returns
    true or false depending on whether the workflow has the capability or not.
  Throws
    `com.bea.content.AuthorizationException`

### hasDeleteCapability

    boolean hasDeleteCapability(com.bea.content.ContentContext context,
                                String repositoryName,
                                com.bea.content.virtual.workflow.Workflow workflow)
                                throws com.bea.content.AuthorizationException

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

  Parameters
    `context` - The ContentContext object
    `repositoryName` - The name of the reposihey btory.
    `workflow` - The workflow. Null checks at the root
  Returns
    true or false depending on whether the workflow has the capability or not.
  Throws
    `com.bea.content.AuthorizationException`

### hasViewCapability

    boolean hasViewCapability(com.bea.content.ContentContext context,
                              String repositoryName,
                              com.bea.content.virtual.workflow.Workflow workflow)
                              throws com.bea.content.AuthorizationException

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

  Parameters
    `context` - The ContentContext object
    `repositoryName` - The name of the repository.
    `workflow` - The workflow. Null checks at the root
  Returns
    true or false depending on whether the workflow has the capability or not.
  Throws
    `com.bea.content.AuthorizationException`

### hasUpdateCapability

    boolean hasUpdateCapability(com.bea.content.ContentContext context,
                                String repositoryName,
                                com.bea.content.virtual.workflow.Workflow workflow)
                                throws com.bea.content.AuthorizationException

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

  Parameters
    `context` - The ContentContext object
    `repositoryName` - The name of the repository.
    `workflow` - The workflow. Null checks at the root
  Returns
    true or false depending on whether the workflow has the capability or not.
  Throws
    `com.bea.content.AuthorizationException`

### hasAssociateCapability

    boolean hasAssociateCapability(com.bea.content.ContentContext context,
                                   String repositoryName,
                                   com.bea.content.virtual.workflow.Workflow workflow)
                                   throws com.bea.content.AuthorizationException

  Check to see if the given workflow has CAN_ASSOCIATE capability for it to be associated with a node for the current user.

  Parameters
    `context` - The ContentContext object
    `repositoryName` - The name of the repository.
    `workflow` - The workflow. Null checks at the root
  Returns
    true or false depending on whether the workflow has the capability or not.
  Throws
    `com.bea.content.AuthorizationException`

### getStatusOptions

    List<String> getStatusOptions(com.bea.content.Node node,
                                  com.bea.content.virtual.version.Version version,
                                  com.bea.content.ContentContext contentContext)
                                  throws com.bea.content.RepositoryException

  Gets a list of valid workflow statuses that the given node version can transition to, considering the current workflow status

  Parameters
    `node` -
    `version` -
    `contentContext` -
  Returns
  Throws
    `com.bea.content.RepositoryException`

### getStatusOptionsMap

    Map<Integer,String> getStatusOptionsMap(com.bea.content.Node node,
                                            com.bea.content.virtual.version.Version version,
                                            com.bea.content.ContentContext contentContext)
                                            throws com.bea.content.RepositoryException

  Gets a list of valid workflow statuses (with corresponding int value) that the given node version can transition to, considering the current workflow status

  Parameters
    `node` -
    `version` -
    `contentContext` -
  Returns
  Throws
    `com.bea.content.RepositoryException`

### getWorkflowOrDefaultWorkflowForNode

    com.bea.content.virtual.workflow.Workflow getWorkflowOrDefaultWorkflowForNode(com.bea.content.ContentContext contentContext,
                                                                                  com.bea.content.Node node)
                                                                                  throws com.bea.content.RepositoryException

  If the given node has a workflow expicitly assigned to it, it is returned. Otherwise, the default workflow for the repository is returned.

  Parameters
    `contentContext` -
    `node` -
  Returns
  Throws
    `com.bea.content.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 © 2006 BEA Systems, Inc. All Rights Reserved