com.bea.content.spi.flexspi.ticket
Interface WorkflowOpsV1

All Superinterfaces
ISPIMarker, ISPITicketMarker, Serializable
All Known Subinterfaces:
WorkflowOpsV2

public interface WorkflowOpsV1
extends ISPITicketMarker

WorkflowOps is a Ticket interface for Workflow CRUD operations. This 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.


Nested Class Summary
static class WorkflowOpsV1.MethodName
           
 
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.
 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 getWorkflowWithId(ID id)
          Return a specific workflow document with the given id
 Workflow getWorkflowWithName(String name)
          Return a specific workflow document with the given name
 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 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.
Returns
the newly added workflow
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.
WorkflowInUseException - If the user tried to delete a workflow which was in use.
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.
Returns
the workflow documents, or an empty array if none exist
Throws
RepositoryException - If workflows cannot be retrieved due to some other issue.

getWorkflowWithId

Workflow getWorkflowWithId(ID id)
                           throws 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.

getWorkflowWithName

Workflow getWorkflowWithName(String name)
                             throws 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 default 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
Returns
the workflow document
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.
Returns
the workflow document
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
Returns
the workflow document
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, or NULL. 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, or NULL. 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, empty if none exist
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, empty if none exist
Throws
RepositoryException - If the operation does not succeed.

getWorkflowDocument

byte[] getWorkflowDocument(ID workflowId)
                           throws 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.


Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.