View Javadoc
1   /*
2    * Copyright (C) 2003-2009 eXo Platform SAS.
3    *
4    * This program is free software; you can redistribute it and/or
5    * modify it under the terms of the GNU Affero General Public License
6    * as published by the Free Software Foundation; either version 3
7    * of the License, or (at your option) any later version.
8    *
9    * This program is distributed in the hope that it will be useful,
10   * but WITHOUT ANY WARRANTY; without even the implied warranty of
11   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12   * GNU General Public License for more details.
13   *
14   * You should have received a copy of the GNU General Public License
15   * along with this program; if not, see<http://www.gnu.org/licenses/>.
16   */
17  package org.exoplatform.wiki.mow.api;
18  
19  import java.util.Calendar;
20  import java.util.List;
21  
22  public class Attachment {
23  
24    private String name;
25  
26    /**
27     * Get the weight of the attachment in bytes
28     */
29    private long weightInBytes;
30  
31    /**
32     * Creator of the last version of the attachment
33     */
34    private String creator;
35  
36    /**
37     * Date of the creation
38     */
39    private Calendar createdDate;
40  
41    /**
42     * Date of last update of this attachment
43     */
44    private Calendar updatedDate;
45  
46    /**
47     * URL to download the attachment
48     */
49    private String downloadURL;
50  
51    /**
52     * Title of the attachment
53     */
54    private String title;
55  
56    /**
57     * Full title of the attachment
58     */
59    private String fullTitle;
60  
61    /**
62     * Content of the attachment
63     */
64    private byte[] content;
65  
66    /**
67     * Mime type of the attachment
68     */
69    private String mimeType;
70  
71    /**
72     * Permissions on the attachment
73     */
74    private List<PermissionEntry> permissions;
75  
76    public String getName() {
77      return name;
78    }
79  
80    public void setName(String name) {
81      this.name = name;
82    }
83  
84    public long getWeightInBytes() {
85      return weightInBytes;
86    }
87  
88    public void setWeightInBytes(long weightInBytes) {
89      this.weightInBytes = weightInBytes;
90    }
91  
92    public String getCreator() {
93      return creator;
94    }
95  
96    public void setCreator(String creator) {
97      this.creator = creator;
98    }
99  
100   public Calendar getCreatedDate() {
101     return createdDate;
102   }
103 
104   public void setCreatedDate(Calendar createdDate) {
105     this.createdDate = createdDate;
106   }
107 
108   public Calendar getUpdatedDate() {
109     return updatedDate;
110   }
111 
112   public void setUpdatedDate(Calendar updatedDate) {
113     this.updatedDate = updatedDate;
114   }
115 
116   public String getDownloadURL() {
117     return downloadURL;
118   }
119 
120   public void setDownloadURL(String downloadURL) {
121     this.downloadURL = downloadURL;
122   }
123 
124   public String getTitle() {
125     return title;
126   }
127 
128   public void setTitle(String title) {
129     this.title = title;
130   }
131 
132   public String getFullTitle() {
133     return fullTitle;
134   }
135 
136   public void setFullTitle(String fullTitle) {
137     this.fullTitle = fullTitle;
138   }
139 
140   public byte[] getContent() {
141     return content;
142   }
143 
144   public void setContent(byte[] content) {
145     this.content = content;
146   }
147 
148   public String getMimeType() {
149     return mimeType;
150   }
151 
152   public void setMimeType(String mimeType) {
153     this.mimeType = mimeType;
154   }
155 
156   public List<PermissionEntry> getPermissions() {
157     return permissions;
158   }
159 
160   public void setPermissions(List<PermissionEntry> permissions) {
161     this.permissions = permissions;
162   }
163 }