/* * LinShare is an open source filesharing software, part of the LinPKI software * suite, developed by Linagora. * * Copyright (C) 2016 LINAGORA * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU Affero General Public License as published by the Free * Software Foundation, either version 3 of the License, or (at your option) any * later version, provided you comply with the Additional Terms applicable for * LinShare software by Linagora pursuant to Section 7 of the GNU Affero General * Public License, subsections (b), (c), and (e), pursuant to which you must * notably (i) retain the display of the “LinShare™” trademark/logo at the top * of the interface window, the display of the “You are using the Open Source * and free version of LinShare™, powered by Linagora © 2009–2015. Contribute to * Linshare R&D by subscribing to an Enterprise offer!” infobox and in the * e-mails sent with the Program, (ii) retain all hypertext links between * LinShare and linshare.org, between linagora.com and Linagora, and (iii) * refrain from infringing Linagora intellectual property rights over its * trademarks and commercial brands. Other Additional Terms apply, see * <http://www.linagora.com/licenses/> for more details. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more * details. * * You should have received a copy of the GNU Affero General Public License and * its applicable Additional Terms for LinShare along with this program. If not, * see <http://www.gnu.org/licenses/> for the GNU Affero General Public License * version 3 and <http://www.linagora.com/licenses/> for the Additional Terms * applicable to LinShare software. */ package org.linagora.linshare.mongo.entities.mto; import java.util.Date; import java.util.Set; import org.linagora.linshare.core.domain.constants.UploadRequestStatus; import org.linagora.linshare.core.domain.entities.UploadRequest; import org.linagora.linshare.core.domain.entities.UploadRequestUrl; import com.google.common.collect.Sets; public class UploadRequestMto { private String uuid; private String subject; private String body; private String groupUuid; private Integer maxFileCount; private Long maxDepositSize; private Long maxFileSize; private UploadRequestStatus status; private Date activationDate; private Date creationDate; private Date modificationDate; private Date notificationDate; private Date expiryDate; private String uploadPropositionRequestUuid; private Boolean canDelete; private Boolean canClose; private Boolean canEditExpiryDate; private String locale; private Boolean secured; private String mailMessageId; private Set<UploadRequestUrlMto> uploadRequestURLs = Sets.newHashSet(); // private Set<UploadRequestHistory> uploadRequestHistory = Sets.newHashSet(); private AccountMto owner; private DomainMto domain; private Boolean notified; public UploadRequestMto() { super(); } public UploadRequestMto(UploadRequest request) { this.uuid = request.getUuid(); this.body = request.getUploadRequestGroup().getBody(); this.subject = request.getUploadRequestGroup().getSubject(); this.groupUuid = request.getUploadRequestGroup().getUuid(); this.domain = new DomainMto(request.getAbstractDomain()); this.maxFileCount = request.getMaxFileCount(); this.secured = request.isSecured(); this.owner = new AccountMto(request.getOwner()); this.notified = request.isNotified(); this.locale = request.getLocale(); this.maxDepositSize = request.getMaxDepositSize(); this.maxFileSize = request.getMaxFileSize(); this.status = request.getStatus(); this.expiryDate = request.getExpiryDate(); this.canClose = request.isCanClose(); this.canDelete = request.isCanDelete(); this.canEditExpiryDate = request.isCanEditExpiryDate(); for (UploadRequestUrl u : request.getUploadRequestURLs()) { this.uploadRequestURLs.add(new UploadRequestUrlMto(u)); } } public String getUuid() { return uuid; } public void setUuid(String uuid) { this.uuid = uuid; } public Integer getMaxFileCount() { return maxFileCount; } public void setMaxFileCount(Integer maxFileCount) { this.maxFileCount = maxFileCount; } public Long getMaxDepositSize() { return maxDepositSize; } public void setMaxDepositSize(Long maxDepositSize) { this.maxDepositSize = maxDepositSize; } public Long getMaxFileSize() { return maxFileSize; } public void setMaxFileSize(Long maxFileSize) { this.maxFileSize = maxFileSize; } public UploadRequestStatus getStatus() { return status; } public void setStatus(UploadRequestStatus status) { this.status = status; } public Date getActivationDate() { return activationDate; } public void setActivationDate(Date activationDate) { this.activationDate = activationDate; } public Date getCreationDate() { return creationDate; } public void setCreationDate(Date creationDate) { this.creationDate = creationDate; } public Date getModificationDate() { return modificationDate; } public void setModificationDate(Date modificationDate) { this.modificationDate = modificationDate; } public Date getNotificationDate() { return notificationDate; } public void setNotificationDate(Date notificationDate) { this.notificationDate = notificationDate; } public Date getExpiryDate() { return expiryDate; } public void setExpiryDate(Date expiryDate) { this.expiryDate = expiryDate; } public String getUploadPropositionRequestUuid() { return uploadPropositionRequestUuid; } public void setUploadPropositionRequestUuid(String uploadPropositionRequestUuid) { this.uploadPropositionRequestUuid = uploadPropositionRequestUuid; } public Boolean getCanDelete() { return canDelete; } public void setCanDelete(Boolean canDelete) { this.canDelete = canDelete; } public Boolean getCanClose() { return canClose; } public void setCanClose(Boolean canClose) { this.canClose = canClose; } public Boolean getCanEditExpiryDate() { return canEditExpiryDate; } public void setCanEditExpiryDate(Boolean canEditExpiryDate) { this.canEditExpiryDate = canEditExpiryDate; } public String getLocale() { return locale; } public void setLocale(String locale) { this.locale = locale; } public Boolean isSecured() { return secured; } public void setSecured(Boolean secured) { this.secured = secured; } public String getMailMessageId() { return mailMessageId; } public void setMailMessageId(String mailMessageId) { this.mailMessageId = mailMessageId; } public Set<UploadRequestUrlMto> getUploadRequestURLs() { return uploadRequestURLs; } public void setUploadRequestURLs(Set<UploadRequestUrlMto> uploadRequestURLs) { this.uploadRequestURLs = uploadRequestURLs; } // public Set<UploadRequestHistory> getUploadRequestHistory() { // return uploadRequestHistory; // } // // public void setUploadRequestHistory(Set<UploadRequestHistory> uploadRequestHistory) { // this.uploadRequestHistory = uploadRequestHistory; // } public AccountMto getOwner() { return owner; } public void setOwner(AccountMto owner) { this.owner = owner; } public Boolean getNotified() { return notified; } public void setNotified(Boolean notified) { this.notified = notified; } public DomainMto getDomain() { return domain; } public void setDomain(DomainMto domain) { this.domain = domain; } public String getSubject() { return subject; } public void setSubject(String subject) { this.subject = subject; } public String getBody() { return body; } public void setBody(String body) { this.body = body; } public String getGroupUuid() { return groupUuid; } public void setGroupUuid(String groupUuid) { this.groupUuid = groupUuid; } }