View Javadoc
1   /*
2    * Copyright (C) 2003-2014 eXo Platform SAS.
3    *
4    * This program is free software: you can redistribute it and/or modify
5    * it under the terms of the GNU Affero General Public License as published by
6    * the Free Software Foundation, either version 3 of the License, or
7    * (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 Affero General Public License for more details.
13   *
14   * You should have received a copy of the GNU Affero General Public License
15   * along with this program. If not, see <http://www.gnu.org/licenses/>.
16   */
17  
18  package org.exoplatform.calendar.ws.bean;
19  
20  import java.io.Serializable;
21  import java.util.Collection;
22  
23  import org.exoplatform.webservice.cs.bean.End;
24  
25  public class RepeatResource implements Serializable {
26    private static final long serialVersionUID = 5586869269014670514L;
27  
28    private boolean                   enabled;
29  
30    private String                    type;
31  
32    private int                       every;
33  
34    private String                    repeatOn;
35  
36    private String                    repeateBy;
37  
38    private String[]                  exclude;
39  
40    private End                       end;
41    
42    public RepeatResource() {}
43  
44    public RepeatResource(boolean enabled,
45                          String type,
46                          int every,
47                          String repeatOn,
48                          String repeatBy,
49                          Collection<String> exclude,
50                          End end) {
51      this.enabled = enabled;
52      this.type = type;
53      this.every = every;
54      this.repeatOn = repeatOn;
55      this.repeateBy = repeatBy;
56      if (exclude != null)
57        this.exclude = exclude.toArray(new String[exclude.size()]);
58      this.end = end;
59    }
60  
61    public boolean isEnabled() {
62      return enabled;
63    }
64  
65    public void setEnabled(boolean enabled) {
66      this.enabled = enabled;
67    }
68  
69    public String getType() {
70      return type;
71    }
72  
73    public void setType(String type) {
74      this.type = type;
75    }
76  
77    public int getEvery() {
78      return every;
79    }
80  
81    public void setEvery(int every) {
82      this.every = every;
83    }
84  
85    public String getRepeatOn() {
86      return repeatOn;
87    }
88  
89    public void setRepeatOn(String repeatOn) {
90      this.repeatOn = repeatOn;
91    }
92  
93    public String getRepeateBy() {
94      return repeateBy;
95    }
96  
97    public void setRepeateBy(String repeateBy) {
98      this.repeateBy = repeateBy;
99    }
100 
101   public String[] getExclude() {
102     return exclude;
103   }
104 
105   public void setExclude(String[] exclude) {
106     this.exclude = exclude;
107   }
108 
109   public End getEnd() {
110     return end;
111   }
112 
113   public void setEnd(End end) {
114     this.end = end;
115   }
116 }