001    /*
002     * Copyright 2009 The Kuali Foundation
003     *
004     * Licensed under the Educational Community License, Version 1.0 (the "License");
005     * you may not use this file except in compliance with the License.
006     * You may obtain a copy of the License at
007     *
008     * http://www.opensource.org/licenses/ecl1.php
009     *
010     * Unless required by applicable law or agreed to in writing, software
011     * distributed under the License is distributed on an "AS IS" BASIS,
012     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013     * See the License for the specific language governing permissions and
014     * limitations under the License.
015     */
016    package org.kuali.student.lum.program.dto;
017    
018    import java.io.Serializable;
019    import java.util.ArrayList;
020    import java.util.Date;
021    import java.util.HashMap;
022    import java.util.List;
023    import java.util.Map;
024    
025    import javax.xml.bind.annotation.XmlAccessType;
026    import javax.xml.bind.annotation.XmlAccessorType;
027    import javax.xml.bind.annotation.XmlAttribute;
028    import javax.xml.bind.annotation.XmlElement;
029    import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
030    
031    import org.kuali.student.common.dto.HasAttributes;
032    import org.kuali.student.common.dto.HasTypeState;
033    import org.kuali.student.common.dto.Idable;
034    import org.kuali.student.common.dto.MetaInfo;
035    import org.kuali.student.core.ws.binding.JaxbAttributeMapListAdapter;
036    
037    /**
038     * Detailed information about a single minor program
039     *
040     * @Author KSContractMojo
041     * @Author Li Pan
042     * @Since Wed Jun 30 14:56:15 PDT 2010
043     * @See <a href="https://test.kuali.org/confluence/display/KULSTU/minorDisciplineInfo+Structure">MinorDisciplineInfo</>
044     *
045     */
046    @XmlAccessorType(XmlAccessType.FIELD)
047    public class MinorDisciplineInfo implements Serializable, Idable, HasTypeState, HasAttributes {
048    
049        private static final long serialVersionUID = 1L;
050    
051        @XmlElement
052        private String credentialProgramId;
053    
054        @XmlElement
055        private List<String> programRequirements;
056    
057        @XmlElement
058        @XmlJavaTypeAdapter(JaxbAttributeMapListAdapter.class)
059        private Map<String, String> attributes;
060    
061        @XmlElement
062        private MetaInfo metaInfo;
063    
064        @XmlAttribute
065        private String type;
066    
067        @XmlAttribute
068        private String state;
069    
070        @XmlAttribute
071        private String id;
072    
073        /**
074         * Identifier of the credential program under which the minor belongs
075         */
076        public String getCredentialProgramId() {
077            return credentialProgramId;
078        }
079    
080        public void setCredentialProgramId(String credentialProgramId) {
081            this.credentialProgramId = credentialProgramId;
082        }
083    
084        /**
085         * Minor Discipline Program Requirements.
086         */
087        public List<String> getProgramRequirements() {
088            if (programRequirements == null) {
089                programRequirements = new ArrayList<String>(0);
090            }
091            return programRequirements;
092        }
093    
094        public void setProgramRequirements(List<String> programRequirements) {
095            this.programRequirements = programRequirements;
096        }
097    
098        /**
099         * List of key/value pairs, typically used for dynamic attributes.
100         */
101        public Map<String, String> getAttributes() {
102            if (attributes == null) {
103                attributes = new HashMap<String, String>();
104            }
105            return attributes;
106        }
107    
108        public void setAttributes(Map<String, String> attributes) {
109            this.attributes = attributes;
110        }
111    
112        /**
113         * 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.
114         */
115        public MetaInfo getMetaInfo() {
116            return metaInfo;
117        }
118    
119        public void setMetaInfo(MetaInfo metaInfo) {
120            this.metaInfo = metaInfo;
121        }
122    
123        /**
124         * Unique identifier for a learning unit type. Once set at create time, this field may not be updated.
125         */
126        public String getType() {
127            return type;
128        }
129    
130        public void setType(String type) {
131            this.type = type;
132        }
133    
134        /**
135         * The current status of the credential program. The values for this field are constrained to those in the luState enumeration. A separate setup operation does not exist for retrieval of the meta data around this value.
136         */
137        public String getState() {
138            return state;
139        }
140    
141        public void setState(String state) {
142            this.state = state;
143        }
144    
145        /**
146         * Unique identifier for an Minor Discipline. This is optional, due to the identifier being set at the time of creation. Once the Program has been created, this should be seen as required.
147         */
148        public String getId() {
149            return id;
150        }
151    
152        public void setId(String id) {
153            this.id = id;
154        }
155    }