Coverage Report - org.kuali.student.contract.model.OrchestrationObject
 
Classes in this File Line Coverage Branch Coverage Complexity
OrchestrationObject
0%
0/41
0%
0/8
1.333
OrchestrationObject$Source
0%
0/2
N/A
1.333
 
 1  
 /*
 2  
  * Copyright 2009 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.osedu.org/licenses/ECL-2.0
 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.student.contract.model;
 17  
 
 18  
 import java.util.List;
 19  
 
 20  
 /**
 21  
  *
 22  
  * @author nwright
 23  
  */
 24  0
 public class OrchestrationObject
 25  
 {
 26  
 
 27  0
  public enum Source
 28  
  {
 29  0
   MESSAGE_STRUCTURE, ORCH_OBJS;
 30  
  }
 31  
 
 32  
  private List<OrchestrationObjectField> fields;
 33  
  private String name;
 34  
 
 35  
  public void setName (String name)
 36  
  {
 37  0
   this.name = name;
 38  0
  }
 39  
 
 40  
  public String getName ()
 41  
  {
 42  0
   return name;
 43  
  }
 44  
 
 45  
  public void setFields (List<OrchestrationObjectField> fields)
 46  
  {
 47  0
   this.fields = fields;
 48  0
  }
 49  
 
 50  
  public List<OrchestrationObjectField> getFields ()
 51  
  {
 52  0
   return fields;
 53  
  }
 54  
 
 55  
  private boolean hasOwnCreateUpdate;
 56  
 
 57  
  public boolean hasOwnCreateUpdate ()
 58  
  {
 59  0
   return hasOwnCreateUpdate;
 60  
  }
 61  
 
 62  
  public void setHasOwnCreateUpdate (boolean hasOwnCreateUpdate)
 63  
  {
 64  0
   this.hasOwnCreateUpdate = hasOwnCreateUpdate;
 65  0
  }
 66  
 
 67  
  private OrchestrationObjectField inlineField;
 68  
 
 69  
  public OrchestrationObjectField getInlineField ()
 70  
  {
 71  0
   return inlineField;
 72  
  }
 73  
 
 74  
  public void setInlineField (OrchestrationObjectField inlineField)
 75  
  {
 76  0
   this.inlineField = inlineField;
 77  0
  }
 78  
 
 79  
 
 80  
  private String orchestrationPackagePath;
 81  
 
 82  
  public String getOrchestrationPackagePath ()
 83  
  {
 84  0
   return orchestrationPackagePath;
 85  
  }
 86  
 
 87  
  public void setOrchestrationPackagePath (String packagePath)
 88  
  {
 89  0
   this.orchestrationPackagePath = packagePath;
 90  0
  }
 91  
 
 92  
 
 93  
  private String infoPackagePath;
 94  
 
 95  
  public String getInfoPackagePath ()
 96  
  {
 97  0
   return infoPackagePath;
 98  
  }
 99  
 
 100  
  public void setInfoPackagePath (String infoPackagePath)
 101  
  {
 102  0
   this.infoPackagePath = infoPackagePath;
 103  0
  }
 104  
 
 105  
  public String getJavaClassInfoName ()
 106  
  {
 107  0
   return name.substring (0, 1).toUpperCase () + name.substring (1);
 108  
  }
 109  
 
 110  
  public String getFullyQualifiedJavaClassInfoName ()
 111  
  {
 112  0
   return this.infoPackagePath + "." + this.getJavaClassInfoName ();
 113  
  }
 114  
 
 115  
  public String getJavaClassHelperName ()
 116  
  {
 117  0
   if (inlineField == null)
 118  
   {
 119  0
    return getJavaClassInfoName () + "Helper";
 120  
   }
 121  0
   return inlineField.getParent ().getJavaClassInfoName ()
 122  
     + getJavaClassInfoName () + "Helper";
 123  
  }
 124  
 
 125  
  public String getFullyQualifiedJavaClassHelperName ()
 126  
  {
 127  0
    return orchestrationPackagePath + "." + getJavaClassHelperName ();
 128  
  }
 129  
 
 130  
   public String getJavaClassConstantsName ()
 131  
  {
 132  0
   if (inlineField == null)
 133  
   {
 134  0
    return getJavaClassInfoName () + "Constants";
 135  
   }
 136  0
   return inlineField.getParent ().getJavaClassInfoName ()
 137  
     + getJavaClassInfoName () + "Constants";
 138  
  }
 139  
 
 140  
  public String getFullyQualifiedJavaClassConstantsName ()
 141  
  {
 142  0
    return orchestrationPackagePath + "." + getJavaClassConstantsName ();
 143  
  }
 144  
 
 145  
 
 146  
   public String getJavaClassMetadataName ()
 147  
  {
 148  0
   if (inlineField == null)
 149  
   {
 150  0
    return getJavaClassInfoName () + "Metadata";
 151  
   }
 152  0
   return inlineField.getParent ().getJavaClassInfoName ()
 153  
     + getJavaClassInfoName () + "Metadata";
 154  
  }
 155  
 
 156  
  public String getFullyQualifiedJavaClassMetadataName ()
 157  
  {
 158  0
    return orchestrationPackagePath + "." + getJavaClassMetadataName ();
 159  
  }
 160  
 
 161  
  public String getJavaClassAssemblerName ()
 162  
  {
 163  0
   if (inlineField == null)
 164  
   {
 165  0
    return getJavaClassInfoName () + "Assembler";
 166  
   }
 167  0
   return inlineField.getParent ().getJavaClassInfoName ()
 168  
     + getJavaClassInfoName () + "Assembler";
 169  
  }
 170  
 
 171  
  public String getFullyQualifiedJavaClassAssemblerName ()
 172  
  {
 173  0
    return orchestrationPackagePath + ".assembler." + getJavaClassAssemblerName ();
 174  
  }
 175  
 
 176  
 
 177  
  private Source source;
 178  
 
 179  
  public Source getSource ()
 180  
  {
 181  0
   return source;
 182  
  }
 183  
 
 184  
  public void setSource (Source source)
 185  
  {
 186  0
   this.source = source;
 187  0
  }
 188  
 
 189  
 }