View Javadoc

1   /**
2    * Copyright 2005-2012 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.postprocessor;
17  
18  import org.kuali.rice.kew.framework.postprocessor.ActionTakenEvent;
19  import org.kuali.rice.kew.framework.postprocessor.AfterProcessEvent;
20  import org.kuali.rice.kew.framework.postprocessor.BeforeProcessEvent;
21  import org.kuali.rice.kew.framework.postprocessor.DeleteEvent;
22  import org.kuali.rice.kew.framework.postprocessor.DocumentLockingEvent;
23  import org.kuali.rice.kew.framework.postprocessor.DocumentRouteLevelChange;
24  import org.kuali.rice.kew.framework.postprocessor.DocumentRouteStatusChange;
25  import org.kuali.rice.kew.framework.postprocessor.PostProcessor;
26  import org.kuali.rice.kew.framework.postprocessor.ProcessDocReport;
27  
28  import java.util.List;
29  
30  
31  
32  /**
33   * A simple default implementation of the PostProcessor which can be used
34   * as a superclass for post processor which don't want to implement all
35   * the methods on the interface.  Simply returns a "true"
36   * ProcessDocReport for all events exception for deletion.
37   * 
38   * @author Kuali Rice Team (rice.collab@kuali.org)
39   */
40  public class DefaultPostProcessor implements PostProcessor {
41  
42      public ProcessDocReport doRouteStatusChange(DocumentRouteStatusChange statusChangeEvent) throws Exception {
43          return new ProcessDocReport(true, "");
44      }
45  
46      public ProcessDocReport doRouteLevelChange(DocumentRouteLevelChange levelChangeEvent) throws Exception {
47          return new ProcessDocReport(true, "");
48      }
49  
50      public ProcessDocReport doDeleteRouteHeader(DeleteEvent event) throws Exception {
51          return new ProcessDocReport(false, "");
52      }
53  
54      public ProcessDocReport doActionTaken(ActionTakenEvent event) throws Exception {
55          return new ProcessDocReport(true, "");
56      }
57  
58      public ProcessDocReport beforeProcess(BeforeProcessEvent event) throws Exception {
59          return new ProcessDocReport(true, "");
60      }
61  
62      public ProcessDocReport afterProcess(AfterProcessEvent event) throws Exception {
63          return new ProcessDocReport(true, "");
64      }
65  
66  	public List<String> getDocumentIdsToLock(DocumentLockingEvent lockingEvent)
67  			throws Exception {
68  		return null;
69  	}
70      
71      
72  
73  }