001/**
002 * Copyright 2005-2017 The Kuali Foundation
003 *
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/ecl2.php
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016package org.kuali.rice.kew.postprocessor;
017
018import org.kuali.rice.kew.api.action.ActionType;
019import org.kuali.rice.kew.framework.postprocessor.ActionTakenEvent;
020import org.kuali.rice.kew.framework.postprocessor.AfterProcessEvent;
021import org.kuali.rice.kew.framework.postprocessor.BeforeProcessEvent;
022import org.kuali.rice.kew.framework.postprocessor.DeleteEvent;
023import org.kuali.rice.kew.framework.postprocessor.DocumentLockingEvent;
024import org.kuali.rice.kew.framework.postprocessor.DocumentRouteLevelChange;
025import org.kuali.rice.kew.framework.postprocessor.DocumentRouteStatusChange;
026import org.kuali.rice.kew.framework.postprocessor.PostProcessor;
027import org.kuali.rice.kew.framework.postprocessor.ProcessDocReport;
028
029import java.util.List;
030
031
032
033/**
034 * A simple default implementation of the PostProcessor which can be used
035 * as a superclass for post processor which don't want to implement all
036 * the methods on the interface.  Simply returns a "true"
037 * ProcessDocReport for all events exception for deletion.
038 * 
039 * @author Kuali Rice Team (rice.collab@kuali.org)
040 */
041public class DefaultPostProcessor implements PostProcessor {
042
043    public ProcessDocReport doRouteStatusChange(DocumentRouteStatusChange statusChangeEvent) throws Exception {
044        return new ProcessDocReport(true, "");
045    }
046
047    public ProcessDocReport doRouteLevelChange(DocumentRouteLevelChange levelChangeEvent) throws Exception {
048        return new ProcessDocReport(true, "");
049    }
050
051    public ProcessDocReport doDeleteRouteHeader(DeleteEvent event) throws Exception {
052        return new ProcessDocReport(false, "");
053    }
054
055    public ProcessDocReport doActionTaken(ActionTakenEvent event) throws Exception {
056        return new ProcessDocReport(true, "");
057    }
058
059    public ProcessDocReport afterActionTaken(ActionType performed, ActionTakenEvent event) throws Exception {
060        return new ProcessDocReport(true, "");
061    }
062
063    public ProcessDocReport beforeProcess(BeforeProcessEvent event) throws Exception {
064        return new ProcessDocReport(true, "");
065    }
066
067    public ProcessDocReport afterProcess(AfterProcessEvent event) throws Exception {
068        return new ProcessDocReport(true, "");
069    }
070
071        public List<String> getDocumentIdsToLock(DocumentLockingEvent lockingEvent)
072                        throws Exception {
073                return null;
074        }
075    
076    
077
078}