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 IWorkflowManager

    public interface IWorkflowManager

Interface to associate and manage Workflows for a repository, while honoring DA constraints placed on them.

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

Note: new methods may be added to this interface periodically -- therefore, this 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
`Workflow` | `addWorkflow(ContentContext context, String repositoryName, String name, String comment, byte[] data)` Add a new workflow document to the system.
`ISortableFilterablePagedList<Workflow>` | `getAllAssociableWorkflows(ContentContext context, String repositoryName)` Returns all the workflows in the specified repository [Including the Default Workflow document] to which the user has ASSOCIATION capability.
`ISortableFilterablePagedList<Workflow>` | `getAllWorkflows(ContentContext context, String repositoryName)` Returns all the workflows in the specified repository [Including the Default Workflow document] Please note that these workflow documents are lightweight objects and do not contain the actual workflow data.
`Workflow` | `getDefaultWorkflow(ContentContext context, String repositoryName)` Returns the default workflow for the given repository.
`ISortableFilterablePagedList<Node>` | `getNodesForWorkflow(ContentContext context, ID workflowId)` Returns the Nodes associated with the given workflow.
`byte[]` | `getStream(ContentContext context, ID workflowId)` Allow users to download the byte[] representing the document of the workflow.
`ISortableFilterablePagedList<ObjectClass>` | `getTypesForWorkflow(ContentContext context, ID workflowId)` Returns the Types associated with the given workflow.
`Workflow` | `getWorkflow(ContentContext context, ID id)` Return a specific workflow document with the given id.
`Workflow` | `getWorkflow(ContentContext context, String repositoryName, String name)` Return a specific workflow document with the given name The user needs to have VIEW or ASSOCIATE capability on the workflow.
`Workflow` | `getWorkflowForNode(ContentContext context, ID nodeId)` Returns the workflow document associated with the node.
`Workflow` | `getWorkflowForType(ContentContext context, ID typeId)` Get the workflow for the type.
`boolean` | `hasCapability(ContentContext context, String repositoryName, Workflow workflow, WorkflowCapability capability)` Check to see if the caller has the specified security capability on a node
`void` | `remove(ContentContext context, ID id)` Delete the specified workflow document from the system.
`Workflow` | `save(ContentContext context, ID id, byte[] data)` Updates the workflow document data.
`Workflow` | `save(ContentContext context, ID id, String name, String comment)` Update the workflow document meta-data.
`Workflow` | `setDefaultWorkflow(ContentContext context, String repositoryName, byte[] data)` Sets a default workflow for the repository
`void` | `setNodeWorkflow(ContentContext context, ID nodeId, ID workflowId)` Sets the specific workflow document to the given node.
`void` | `setTypeWorkflow(ContentContext context, ID typeId, ID workflowId)` Sets the specific workflow document to the given type.

Method Detail

### addWorkflow

    Workflow addWorkflow(ContentContext context,
                         String repositoryName,
                         String name,
                         String comment,
                         byte[] data)
                         throws WorkflowExistsException,
                                DefaultWorkflowException,
                                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
    `WorkflowExistsException` - If the workflow with the specified name already exists.
    `DefaultWorkflowException` - If user tried to add a default workflow in the system.
    `RepositoryException` - If the workflow was not added due to other problem.

### remove

    void remove(ContentContext context,
                ID id)
                throws DefaultWorkflowException,
                       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
    `DefaultWorkflowException` - If user tried to delete the default workflow.
    `RepositoryException` - If the workflow was not deleted due to some other problem.

### getAllWorkflows

    ISortableFilterablePagedList<Workflow> getAllWorkflows(ContentContext context,
                                                           String repositoryName)
                                                           throws RepositoryException

  Returns all the workflows in the specified repository [Including the Default Workflow 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
    `RepositoryException` - If workflows cannot be retrieved due to some other issue.

### getAllAssociableWorkflows

    ISortableFilterablePagedList<Workflow> getAllAssociableWorkflows(ContentContext context,
                                                                     String repositoryName)
                                                                     throws RepositoryException

  Returns all the workflows in the specified repository [Including the Default Workflow document] to which the user has ASSOCIATION 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.
  Throws
    `RepositoryException` - If workflows cannot be retrieved due to some other issue.

### getWorkflow

    Workflow getWorkflow(ContentContext context,
                         ID id)
                         throws NoSuchWorkflowException,
                                RepositoryException

  Return a specific workflow document with the given id. The user needs to have VIEW or ASSOCIATE capability on the workflow.

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

### getWorkflow

    Workflow getWorkflow(ContentContext context,
                         String repositoryName,
                         String name)
                         throws NoSuchWorkflowException,
                                RepositoryException

  Return a specific workflow document with the given name The user needs to have VIEW or ASSOCIATE capability on the workflow.

  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
    `NoSuchWorkflowException` - If the workflow document does not exist.
    `RepositoryException` - If some other error happens.

### getDefaultWorkflow

    Workflow getDefaultWorkflow(ContentContext context,
                                String repositoryName)
                                throws RepositoryException

  Returns the default workflow for the given repository. Every repository has one default workflow associated with it. The user needs to have VIEW or ASSOCIATE capability on the workflow.

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

### setDefaultWorkflow

    Workflow setDefaultWorkflow(ContentContext context,
                                String repositoryName,
                                byte[] data)
                                throws 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
    `RepositoryException`

### save

    Workflow save(ContentContext context,
                  ID id,
                  String name,
                  String comment)
                  throws 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
    `RepositoryException` - If the the update of the metadata fails for some reason

### save

    Workflow save(ContentContext context,
                  ID id,
                  byte[] data)
                  throws RepositoryException

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

  Parameters
    `context` - The ContentContext object
    `id` - The ID of the workflow
    `data` - The data associated with the workflow
  Throws
    `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(ContentContext context,
                         ID nodeId,
                         ID workflowId)
                         throws 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
    `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(ContentContext context,
                         ID typeId,
                         ID workflowId)
                         throws 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
    `RepositoryException` - If the operation fails for some reason.

### getWorkflowForNode

    Workflow getWorkflowForNode(ContentContext context,
                                ID nodeId)
                                throws AuthorizationException,
                                       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. The user needs to have VIEW or ASSOCIATE capability on the workflow.

  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
    `RepositoryException` - if the operation does not succeed.
    `AuthorizationException`

### getWorkflowForType

    Workflow getWorkflowForType(ContentContext context,
                                ID typeId)
                                throws AuthorizationException,
                                       RepositoryException

  Get the workflow for the type. The user needs to have VIEW or ASSOCIATE capability on the workflow.

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

### getNodesForWorkflow

    ISortableFilterablePagedList<Node> getNodesForWorkflow(ContentContext context,
                                                           ID workflowId)
                                                           throws 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
    `RepositoryException` - If the opoeration does not succeed.

### getTypesForWorkflow

    ISortableFilterablePagedList<ObjectClass> getTypesForWorkflow(ContentContext context,
                                                                  ID workflowId)
                                                                  throws 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
    `RepositoryException` - If the opoeration does not succeed.

### getStream

    byte[] getStream(ContentContext context,
                     ID workflowId)
                     throws RepositoryException

  Allow users to download the byte[] representing the document of the workflow. The user needs to have VIEW or ASSOCIATE capability on the workflow.

  Parameters
    `context` -
    `workflowId` -
  Returns
    a byte array of the document data
  Throws
    `RepositoryException`

### hasCapability

    boolean hasCapability(ContentContext context,
                          String repositoryName,
                          Workflow workflow,
                          WorkflowCapability capability)
                          throws AuthorizationException

  Check to see if the caller has the specified security capability on a node

  Parameters
    `context` - The ContentContext object
    `repositoryName` - The name of the repository
    `workflow` - The workflow.
    `capability` - The capability to check for.
  Returns
    true or false depending on whether the caller has the capability on the workflow or not.
  Throws
    `AuthorizationException`

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