View Javadoc

1   /*
2    * Copyright 2007-2008 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.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/ecl2.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.rice.kns.bo;
17  
18  import java.util.LinkedHashMap;
19  
20  /**
21   * This is a description of what this class does - chitra07 don't forget to fill this in. 
22   * 
23   * @author Kuali Rice Team (rice.collab@kuali.org)
24   *
25   */
26  public class PersistableAttachmentBase extends PersistableBusinessObjectBase implements PersistableAttachment {
27      private byte[] attachmentContent;
28      private String fileName;
29      private String contentType;
30  
31      /**
32       * This overridden method ...
33       * 
34       * @see org.kuali.rice.kns.bo.PersistableAttachment#getAttachmentContent()
35       */
36      public byte[] getAttachmentContent() {
37          return this.attachmentContent;
38      }
39  
40      /**
41       * This overridden method ...
42       * 
43       * @see org.kuali.rice.kns.bo.PersistableAttachment#setAttachmentContent(byte[])
44       */
45      public void setAttachmentContent(byte[] attachmentContent) {
46          this.attachmentContent = attachmentContent;
47      }
48  
49      /**
50       * This overridden method ...
51       * 
52       * @see org.kuali.rice.kns.bo.PersistableAttachment#getFileName()
53       */
54      public String getFileName() {
55          return fileName;
56      }
57  
58      /**
59       * This overridden method ...
60       * 
61       * @see org.kuali.rice.kns.bo.PersistableAttachment#setFileName(java.lang.String)
62       */
63      public void setFileName(String fileName) {
64          this.fileName = fileName;
65      }
66  
67      /**
68       * This overridden method ...
69       * 
70       * @see org.kuali.rice.kns.bo.PersistableAttachment#getContentType()
71       */
72      public String getContentType() {
73          return contentType;
74      }
75  
76      /**
77       * This overridden method ...
78       * 
79       * @see org.kuali.rice.kns.bo.PersistableAttachment#setContentType(java.lang.String)
80       */
81      public void setContentType(String contentType) {
82          this.contentType = contentType;
83      }
84  
85      /**
86       * @see org.kuali.rice.kns.bo.BusinessObjectBase#toStringMapper()
87       */
88      protected LinkedHashMap toStringMapper() {
89          LinkedHashMap m = new LinkedHashMap();
90          m.put("fileName", this.fileName);
91          m.put("contentType", this.contentType);
92          
93          return m;
94      }
95  
96  }