Coverage Report - org.kuali.student.core.organization.dto.OrgInfo
 
Classes in this File Line Coverage Branch Coverage Complexity
OrgInfo
0%
0/44
0%
0/4
1.077
 
 1  
 /**
 2  
  * Copyright 2010 The Kuali Foundation Licensed under the
 3  
  * Educational Community License, Version 2.0 (the "License"); you may
 4  
  * not use this file except in compliance with the License. You may
 5  
  * obtain a copy of the License at
 6  
  *
 7  
  * http://www.osedu.org/licenses/ECL-2.0
 8  
  *
 9  
  * Unless required by applicable law or agreed to in writing,
 10  
  * software distributed under the License is distributed on an "AS IS"
 11  
  * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 12  
  * or implied. See the License for the specific language governing
 13  
  * permissions and limitations under the License.
 14  
  */
 15  
 
 16  
 package org.kuali.student.core.organization.dto;
 17  
 
 18  
 import java.io.Serializable;
 19  
 import java.util.ArrayList;
 20  
 import java.util.Date;
 21  
 import java.util.HashMap;
 22  
 import java.util.List;
 23  
 import java.util.Map;
 24  
 
 25  
 import javax.xml.bind.annotation.XmlAccessType;
 26  
 import javax.xml.bind.annotation.XmlAccessorType;
 27  
 import javax.xml.bind.annotation.XmlAttribute;
 28  
 import javax.xml.bind.annotation.XmlElement;
 29  
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 30  
 
 31  
 import org.kuali.student.common.dto.HasAttributes;
 32  
 import org.kuali.student.common.dto.HasTypeState;
 33  
 import org.kuali.student.common.dto.Idable;
 34  
 import org.kuali.student.common.dto.MetaInfo;
 35  
 import org.kuali.student.core.ws.binding.JaxbAttributeMapListAdapter;
 36  
 
 37  
 /**
 38  
  *Detailed information about a single organization.
 39  
  */ 
 40  
 @XmlAccessorType(XmlAccessType.FIELD)
 41  0
 public class OrgInfo implements Serializable, Idable, HasTypeState, HasAttributes {
 42  
 
 43  
     private static final long serialVersionUID = 1L;
 44  
 
 45  
     @XmlElement
 46  
     private String longName;
 47  
 
 48  
     @XmlElement
 49  
     private String shortName;
 50  
 
 51  
     @XmlElement
 52  
     private String sortName;
 53  
 
 54  
     @XmlElement
 55  
     private String shortDesc;
 56  
 
 57  
     @XmlElement
 58  
     private String longDesc;
 59  
 
 60  
     @XmlElement
 61  
     private Date effectiveDate;
 62  
 
 63  
     @XmlElement
 64  
     private Date expirationDate;
 65  
 
 66  
     @XmlElement
 67  
     private List<OrgCodeInfo> orgCodes;
 68  
 
 69  
     @XmlElement
 70  
     @XmlJavaTypeAdapter(JaxbAttributeMapListAdapter.class)
 71  
     private Map<String, String> attributes;
 72  
 
 73  
     @XmlElement
 74  
     private MetaInfo metaInfo;
 75  
 
 76  
     @XmlAttribute
 77  
     private String type;
 78  
 
 79  
     @XmlAttribute
 80  
     private String state;
 81  
 
 82  
     @XmlAttribute
 83  
     private String id;
 84  
 
 85  
     /**
 86  
      * Full name of the organization.
 87  
      */
 88  
     public String getLongName() {
 89  0
         return longName;
 90  
     }
 91  
 
 92  
     public void setLongName(String longName) {
 93  0
         this.longName = longName;
 94  0
     }
 95  
 
 96  
     /**
 97  
      * Shortened format or abbreviation of the organization's name.
 98  
      */
 99  
     public String getShortName() {
 100  0
         return shortName;
 101  
     }
 102  
 
 103  
     public void setShortName(String shortName) {
 104  0
         this.shortName = shortName;
 105  0
     }
 106  
 
 107  
     /**
 108  
      * The name used for sorting, for cases when alphabetical sorting by shortName or longName is undesirable.
 109  
      */
 110  
     public String getSortName() {
 111  0
         return sortName;
 112  
     }
 113  
 
 114  
     public void setSortName(String sortName) {
 115  0
         this.sortName = sortName;
 116  0
     }
 117  
 
 118  
     /**
 119  
      * A brief description of the organization.
 120  
      */
 121  
     public String getShortDesc() {
 122  0
         return shortDesc;
 123  
     }
 124  
 
 125  
     public void setShortDesc(String shortDesc) {
 126  0
         this.shortDesc = shortDesc;
 127  0
     }
 128  
 
 129  
     /**
 130  
      * Narrative description of the organization.
 131  
      */
 132  
     public String getLongDesc() {
 133  0
         return longDesc;
 134  
     }
 135  
 
 136  
     public void setLongDesc(String longDesc) {
 137  0
         this.longDesc = longDesc;
 138  0
     }
 139  
 
 140  
     /**
 141  
      * Date and time that this organization became effective. This is a similar concept to the effective date on enumerated values. When an expiration date has been specified, this field must be less than or equal to the expiration date.
 142  
      */
 143  
     public Date getEffectiveDate() {
 144  0
         return effectiveDate;
 145  
     }
 146  
 
 147  
     public void setEffectiveDate(Date effectiveDate) {
 148  0
         this.effectiveDate = effectiveDate;
 149  0
     }
 150  
 
 151  
     /**
 152  
      * Date and time that this organization expires. This is a similar concept to the expiration date on enumerated values. If specified, this must be greater than or equal to the effective date. If this field is not specified, then no expiration date has been currently defined and should automatically be considered greater than the effective date.
 153  
      */
 154  
     public Date getExpirationDate() {
 155  0
         return expirationDate;
 156  
     }
 157  
 
 158  
     public void setExpirationDate(Date expirationDate) {
 159  0
         this.expirationDate = expirationDate;
 160  0
     }
 161  
 
 162  
     /**
 163  
      * List of organization code info structures. These are structures so that many different types of codes can be associated with the org. This allows them to be put into categories.
 164  
      */
 165  
     public List<OrgCodeInfo> getOrgCodes() {
 166  0
         if (orgCodes == null) {
 167  0
             orgCodes = new ArrayList<OrgCodeInfo>();
 168  
         }
 169  0
         return orgCodes;
 170  
     }
 171  
 
 172  
     public void setOrgCodes(List<OrgCodeInfo> orgCodes) {
 173  0
         this.orgCodes = orgCodes;
 174  0
     }
 175  
 
 176  
     /**
 177  
      * List of key/value pairs, typically used for dynamic attributes.
 178  
      */
 179  
     public Map<String, String> getAttributes() {
 180  0
         if (attributes == null) {
 181  0
             attributes = new HashMap<String, String>();
 182  
         }
 183  0
         return attributes;
 184  
     }
 185  
 
 186  
     public void setAttributes(Map<String, String> attributes) {
 187  0
         this.attributes = attributes;
 188  0
     }
 189  
 
 190  
     /**
 191  
      * Create and last update info for the structure. This is optional and treated as read only since the data is set by the internals of the service during maintenance operations.
 192  
      */
 193  
     public MetaInfo getMetaInfo() {
 194  0
         return metaInfo;
 195  
     }
 196  
 
 197  
     public void setMetaInfo(MetaInfo metaInfo) {
 198  0
         this.metaInfo = metaInfo;
 199  0
     }
 200  
 
 201  
     /**
 202  
      * Unique identifier for an organization type.
 203  
      */
 204  
     public String getType() {
 205  0
         return type;
 206  
     }
 207  
 
 208  
     public void setType(String type) {
 209  0
         this.type = type;
 210  0
     }
 211  
 
 212  
     /**
 213  
      * The current status of the organization. The values for this field are constrained to those in the orgState enumeration. A separate setup operation does not exist for retrieval of the meta data around this value.
 214  
      */
 215  
     public String getState() {
 216  0
         return state;
 217  
     }
 218  
 
 219  
     public void setState(String state) {
 220  0
         this.state = state;
 221  0
     }
 222  
 
 223  
     /**
 224  
      * Unique identifier for an organization. This is optional, due to the identifier being set at the time of creation. Once the organization has been created, this should be seen as required.
 225  
      */
 226  
     public String getId() {
 227  0
         return id;
 228  
     }
 229  
 
 230  
     public void setId(String id) {
 231  0
         this.id = id;
 232  0
     }
 233  
 }