Coverage Report - org.kuali.rice.kew.engine.OrchestrationConfig
 
Classes in this File Line Coverage Branch Coverage Complexity
OrchestrationConfig
0%
0/20
N/A
1
OrchestrationConfig$EngineCapability
0%
0/1
N/A
1
 
 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.engine;
 17  
 
 18  
 import org.kuali.rice.kew.actiontaken.ActionTakenValue;
 19  
 import org.kuali.rice.kew.api.KewApiConstants;
 20  
 
 21  
 import java.util.Collections;
 22  
 import java.util.HashSet;
 23  
 import java.util.Set;
 24  
 
 25  
 
 26  
 /**
 27  
  * Specifies configuration for orchestration through the engine.
 28  
  * 
 29  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 30  
  */
 31  
 public class OrchestrationConfig {
 32  
 
 33  0
     public enum EngineCapability { STANDARD, BLANKET_APPROVAL, SIMULATION }
 34  
     
 35  
     private final EngineCapability capability;
 36  
     private final boolean sendNotifications;
 37  0
     private final String notificationType = KewApiConstants.ACTION_REQUEST_ACKNOWLEDGE_REQ;
 38  
     private final Set<String> destinationNodeNames;
 39  
     private final ActionTakenValue cause;
 40  
     private final boolean runPostProcessorLogic;
 41  
     
 42  
     public OrchestrationConfig(EngineCapability capability) {
 43  0
         this(capability, Collections.<String>emptySet(), null, true, true);
 44  0
     }
 45  
     
 46  
     public OrchestrationConfig(EngineCapability capability, boolean isRunPostProcessorLogic) {
 47  0
         this(capability, Collections.<String>emptySet(), null, true, isRunPostProcessorLogic);
 48  0
     }
 49  
     
 50  
     public OrchestrationConfig(EngineCapability capability, Set<String> destinationNodeNames, ActionTakenValue cause) {
 51  0
         this(capability, destinationNodeNames, cause, true, true);
 52  0
     }
 53  
     
 54  0
     public OrchestrationConfig(EngineCapability capability, Set<String> destinationNodeNames, ActionTakenValue cause, boolean sendNotifications, boolean doRunPostProcessorLogic) {
 55  0
         this.capability = capability;
 56  0
         this.destinationNodeNames = Collections.unmodifiableSet(new HashSet<String>(destinationNodeNames));
 57  0
         this.cause = cause;
 58  0
         this.sendNotifications = sendNotifications;
 59  0
         this.runPostProcessorLogic = doRunPostProcessorLogic;
 60  0
     }
 61  
     
 62  
     public Set<String> getDestinationNodeNames() {
 63  0
         return destinationNodeNames;
 64  
     }
 65  
 
 66  
     public String getNotificationType() {
 67  0
         return notificationType;
 68  
     }
 69  
 
 70  
     public boolean isSendNotifications() {
 71  0
         return sendNotifications;
 72  
     }
 73  
 
 74  
     public ActionTakenValue getCause() {
 75  0
         return cause;
 76  
     }
 77  
 
 78  
         public boolean isRunPostProcessorLogic() {
 79  0
                 return this.runPostProcessorLogic;
 80  
         }
 81  
 
 82  
     /**
 83  
      * @return the capability
 84  
      */
 85  
     public EngineCapability getCapability() {
 86  0
         return this.capability;
 87  
     }    
 88  
     
 89  
 }