Coverage Report - org.kuali.rice.kew.postprocessor.PostProcessorRemoteAdapter
 
Classes in this File Line Coverage Branch Coverage Complexity
PostProcessorRemoteAdapter
0%
0/14
0%
0/2
1.222
 
 1  
 /*
 2  
  * Copyright 2005-2007 The Kuali Foundation
 3  
  * 
 4  
  * 
 5  
  * Licensed under the Educational Community License, Version 2.0 (the "License");
 6  
  * you may not use this file except in compliance with the License.
 7  
  * You may obtain a copy of the License at
 8  
  * 
 9  
  * http://www.opensource.org/licenses/ecl2.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 org.kuali.rice.kew.postprocessor;
 18  
 
 19  
 import java.util.Arrays;
 20  
 import java.util.List;
 21  
 
 22  
 import org.kuali.rice.kew.dto.DTOConverter;
 23  
 
 24  
 
 25  
 /**
 26  
  * Adapts a {@link PostProcessorRemote} implementation to the {@link PostProcessor} interface.
 27  
  *
 28  
  * @see PostProcessorRemote
 29  
  * @see PostProcessor
 30  
  *
 31  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 32  
  */
 33  
 public class PostProcessorRemoteAdapter implements PostProcessor {
 34  
 
 35  
     public PostProcessorRemote postProcessor;
 36  
     
 37  0
     public PostProcessorRemoteAdapter(PostProcessorRemote postProcessor) {
 38  0
         this.postProcessor = postProcessor;
 39  0
     }
 40  
     
 41  
     public ProcessDocReport doRouteStatusChange(DocumentRouteStatusChange statusChangeEvent) throws Exception {
 42  0
         return new ProcessDocReport(postProcessor.doRouteStatusChange(DTOConverter.convertDocumentRouteStatusChange(statusChangeEvent)));
 43  
     }
 44  
 
 45  
     public ProcessDocReport doRouteLevelChange(DocumentRouteLevelChange levelChangeEvent) throws Exception {
 46  0
         return new ProcessDocReport(postProcessor.doRouteLevelChange(DTOConverter.convertDocumentRouteLevelChange(levelChangeEvent)));
 47  
     }
 48  
 
 49  
     public ProcessDocReport doDeleteRouteHeader(DeleteEvent deleteEvent) throws Exception {
 50  0
         return new ProcessDocReport(postProcessor.doDeleteRouteHeader(DTOConverter.convertDeleteEvent(deleteEvent)));
 51  
     }
 52  
     
 53  
     public ProcessDocReport doActionTaken(ActionTakenEvent actionTakenEvent) throws Exception {
 54  0
         return new ProcessDocReport(postProcessor.doActionTaken(DTOConverter.convertActionTakenEvent(actionTakenEvent)));
 55  
     }
 56  
     
 57  
     public ProcessDocReport beforeProcess(BeforeProcessEvent event) throws Exception {
 58  0
         return new ProcessDocReport(postProcessor.beforeProcess(DTOConverter.convertBeforeProcessEvent(event)));
 59  
     }
 60  
 
 61  
     public ProcessDocReport afterProcess(AfterProcessEvent event) throws Exception {
 62  0
         return new ProcessDocReport(postProcessor.afterProcess(DTOConverter.convertAfterProcessEvent(event)));
 63  
     }
 64  
     
 65  
     public List<String> getDocumentIdsToLock(DocumentLockingEvent event) throws Exception {
 66  0
             String[] documentIdsToLock = postProcessor.getDocumentIdsToLock(DTOConverter.convertDocumentLockingEvent(event));
 67  0
             if (documentIdsToLock == null) {
 68  0
                     return null;
 69  
             }
 70  0
             return Arrays.asList(documentIdsToLock);
 71  
     }
 72  
     
 73  
     public PostProcessorRemote getPostProcessorRemote() {
 74  0
             return postProcessor;
 75  
     }
 76  
 }