Coverage Report - org.kuali.student.core.document.dto.DocumentInfo
 
Classes in this File Line Coverage Branch Coverage Complexity
DocumentInfo
0%
0/36
0%
0/2
1.045
 
 1  
 /*
 2  
  * Copyright 2009 The Kuali Foundation
 3  
  *
 4  
  * Licensed under the Educational Community License, Version 1.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.opensource.org/licenses/ecl1.php
 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.core.document.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.core.ws.binding.JaxbAttributeMapListAdapter;
 32  
 import org.kuali.student.core.dto.Idable;
 33  
 import org.kuali.student.core.dto.HasTypeState;
 34  
 import org.kuali.student.core.dto.HasAttributes;
 35  
 import org.kuali.student.core.dto.MetaInfo;
 36  
 import org.kuali.student.core.dto.RichTextInfo;
 37  
 
 38  
 
 39  
 /**
 40  
  * Detailed information about a document.
 41  
  *
 42  
  * @Author KSContractMojo
 43  
  * @Author tom
 44  
  * @Since Wed Aug 18 12:10:38 EDT 2010
 45  
  * @See <a href="https://test.kuali.org/confluence/display/KULSTU/documentInfo+Structure">DocumentInfo</>
 46  
  *
 47  
  */
 48  
 @XmlAccessorType(XmlAccessType.FIELD)
 49  0
 public class DocumentInfo implements Serializable, Idable, HasTypeState, HasAttributes {
 50  
 
 51  
     private static final long serialVersionUID = 1L;
 52  
 
 53  
     @XmlElement
 54  
     private String name;
 55  
 
 56  
     @XmlElement
 57  
     private String fileName;
 58  
 
 59  
     @XmlElement
 60  
     private RichTextInfo desc;
 61  
 
 62  
     @XmlElement
 63  
     private DocumentBinaryInfo documentBinaryInfo;
 64  
 
 65  
     @XmlElement
 66  
     private Date effectiveDate;
 67  
 
 68  
     @XmlElement
 69  
     private Date expirationDate;
 70  
 
 71  
     @XmlElement
 72  
     @XmlJavaTypeAdapter(JaxbAttributeMapListAdapter.class)
 73  
     private Map<String, String> attributes;
 74  
 
 75  
     @XmlElement
 76  
     private MetaInfo metaInfo;
 77  
 
 78  
     @XmlAttribute
 79  
     private String type;
 80  
 
 81  
     @XmlAttribute
 82  
     private String state;
 83  
 
 84  
     @XmlAttribute
 85  
     private String id;
 86  
 
 87  
     /**
 88  
      * Friendly name of the document
 89  
      */
 90  
     public String getName() {
 91  0
         return name;
 92  
     }
 93  
 
 94  
     public void setName(String name) {
 95  0
         this.name = name;
 96  0
     }
 97  
 
 98  
     /**
 99  
      * Name of the document file
 100  
      */
 101  
     public String getFileName() {
 102  0
         return fileName;
 103  
     }
 104  
 
 105  
     public void setFileName(String fileName) {
 106  0
         this.fileName = fileName;
 107  0
     }
 108  
 
 109  
     /**
 110  
      * Narrative description of the document
 111  
      */
 112  
     public RichTextInfo getDesc() {
 113  0
         return desc;
 114  
     }
 115  
 
 116  
     public void setDesc(RichTextInfo desc) {
 117  0
         this.desc = desc;
 118  0
     }
 119  
 
 120  
     /**
 121  
      * The encoded document. The expectation is that this could be a base64 encoding.
 122  
      */
 123  
     public DocumentBinaryInfo getDocumentBinaryInfo() {
 124  0
         return documentBinaryInfo;
 125  
     }
 126  
 
 127  
     public void setDocumentBinaryInfo(DocumentBinaryInfo documentBinaryInfo) {
 128  0
         this.documentBinaryInfo = documentBinaryInfo;
 129  0
     }
 130  
 
 131  
     /**
 132  
      * Date and time that this document 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.
 133  
      */
 134  
     public Date getEffectiveDate() {
 135  0
         return effectiveDate;
 136  
     }
 137  
 
 138  
     public void setEffectiveDate(Date effectiveDate) {
 139  0
         this.effectiveDate = effectiveDate;
 140  0
     }
 141  
 
 142  
     /**
 143  
      * Date and time that this document 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.
 144  
      */
 145  
     public Date getExpirationDate() {
 146  0
         return expirationDate;
 147  
     }
 148  
 
 149  
     public void setExpirationDate(Date expirationDate) {
 150  0
         this.expirationDate = expirationDate;
 151  0
     }
 152  
 
 153  
     /**
 154  
      * List of key/value pairs, typically used for dynamic attributes.
 155  
      */
 156  
     public Map<String, String> getAttributes() {
 157  0
         if (attributes == null) {
 158  0
             attributes = new HashMap<String, String>();
 159  
         }
 160  0
         return attributes;
 161  
     }
 162  
 
 163  
     public void setAttributes(Map<String, String> attributes) {
 164  0
         this.attributes = attributes;
 165  0
     }
 166  
 
 167  
     /**
 168  
      * 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.
 169  
      */
 170  
     public MetaInfo getMetaInfo() {
 171  0
         return metaInfo;
 172  
     }
 173  
 
 174  
     public void setMetaInfo(MetaInfo metaInfo) {
 175  0
         this.metaInfo = metaInfo;
 176  0
     }
 177  
 
 178  
     /**
 179  
      * Unique identifier for a document type.
 180  
      */
 181  
     public String getType() {
 182  0
         return type;
 183  
     }
 184  
 
 185  
     public void setType(String type) {
 186  0
         this.type = type;
 187  0
     }
 188  
 
 189  
     /**
 190  
      * The current status of the document. The values for this field are constrained to those in the documentState enumeration. A separate setup operation does not exist for retrieval of the meta data around this value.
 191  
      */
 192  
     public String getState() {
 193  0
         return state;
 194  
     }
 195  
 
 196  
     public void setState(String state) {
 197  0
         this.state = state;
 198  0
     }
 199  
 
 200  
     /**
 201  
      * Unique identifier for a document. This is optional, due to the identifier being set at the time of creation. Once the document has been created, this should be seen as required.
 202  
      */
 203  
     public String getId() {
 204  0
         return id;
 205  
     }
 206  
 
 207  
     public void setId(String id) {
 208  0
         this.id = id;
 209  0
     }
 210  
 }