public final class WorkflowDocumentFactory extends Object
WorkflowDocumentProvider SPI as a strategy
for creating WorkflowDocument instances.
The provider class is specified in the following file in the class loader: "META-INF/services/org.kuali.rice.kew.api.WorkflowDocument",
and should implement the WorkflowDocumentProvider interface.| Constructor and Description |
|---|
WorkflowDocumentFactory() |
| Modifier and Type | Method and Description |
|---|---|
static WorkflowDocument |
createDocument(String principalId,
String documentTypeName)
Creates a new workflow document of the given type with the given initiator.
|
static WorkflowDocument |
createDocument(String principalId,
String documentTypeName,
DocumentUpdate documentUpdate,
DocumentContentUpdate documentContentUpdate)
Creates a new workflow document of the given type with the given initiator.
|
static WorkflowDocument |
createDocument(String principalId,
String documentTypeName,
String title)
Creates a new workflow document of the given type with the given initiator.
|
static WorkflowDocument |
loadDocument(String principalId,
String documentId)
Loads an existing workflow document.
|
public WorkflowDocumentFactory()
public static WorkflowDocument createDocument(String principalId, String documentTypeName)
principalId - the document initiatordocumentTypeName - the document typeIllegalArgumentException - if principalId is null or blankIllegalArgumentException - if documentTypeName is null or blankIllegalDocumentTypeException - if the document type does not allow for creation of a document,
this can occur when the given document type is used only as a parent and has no route path configuredInvalidActionTakenException - if the caller is not allowed to execute this actionpublic static WorkflowDocument createDocument(String principalId, String documentTypeName, String title)
principalId - the document initiatordocumentTypeName - the document typetitle - the title of the new documentIllegalArgumentException - if principalId is null or blankIllegalArgumentException - if documentTypeName is null or blankIllegalDocumentTypeException - if documentTypeName does not represent a valid document typepublic static WorkflowDocument createDocument(String principalId, String documentTypeName, DocumentUpdate documentUpdate, DocumentContentUpdate documentContentUpdate)
principalId - the document initiatordocumentTypeName - the document typedocumentUpdate - pre-constructed state with which to initialize the documentdocumentContentUpdate - pre-constructed document content with which to initialize the documentIllegalArgumentException - if principalId is null or blankIllegalArgumentException - if documentTypeName is null or blankIllegalDocumentTypeException - if documentTypeName does not represent a valid document typeWorkflowDocumentProvider.createDocument(String, String, DocumentUpdate, DocumentContentUpdate)public static WorkflowDocument loadDocument(String principalId, String documentId)
principalId - the principal id under which to perform document actionsdocumentId - the id of the document to loadIllegalArgumentException - if principalId is null or blankIllegalArgumentException - if documentTypeName is null or blankIllegalDocumentTypeException - if the specified document type is not activeIllegalDocumentTypeException - if the specified document type does not support document
creation (in other words, it's a document type that is only used as a parent)InvalidActionTakenException - if the supplied principal is not allowed to execute this
actionWorkflowDocumentProvider.loadDocument(String, String)Copyright © 2005–2015 The Kuali Foundation. All rights reserved.