2 * Copyright 2007, 2008, 2009 Electronic Business Systems Ltd.
4 * This file is part of GSS.
6 * GSS is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
11 * GSS is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with GSS. If not, see <http://www.gnu.org/licenses/>.
19 package gr.ebs.gss.server.domain.dto;
21 import java.io.Serializable;
22 import java.util.ArrayList;
23 import java.util.List;
28 public class FolderDTO implements Serializable {
31 * The serial version UID.
33 private static final long serialVersionUID = 1L;
36 * The persistence ID of the object.
51 * The subfolders in this folder. A List so we can keep order.
55 private List<FolderDTO> subfolders = new ArrayList<FolderDTO>();
58 * The owner of this folder.
60 private UserDTO owner;
63 * The parent folder that contains this folder.
65 private FolderDTO parent;
68 * The audit information for this object.
70 private AuditInfoDTO auditInfo;
72 * Is this folder temporarily deleted?
74 private boolean deleted=false;
77 * Anyone can read this folder?
79 private boolean readForAll=false;
81 private Boolean shared=false;
91 * @param newId the id to set
93 public void setId(final Long newId) {
100 public String getName() {
105 * @param newName the name to set
107 public void setName(final String newName) {
112 * @return the subfolders
114 public List<FolderDTO> getSubfolders() {
119 * @param newSubfolders the subfolders to set
121 public void setSubfolders(final List<FolderDTO> newSubfolders) {
122 subfolders = newSubfolders;
128 public UserDTO getOwner() {
133 * @param newOwner the owner to set
135 public void setOwner(final UserDTO newOwner) {
140 * Retrieve the parent.
144 public FolderDTO getParent() {
151 * @param newParent the parent to set
153 public void setParent(final FolderDTO newParent) {
158 * Retrieve the auditInfo.
160 * @return the auditInfo
162 public AuditInfoDTO getAuditInfo() {
167 * Modify the auditInfo.
169 * @param newAuditInfo the auditInfo to set
171 public void setAuditInfo(final AuditInfoDTO newAuditInfo) {
172 auditInfo = newAuditInfo;
177 * Retrieve the deleted.
179 * @return the deleted
181 public boolean isDeleted() {
187 * Modify the deleted.
189 * @param newDeleted the deleted to set
191 public void setDeleted(boolean newDeleted) {
192 deleted = newDeleted;
201 public String getPath() {
209 * @param aPath the path to set
211 public void setPath(String aPath) {
216 * Retrieve the URI for this resource, relative to the REST API root URI.
217 * This unique identifier can be used to refer to the resource from
218 * various GSS clients.
222 public String getURI() {
223 return owner.getUsername() + FileHeaderDTO.PATH_FILES + getPath();
227 * Modify the readForAll.
229 * @param aReadForAll the readForAll to set
231 public void setReadForAll(boolean aReadForAll) {
232 readForAll = aReadForAll;
236 * Retrieve the readForAll.
238 * @return the readForAll
240 public boolean isReadForAll() {
246 * Retrieve the shared.
250 public Boolean getShared() {
258 * @param shared the shared to set
260 public void setShared(Boolean shared) {
261 this.shared = shared;