View Javadoc
1   /*
2    * Licensed to The Apereo Foundation under one or more contributor license
3    * agreements. See the NOTICE file distributed with this work for additional
4    * information regarding copyright ownership.
5    *
6    *
7    * The Apereo Foundation licenses this file to you under the Educational
8    * Community License, Version 2.0 (the "License"); you may not use this file
9    * except in compliance with the License. You may obtain a copy of the License
10   * at:
11   *
12   *   http://opensource.org/licenses/ecl2.txt
13   *
14   * Unless required by applicable law or agreed to in writing, software
15   * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16   * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
17   * License for the specific language governing permissions and limitations under
18   * the License.
19   *
20   */
21  
22  package org.opencastproject.themes;
23  
24  import org.opencastproject.security.api.User;
25  import org.opencastproject.util.data.Option;
26  
27  import java.io.Serializable;
28  import java.util.Date;
29  
30  /**
31   * Business object of themes class
32   */
33  public class Theme implements Serializable {
34  
35    private static final long serialVersionUID = -1787920672441332673L;
36  
37    private final Option<Long> id;
38    private final Date creationDate;
39    private final boolean isDefault;
40    private final User creator;
41    private final String name;
42  
43    private final String description;
44    private final boolean bumperActive;
45    private final String bumperFile;
46    private final boolean trailerActive;
47    private final String trailerFile;
48    private final boolean titleSlideActive;
49    private final String titleSlideMetadata;
50    private final String titleSlideBackground;
51    private final boolean licenseSlideActive;
52    private final String licenseSlideBackground;
53    private final String licenseSlideDescription;
54    private final boolean watermarkActive;
55    private final String watermarkFile;
56    private final String watermarkPosition;
57  
58    public Theme(Option<Long> id, Date creationDate, boolean isDefault, User creator, String name) {
59      this(id, creationDate, isDefault, creator, name, null, false, null, false, null, false, null, null, false, null,
60              null, false, null, null);
61    }
62  
63    public Theme(Option<Long> id, Date creationDate, boolean isDefault, User creator, String name, String description,
64            boolean bumperActive, String bumperFile, boolean trailerActive, String trailerFile, boolean titleSlideActive,
65            String titleSlideMetadata, String titleSlideBackground, boolean licenseSlideActive,
66            String licenseSlideBackground, String licenseSlideDescription, boolean watermarkActive, String watermarkFile,
67            String watermarkPosition) {
68      this.id = id;
69      this.creationDate = creationDate;
70      this.isDefault = isDefault;
71      this.creator = creator;
72      this.name = name;
73      this.description = description;
74      this.bumperActive = bumperActive;
75      this.bumperFile = bumperFile;
76      this.trailerActive = trailerActive;
77      this.trailerFile = trailerFile;
78      this.titleSlideActive = titleSlideActive;
79      this.titleSlideMetadata = titleSlideMetadata;
80      this.titleSlideBackground = titleSlideBackground;
81      this.licenseSlideActive = licenseSlideActive;
82      this.licenseSlideBackground = licenseSlideBackground;
83      this.licenseSlideDescription = licenseSlideDescription;
84      this.watermarkActive = watermarkActive;
85      this.watermarkFile = watermarkFile;
86      this.watermarkPosition = watermarkPosition;
87    }
88  
89    public Option<Long> getId() {
90      return id;
91    }
92  
93    public Date getCreationDate() {
94      return creationDate;
95    }
96  
97    public User getCreator() {
98      return creator;
99    }
100 
101   public boolean isDefault() {
102     return isDefault;
103   }
104 
105   public String getName() {
106     return name;
107   }
108 
109   public String getDescription() {
110     return description;
111   }
112 
113   public boolean isBumperActive() {
114     return bumperActive;
115   }
116 
117   public String getBumperFile() {
118     return bumperFile;
119   }
120 
121   public boolean isTrailerActive() {
122     return trailerActive;
123   }
124 
125   public String getTrailerFile() {
126     return trailerFile;
127   }
128 
129   public boolean isTitleSlideActive() {
130     return titleSlideActive;
131   }
132 
133   public String getTitleSlideMetadata() {
134     return titleSlideMetadata;
135   }
136 
137   public String getTitleSlideBackground() {
138     return titleSlideBackground;
139   }
140 
141   public boolean isLicenseSlideActive() {
142     return licenseSlideActive;
143   }
144 
145   public String getLicenseSlideBackground() {
146     return licenseSlideBackground;
147   }
148 
149   public String getLicenseSlideDescription() {
150     return licenseSlideDescription;
151   }
152 
153   public boolean isWatermarkActive() {
154     return watermarkActive;
155   }
156 
157   public String getWatermarkFile() {
158     return watermarkFile;
159   }
160 
161   public String getWatermarkPosition() {
162     return watermarkPosition;
163   }
164 
165   @Override
166   public String toString() {
167     return new StringBuilder(id.toString()).append(":").append(name).toString();
168   }
169 
170 }