001    /**
002     * Copyright 2010 The Kuali Foundation Licensed under the
003     * Educational Community License, Version 2.0 (the "License"); you may
004     * not use this file except in compliance with the License. You may
005     * obtain a copy of the License at
006     *
007     * http://www.osedu.org/licenses/ECL-2.0
008     *
009     * Unless required by applicable law or agreed to in writing,
010     * software distributed under the License is distributed on an "AS IS"
011     * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
012     * or implied. See the License for the specific language governing
013     * permissions and limitations under the License.
014     */
015    
016    package org.kuali.student.r1.lum.lrc.dto;
017    
018    import java.io.Serializable;
019    import java.util.Date;
020    import java.util.HashMap;
021    import java.util.Map;
022    
023    import javax.xml.bind.annotation.XmlAccessType;
024    import javax.xml.bind.annotation.XmlAccessorType;
025    import javax.xml.bind.annotation.XmlAttribute;
026    import javax.xml.bind.annotation.XmlElement;
027    import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
028    
029    import org.kuali.student.r1.common.dto.HasAttributes;
030    import org.kuali.student.r1.common.dto.Idable;
031    import org.kuali.student.r2.common.dto.RichTextInfo;
032    import org.kuali.student.core.ws.binding.JaxbAttributeMapListAdapter;
033    
034    /**
035     * Detailed information about a scale.
036     *
037     * @Author KSContractMojo
038     * @Author lindholm
039     * @Since Tue Apr 21 13:47:41 PDT 2009
040     * @See <a href="https://test.kuali.org/confluence/display/KULSTU/scaleInfo+Structure">ScaleInfo</>
041     *
042     */
043    @XmlAccessorType(XmlAccessType.FIELD)
044    public class ScaleInfo implements Serializable, Idable, HasAttributes {
045    
046        private static final long serialVersionUID = 1L;
047    
048        @XmlElement
049        private String name;
050    
051        @XmlElement
052        private RichTextInfo desc;
053    
054        @XmlElement
055        private Date effectiveDate;
056    
057        @XmlElement
058        private Date expirationDate;
059    
060        @XmlElement
061        @XmlJavaTypeAdapter(JaxbAttributeMapListAdapter.class)
062        private Map<String, String> attributes;
063    
064        @XmlAttribute(name="key")
065        private String id;
066    
067        /**
068         * Name of the scale.
069         */
070        public String getName() {
071            return name;
072        }
073    
074        public void setName(String name) {
075            this.name = name;
076        }
077    
078        /**
079         * Description of the scale.
080         */
081        public RichTextInfo getDesc() {
082            return desc;
083        }
084    
085        public void setDesc(RichTextInfo desc) {
086            this.desc = desc;
087        }
088    
089        /**
090         * Date and time that this scale 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.
091         */
092        public Date getEffectiveDate() {
093            return effectiveDate;
094        }
095    
096        public void setEffectiveDate(Date effectiveDate) {
097            this.effectiveDate = effectiveDate;
098        }
099    
100        /**
101         * Date and time that this scale expires. This is a similar concept to the expiration date on enumerated values. If specified, this should 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.
102         */
103        public Date getExpirationDate() {
104            return expirationDate;
105        }
106    
107        public void setExpirationDate(Date expirationDate) {
108            this.expirationDate = expirationDate;
109        }
110    
111        /**
112         * List of key/value pairs, typically used for dynamic attributes.
113         */
114        public Map<String, String> getAttributes() {
115            if (attributes == null) {
116                attributes = new HashMap<String, String>();
117            }
118            return attributes;
119        }
120    
121        public void setAttributes(Map<String, String> attributes) {
122            this.attributes = attributes;
123        }
124    
125        /**
126         * Unique identifier for a scale.
127         */
128        public String getId() {
129            return id;
130        }
131    
132        public void setId(String id) {
133            this.id = id;
134        }
135    }