Coverage Report - org.kuali.rice.kew.framework.postprocessor.PostProcessor
 
Classes in this File Line Coverage Branch Coverage Complexity
PostProcessor
N/A
N/A
1
 
 1  
 /**
 2  
  * Copyright 2005-2011 The Kuali Foundation
 3  
  *
 4  
  * Licensed under the Educational Community License, Version 2.0 (the "License");
 5  
  * you may not use this file except in compliance with the License.
 6  
  * You may obtain a copy of the License at
 7  
  *
 8  
  * http://www.opensource.org/licenses/ecl2.php
 9  
  *
 10  
  * Unless required by applicable law or agreed to in writing, software
 11  
  * distributed under the License is distributed on an "AS IS" BASIS,
 12  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 13  
  * See the License for the specific language governing permissions and
 14  
  * limitations under the License.
 15  
  */
 16  
 package org.kuali.rice.kew.framework.postprocessor;
 17  
 
 18  
 import java.util.List;
 19  
 
 20  
 
 21  
 
 22  
 /**
 23  
  * Hook for applications to perform logic due to workflow events from the engine.
 24  
  * 
 25  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 26  
  */
 27  
 public interface PostProcessor {
 28  
 
 29  
         /**
 30  
          * Executed whenever the status of the document changes.
 31  
          * 
 32  
          * @return ProcessDocReport indicating if the status change succeeded
 33  
          */
 34  
     public ProcessDocReport doRouteStatusChange(DocumentRouteStatusChange statusChangeEvent) throws Exception;
 35  
     
 36  
     /**
 37  
          * Executed whenever the document transitions from one node to another.
 38  
          * 
 39  
          * @return ProcessDocReport indicating if the node transition succeeded
 40  
          */
 41  
     public ProcessDocReport doRouteLevelChange(DocumentRouteLevelChange levelChangeEvent) throws Exception;
 42  
     
 43  
     /**
 44  
          * Executed whenever a deletion of the document is required.
 45  
          * 
 46  
          * @return ProcessDocReport indicating if the deletion should be permitted to occur or not
 47  
          */
 48  
     public ProcessDocReport doDeleteRouteHeader(DeleteEvent event) throws Exception;
 49  
     
 50  
     /**
 51  
      * Executed whenever an action is taken against the document.
 52  
      * 
 53  
      * @return ProcessDocReport indicating whether or not the action should succeed
 54  
      */
 55  
     public ProcessDocReport doActionTaken(ActionTakenEvent event) throws Exception;
 56  
     
 57  
     /**
 58  
      * Executed prior to processing by the workflow engine.
 59  
      *
 60  
      * @return ProcessDocReport indicating whether or not the document processing should be allowed to proceed
 61  
      */
 62  
     public ProcessDocReport beforeProcess(BeforeProcessEvent processEvent) throws Exception;
 63  
 
 64  
     /**
 65  
      * Executed after processing by the workflow engine has completed.
 66  
      *
 67  
      * @return ProcessDocReport indicating whether or not the document was successfully processed
 68  
      */
 69  
     public ProcessDocReport afterProcess(AfterProcessEvent processEvent) throws Exception;
 70  
     
 71  
     /**
 72  
      * Executed prior to document locking in the workflow engine.  This method returns a List of document
 73  
      * ids to lock prior to execution of the document in the workflow engine.  If the engine processing is
 74  
      * going to result in updates to any other documents, they should be locked at the beginning of the engine
 75  
      * processing transaction.  This method facilitates that.
 76  
      * 
 77  
      * <p>Note that, by default, the id of the document that is being processed by the engine is always
 78  
      * locked.  So there is no need to return that document id in the list of document ids to lock.
 79  
      * 
 80  
      * @return a List of document ids to lock prior to execution of the workflow engine
 81  
      */
 82  
     public List<String> getDocumentIdsToLock(DocumentLockingEvent lockingEvent) throws Exception;
 83  
     
 84  
 }