001/*
002 * (C) Copyright 2015 Nuxeo SA (http://nuxeo.com/) and others.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 *     http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 *
016 * Contributors:
017 *      André Justo
018 */
019
020package org.nuxeo.ecm.media.publishing.wistia.model;
021
022import org.codehaus.jackson.annotate.JsonIgnoreProperties;
023import org.codehaus.jackson.annotate.JsonProperty;
024
025import java.util.ArrayList;
026import java.util.Date;
027import java.util.List;
028
029@JsonIgnoreProperties(ignoreUnknown = true)
030public class Project {
031
032    protected int id;
033
034    protected String name;
035
036    protected String description;
037
038    protected int mediaCount;
039
040    @JsonProperty("created")
041    protected Date createdAt;
042
043    @JsonProperty("updated")
044    protected Date updatedAt;
045
046    protected String hashedId;
047
048    protected boolean anonymousCanUpload;
049
050    protected boolean anonymousCanDownload;
051
052    protected boolean isPublic;
053
054    protected String publicId;
055
056    protected List<Media> medias = new ArrayList<Media>();
057
058    public int getId() {
059        return id;
060    }
061
062    public void setId(int id) {
063        this.id = id;
064    }
065
066    public String getName() {
067        return name;
068    }
069
070    public void setName(String name) {
071        this.name = name;
072    }
073
074    public String getDescription() {
075        return description;
076    }
077
078    public void setDescription(String description) {
079        this.description = description;
080    }
081
082    public int getMediaCount() {
083        return mediaCount;
084    }
085
086    public void setMediaCount(int mediaCount) {
087        this.mediaCount = mediaCount;
088    }
089
090    public Date getCreatedAt() {
091        return createdAt;
092    }
093
094    public void setCreatedAt(Date createdAt) {
095        this.createdAt = createdAt;
096    }
097
098    public Date getUpdatedAt() {
099        return updatedAt;
100    }
101
102    public void setUpdatedAt(Date updatedAt) {
103        this.updatedAt = updatedAt;
104    }
105
106    public String getHashedId() {
107        return hashedId;
108    }
109
110    public void setHashedId(String hashedId) {
111        this.hashedId = hashedId;
112    }
113
114    public boolean getAnonymousCanUpload() {
115        return anonymousCanUpload;
116    }
117
118    public void setAnonymousCanUpload(boolean anonymousCanUpload) {
119        this.anonymousCanUpload = anonymousCanUpload;
120    }
121
122    public boolean getAnonymousCanDownload() {
123        return anonymousCanDownload;
124    }
125
126    public void setAnonymousCanDownload(boolean anonymousCanDownload) {
127        this.anonymousCanDownload = anonymousCanDownload;
128    }
129
130    public boolean isPublic() {
131        return isPublic;
132    }
133
134    public void setPublic(boolean isPublic) {
135        this.isPublic = isPublic;
136    }
137
138    public String getPublicId() {
139        return publicId;
140    }
141
142    public void setPublicId(String publicId) {
143        this.publicId = publicId;
144    }
145
146    public void addMedia(Media media) {
147        this.medias.add(media);
148    }
149
150    public List<Media> getMedias() {
151        return this.medias;
152    }
153
154    @Override
155    public String toString() {
156        return "--- Project info ---" +
157                "\nid: \t" + getId() +
158                "\nname: \t" + getName() +
159                "\ndescription: \t" + getDescription() +
160                "\nmediaCount: \t" + getMediaCount() +
161                "\nhashedId: \t" + getHashedId() +
162                "\nanonymousCanUpload: \t" + getAnonymousCanUpload() +
163                "\nanonymousCanDownload: \t" + getAnonymousCanDownload() +
164                "\nisPublic: \t" + isPublic() + "\n";
165    }
166}