Coverage Report - org.kuali.rice.kew.actions.SuperUserReturnToPreviousNodeAction
 
Classes in this File Line Coverage Branch Coverage Complexity
SuperUserReturnToPreviousNodeAction
0%
0/14
0%
0/2
1.25
 
 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.actions;
 17  
 
 18  
 import org.kuali.rice.kew.api.exception.InvalidActionTakenException;
 19  
 import org.kuali.rice.kew.api.exception.WorkflowException;
 20  
 import org.kuali.rice.kew.routeheader.DocumentRouteHeaderValue;
 21  
 import org.kuali.rice.kew.api.KewApiConstants;
 22  
 import org.kuali.rice.kim.api.identity.principal.PrincipalContract;
 23  
 
 24  
 
 25  
 
 26  
 /**
 27  
  * Does a return to previous as a superuser
 28  
  * 
 29  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 30  
  */
 31  
 public class SuperUserReturnToPreviousNodeAction extends SuperUserActionTakenEvent {
 32  
     
 33  
     private String nodeName;
 34  
     
 35  
     public SuperUserReturnToPreviousNodeAction(DocumentRouteHeaderValue routeHeader, PrincipalContract principal) {
 36  0
         super(KewApiConstants.ACTION_TAKEN_SU_RETURNED_TO_PREVIOUS_CD, routeHeader, principal);
 37  0
         this.superUserAction = KewApiConstants.SUPER_USER_RETURN_TO_PREVIOUS_ROUTE_LEVEL;
 38  0
     }
 39  
     
 40  
     public SuperUserReturnToPreviousNodeAction(DocumentRouteHeaderValue routeHeader, PrincipalContract principal, String annotation, boolean runPostProcessor, String nodeName) {
 41  0
         super(KewApiConstants.ACTION_TAKEN_SU_RETURNED_TO_PREVIOUS_CD, routeHeader, principal, annotation, runPostProcessor);
 42  0
         this.superUserAction = KewApiConstants.SUPER_USER_RETURN_TO_PREVIOUS_ROUTE_LEVEL;
 43  0
         this.nodeName = nodeName;
 44  0
     }
 45  
     
 46  
     protected void markDocument() throws WorkflowException {
 47  0
         if (getRouteHeader().isInException()) {
 48  
             //this.event = new DocumentRouteStatusChange(this.documentId, this.getRouteHeader().getAppDocId(), this.getRouteHeader().getDocRouteStatus(), KewApiConstants.ROUTE_HEADER_ENROUTE_CD);
 49  0
             getRouteHeader().markDocumentEnroute();
 50  
         }
 51  0
         ReturnToPreviousNodeAction returnAction = new ReturnToPreviousNodeAction(this.getActionTakenCode(), getRouteHeader(), getPrincipal(), annotation, nodeName, true, isRunPostProcessorLogic());
 52  0
         returnAction.setSuperUserUsage(true);
 53  0
         returnAction.performAction();
 54  0
     }
 55  
     
 56  
     protected void processActionRequests() throws InvalidActionTakenException {
 57  
         //do nothing
 58  0
     }
 59  
 
 60  
 }