01: /*
02: * Copyright 2005-2006 The Kuali Foundation.
03: *
04: *
05: * Licensed under the Educational Community License, Version 1.0 (the "License");
06: * you may not use this file except in compliance with the License.
07: * You may obtain a copy of the License at
08: *
09: * http://www.opensource.org/licenses/ecl1.php
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17: package edu.iu.uis.eden.workgroup;
18:
19: import edu.iu.uis.eden.DocumentRouteLevelChange;
20: import edu.iu.uis.eden.DocumentRouteStatusChange;
21: import edu.iu.uis.eden.EdenConstants;
22: import edu.iu.uis.eden.KEWServiceLocator;
23: import edu.iu.uis.eden.clientapp.DeleteEvent;
24: import edu.iu.uis.eden.exception.ResourceUnavailableException;
25: import edu.iu.uis.eden.postprocessor.DefaultPostProcessor;
26: import edu.iu.uis.eden.postprocessor.PostProcessor;
27: import edu.iu.uis.eden.postprocessor.ProcessDocReport;
28:
29: /**
30: * The {@link PostProcessor} for Workgroup documents. Simply delegates to
31: * {@link WorkgroupRoutingService#activateRoutedWorkgroup(Long)}.
32: *
33: * @see PostProcessor
34: * @see WorkgroupRoutingService#activateRoutedWorkgroup(Long)
35: *
36: * @author rkirkend
37: */
38: public class WorkgroupPostProcessor extends DefaultPostProcessor {
39:
40: public ProcessDocReport doRouteStatusChange(
41: DocumentRouteStatusChange statusChangeEvent)
42: throws Exception, ResourceUnavailableException {
43: if (EdenConstants.ROUTE_HEADER_PROCESSED_CD
44: .equals(statusChangeEvent.getNewRouteStatus())) {
45: KEWServiceLocator.getWorkgroupRoutingService()
46: .activateRoutedWorkgroup(
47: statusChangeEvent.getRouteHeaderId());
48: }
49: return new ProcessDocReport(true, "");
50: }
51:
52: public ProcessDocReport doRouteLevelChange(
53: DocumentRouteLevelChange levelChangeEvent)
54: throws Exception, ResourceUnavailableException {
55: return new ProcessDocReport(true, "");
56: }
57:
58: public ProcessDocReport doDeleteRouteHeader(DeleteEvent event)
59: throws Exception, ResourceUnavailableException {
60: return new ProcessDocReport(true, "");
61: }
62:
63: }
|