Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright 2005-2013 The Kuali Foundation Licensed under the Educational Community License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.opensource.org/licenses/ecl2.php Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
package org.kuali.rice.kew.impl.document;
Service provider interface for creation and loading of org.kuali.rice.kew.api.WorkflowDocuments. NOTE: WorkflowDocumentFactory constructs a single global instance, so implementations of this interface must be thread-safe.

Author(s):
Kuali Rice Team (rice.collab@kuali.org)
public interface WorkflowDocumentProvider {
     
Creates a new workflow document of the given type with the given initiator.

Parameters:
principalId the document initiator
documentTypeName the document type
documentUpdate pre-constructed state with which to initialize the document
documentContentUpdate pre-constructed document content with which to initialize the document
Returns:
a WorkflowDocument object through which to interact with the new workflow document
Throws:
java.lang.IllegalArgumentException if principalId is null or blank
java.lang.IllegalArgumentException if documentTypeName is null or blank
org.kuali.rice.kew.api.doctype.IllegalDocumentTypeException if documentTypeName does not represent a valid document type
    WorkflowDocument createDocument(String principalIdString documentTypeNameDocumentUpdate documentUpdateDocumentContentUpdate documentContentUpdate);

    
Loads an existing workflow document.

Parameters:
principalId the principal id under which to perform document actions
documentId the id of the document to load
Returns:
a WorkflowDocument object through which to interact with the loaded workflow document
Throws:
java.lang.IllegalArgumentException if principalId is null or blank
java.lang.IllegalArgumentException if documentTypeName is null or blank
org.kuali.rice.kew.api.doctype.IllegalDocumentTypeException if the specified document type is not active
org.kuali.rice.kew.api.doctype.IllegalDocumentTypeException 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)
org.kuali.rice.kew.api.action.InvalidActionTakenException if the supplied principal is not allowed to execute this action
See also:
loadDocument(java.lang.String,java.lang.String)
    WorkflowDocument loadDocument(String principalIdString documentId);
New to GrepCode? Check out our FAQ X