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.spi
Interface WorkflowOps

    public interface WorkflowOps

The WorkflowOps interface contains methods to manage workflows for a given repository. A Workflow represents the workflow a node goes through from it's starting point (DRAFT) to the end point (PUBLISHED) by default. This interface allows users to customize the workflow actions associated with the node as well as the status associated with each action.

Method Summary
`Workflow` | `addWorkflow(String name, String comment, byte[] data)` Add a new workflow document to the system.
`void` | `deleteWorkflow(ID id)` Delete the specified workflow document from the system.
`Workflow[]` | `getAllWorkflows(QueryCriteria queryCriteria)` 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()` Returns the default workflow for the given repository.
`Set<String>` | `getNativeFilterableProperties()` Returns a set of property names which the repository can filter natively (within the repository instead of the federated API) for paging purposes.
`Set<String>` | `getNativeSortableProperties()` Returns a set of property names which the repository can sort natively (within the repository instead of the federated API) for paging purposes.
`ID[]` | `getNodeIDsForWorkflow(ID workflowId, QueryCriteria queryCriteria)` Returns the Node IDs associated with the given workflow.
`ID[]` | `getTypeIDsForWorkflow(ID workflowId, QueryCriteria queryCriteria)` Returns the Type IDs associated with the given workflow.
`Workflow` | `getWorkflow(ID id)` Return a specific workflow document with the given id
`Workflow` | `getWorkflow(String name)` Return a specific workflow document with the given name
`byte[]` | `getWorkflowDocument(ID workflowId)` Return the document associated with the workflow.
`Workflow` | `getWorkflowForNode(ID nodeId)` Returns the workflow document associated with the node.
`Workflow` | `getWorkflowForType(ID typeId)` Returns the workflow document associated with the type.
`Workflow` | `setDefaultWorkflow(byte[] data)` Allows a user to set a default workflow for the entire repository.
`void` | `setNodeWorkflow(ID nodeId, ID workflowId)` Sets the specific workflow document to the given node.
`void` | `setTypeWorkflow(ID typeId, ID workflowId)` Sets the specific workflow document to the given type.
`Workflow` | `updateWorkflowDocument(ID id, byte[] data)` Updates the workflow document data.
`Workflow` | `updateWorkflowMetaData(ID id, String name, String comment)` Update the workflow document meta-data.

Method Detail

### addWorkflow

    Workflow addWorkflow(String name,
                         String comment,
                         byte[] data)
                         throws WorkflowExistsException,
                                DefaultWorkflowException,
                                RepositoryException

  Add a new workflow document to the system.

  Parameters
    `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.

### deleteWorkflow

    void deleteWorkflow(ID id)
                        throws RepositoryException

  Delete the specified workflow document from the system.

  Parameters
    `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

    Workflow[] getAllWorkflows(QueryCriteria queryCriteria)
                               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.

  Parameters
    `queryCriteria` - The query criteria for this operation.
  Throws
    `RepositoryException` - If workflows cannot be retrieved due to some other issue.

### getWorkflow

    Workflow getWorkflow(ID id)
                         throws NoSuchWorkflowException,
                                RepositoryException

  Return a specific workflow document with the given id

  Parameters
    `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(String name)
                         throws NoSuchWorkflowException,
                                RepositoryException

  Return a specific workflow document with the given name

  Parameters
    `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()
                                throws RepositoryException

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

  Returns
    The Workflow representing the workflow documemnt.
  Throws
    `RepositoryException` - If there is another exception in the repository.

### setDefaultWorkflow

    Workflow setDefaultWorkflow(byte[] data)
                                throws RepositoryException

  Allows a user to set a default workflow for the entire repository.

  Parameters
    `data` - The workflow data
  Throws
    `RepositoryException` - If there is another exception in the repository.

### updateWorkflowMetaData

    Workflow updateWorkflowMetaData(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
    `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

### updateWorkflowDocument

    Workflow updateWorkflowDocument(ID id,
                                    byte[] data)
                                    throws RepositoryException

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

  Parameters
    `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(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
    `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.

### setTypeWorkflow

    void setTypeWorkflow(ID typeId,
                         ID workflowId)
                         throws RepositoryException

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

  Parameters
    `typeId` - The TypeId
    `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. This can also be thrown if a node already has a workflow associated with it.

### getWorkflowForNode

    Workflow getWorkflowForNode(ID nodeId)
                                throws RepositoryException

  Returns the workflow document associated with the node.

  Parameters
    `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.

### getWorkflowForType

    Workflow getWorkflowForType(ID typeId)
                                throws RepositoryException

  Returns the workflow document associated with the type.

  Parameters
    `typeId` - The type ID object.
  Returns
    The workflowObject for that type. If the type has no workflow object associated with it, it should return null.
  Throws
    `RepositoryException` - if the operation does not succeed.

### getNodeIDsForWorkflow

    ID[] getNodeIDsForWorkflow(ID workflowId,
                               QueryCriteria queryCriteria)
                               throws RepositoryException

  Returns the Node IDs associated with the given workflow.

  Parameters
    `workflowId` - The Workflow ID object
    `queryCriteria` - The query criteria for this operation
  Returns
    An Array of Node IDs associated with the workflow
  Throws
    `RepositoryException` - If the operation does not succeed.

### getTypeIDsForWorkflow

    ID[] getTypeIDsForWorkflow(ID workflowId,
                               QueryCriteria queryCriteria)
                               throws RepositoryException

  Returns the Type IDs associated with the given workflow.

  Parameters
    `workflowId` - The Workflow ID object
    `queryCriteria` - The query criteria for this operation
  Returns
    An Array of Type IDs associated with the workflow
  Throws
    `RepositoryException` - If the operation does not succeed.

### getWorkflowDocument

    byte[] getWorkflowDocument(ID workflowId)
                               throws NoSuchWorkflowException,
                                      RepositoryException

  Return the document associated with the workflow. Since the getWorkflow method does not actually load the document, it is lazily loaded with this method on demand.

  Parameters
    `workflowId` - The ID of the workflow
  Returns
    The binary representation of the workflow document.
  Throws
    `NoSuchWorkflowException` - if workflow does not exist.
    `RepositoryException`

### getNativeSortableProperties

    Set<String> getNativeSortableProperties()
                                            throws RepositoryException

  Returns a set of property names which the repository can sort natively (within the repository instead of the federated API) for paging purposes.

  Returns
    The property names which can be sorted at the repository level.
  Throws
    `RepositoryException` - If the operation does not succeed.

### getNativeFilterableProperties

    Set<String> getNativeFilterableProperties()
                                              throws RepositoryException

  Returns a set of property names which the repository can filter natively (within the repository instead of the federated API) for paging purposes.

  Returns
    The property names which can be filtered at the repository level.
  Throws
    `RepositoryException` - If the operation does not succeed.

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