Coverage Report - org.kuali.rice.krad.datadictionary.WorkflowAttributes
 
Classes in this File Line Coverage Branch Coverage Complexity
WorkflowAttributes
0%
0/15
0%
0/4
1.333
 
 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.krad.datadictionary;
 17  
 
 18  
 import java.util.ArrayList;
 19  
 import java.util.HashMap;
 20  
 import java.util.List;
 21  
 import java.util.Map;
 22  
 
 23  
 
 24  
 /**
 25  
  * A container that holds all of the {@link WorkflowAttributeDefinition} for a document for both document searches
 26  
  * and routing that depends on the values that exist on the document.
 27  
  * 
 28  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 29  
  *
 30  
  */
 31  
 public class WorkflowAttributes extends DataDictionaryDefinitionBase {
 32  
     private static final long serialVersionUID = 6435015497886060280L;
 33  
     
 34  
         private List<SearchingTypeDefinition> searchingTypeDefinitions;
 35  
     private Map<String, RoutingTypeDefinition> routingTypeDefinitions;
 36  
     
 37  0
     public WorkflowAttributes() {
 38  0
             searchingTypeDefinitions = new ArrayList<SearchingTypeDefinition>();;
 39  0
             routingTypeDefinitions = new HashMap<String, RoutingTypeDefinition>();
 40  0
     }
 41  
     
 42  
         /**
 43  
          * @return the searchingTypeDefinitions
 44  
          */
 45  
         public List<SearchingTypeDefinition> getSearchingTypeDefinitions() {
 46  0
                 return this.searchingTypeDefinitions;
 47  
         }
 48  
 
 49  
         /**
 50  
          * @param searchingTypeDefinitions the searchingTypeDefinitions to set
 51  
          */
 52  
         public void setSearchingTypeDefinitions(
 53  
                         List<SearchingTypeDefinition> searchingTypeDefinitions) {
 54  0
                 this.searchingTypeDefinitions = searchingTypeDefinitions;
 55  0
         }
 56  
 
 57  
         public Map<String, RoutingTypeDefinition> getRoutingTypeDefinitions() {
 58  0
                 return this.routingTypeDefinitions;
 59  
         }
 60  
 
 61  
         public void setRoutingTypeDefinitions(
 62  
                         Map<String, RoutingTypeDefinition> routingTypeDefinitions) {
 63  0
                 this.routingTypeDefinitions = routingTypeDefinitions;
 64  0
         }
 65  
 
 66  
         /**
 67  
          * This overridden method ...
 68  
          * 
 69  
          * @see org.kuali.rice.krad.datadictionary.DataDictionaryDefinition#completeValidation(java.lang.Class, java.lang.Class)
 70  
          */
 71  
         public void completeValidation(Class rootBusinessObjectClass,
 72  
                         Class otherBusinessObjectClass) {
 73  0
                 for (SearchingTypeDefinition definition : searchingTypeDefinitions) { 
 74  0
                         definition.completeValidation(rootBusinessObjectClass, otherBusinessObjectClass);
 75  
                 }
 76  0
                 for (RoutingTypeDefinition definitions : routingTypeDefinitions.values()) {
 77  0
                         definitions.completeValidation(rootBusinessObjectClass, otherBusinessObjectClass);
 78  
                 }
 79  0
         }
 80  
 
 81  
 }