Coverage Report - org.kuali.student.core.statement.dto.AbstractStatementInfo
 
Classes in this File Line Coverage Branch Coverage Complexity
AbstractStatementInfo
0%
0/28
0%
0/2
1.059
 
 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.statement.dto;
 17  
 
 18  
 import java.io.Serializable;
 19  
 import java.util.HashMap;
 20  
 import java.util.Map;
 21  
 
 22  
 import javax.xml.bind.annotation.XmlAccessType;
 23  
 import javax.xml.bind.annotation.XmlAccessorType;
 24  
 import javax.xml.bind.annotation.XmlAttribute;
 25  
 import javax.xml.bind.annotation.XmlElement;
 26  
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 27  
 
 28  
 import org.kuali.student.common.dto.HasAttributes;
 29  
 import org.kuali.student.common.dto.HasTypeState;
 30  
 import org.kuali.student.common.dto.Idable;
 31  
 import org.kuali.student.common.dto.MetaInfo;
 32  
 import org.kuali.student.common.dto.RichTextInfo;
 33  
 import org.kuali.student.core.ws.binding.JaxbAttributeMapListAdapter;
 34  
 
 35  
 /**
 36  
  *Detailed information about a single LU statement.
 37  
  */
 38  
 @XmlAccessorType(XmlAccessType.FIELD)
 39  0
 public abstract class AbstractStatementInfo implements Serializable, Idable, HasTypeState, HasAttributes {
 40  
 
 41  
     private static final long serialVersionUID = 1L;
 42  
 
 43  
     @XmlElement
 44  
     private String name;
 45  
 
 46  
     @XmlElement
 47  
     private RichTextInfo desc;
 48  
 
 49  
     @XmlElement
 50  
     private StatementOperatorTypeKey operator;
 51  
 
 52  
     @XmlElement
 53  
     @XmlJavaTypeAdapter(JaxbAttributeMapListAdapter.class)
 54  
     private Map<String, String> attributes;
 55  
 
 56  
     @XmlElement
 57  
     private MetaInfo metaInfo;
 58  
 
 59  
     @XmlAttribute
 60  
     private String type;
 61  
 
 62  
     @XmlAttribute
 63  
     private String state;
 64  
 
 65  
     @XmlAttribute
 66  
     private String id;
 67  
 
 68  
     /**
 69  
      * Friendly name for the LU statement.
 70  
      */
 71  
     public String getName() {
 72  0
         return name;
 73  
     }
 74  
 
 75  
     public void setName(String name) {
 76  0
         this.name = name;
 77  0
     }
 78  
 
 79  
     /**
 80  
      * Narrative description for the LU statement.
 81  
      */
 82  
     public RichTextInfo getDesc() {
 83  0
         return desc;
 84  
     }
 85  
 
 86  
     public void setDesc(RichTextInfo desc) {
 87  0
         this.desc = desc;
 88  0
     }
 89  
 
 90  
     /**
 91  
      * Logical operator used to assemble statements. Acceptable values are restricted to AND and OR. This operator applies to both the LU statements and requirement components contained within this statement.
 92  
      */
 93  
     public StatementOperatorTypeKey getOperator() {
 94  0
         return operator;
 95  
     }
 96  
 
 97  
     public void setOperator(StatementOperatorTypeKey operator) {
 98  0
         this.operator = operator;
 99  0
     }
 100  
 
 101  
     /**
 102  
      * List of key/value pairs, typically used for dynamic attributes.
 103  
      */
 104  
     public Map<String, String> getAttributes() {
 105  0
         if (attributes == null) {
 106  0
             attributes = new HashMap<String, String>();
 107  
         }
 108  0
         return attributes;
 109  
     }
 110  
 
 111  
     public void setAttributes(Map<String, String> attributes) {
 112  0
         this.attributes = attributes;
 113  0
     }
 114  
 
 115  
     /**
 116  
      * 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.
 117  
      */
 118  
     public MetaInfo getMetaInfo() {
 119  0
         return metaInfo;
 120  
     }
 121  
 
 122  
     public void setMetaInfo(MetaInfo metaInfo) {
 123  0
         this.metaInfo = metaInfo;
 124  0
     }
 125  
 
 126  
     /**
 127  
      * Unique identifier for an LU statement type.
 128  
      */
 129  
     public String getType() {
 130  0
         return type;
 131  
     }
 132  
 
 133  
     public void setType(String type) {
 134  0
         this.type = type;
 135  0
     }
 136  
 
 137  
     /**
 138  
      * The current status of the statement. The values for this field are constrained to those in the StatementState enumeration. A separate setup operation does not exist for retrieval of the meta data around this value.
 139  
      */
 140  
     public String getState() {
 141  0
         return state;
 142  
     }
 143  
 
 144  
     public void setState(String state) {
 145  0
         this.state = state;
 146  0
     }
 147  
 
 148  
     /**
 149  
      * Unique identifier for a single LU statement record. This is optional, due to the identifier being set at the time of creation. Once the LU statement has been created, this should be seen as required.
 150  
      */
 151  
     public String getId() {
 152  0
         return id;
 153  
     }
 154  
 
 155  
     public void setId(String id) {
 156  0
         this.id = id;
 157  0
     }
 158  
 
 159  
     @Override
 160  
         public String toString() {
 161  0
                 return "StatementInfo[id=" + id + ", operator=" + operator + ", type="
 162  
                                 + type + ", state=" + state + "]";
 163  
         }
 164  
 }