Imported Upstream version 1.1.0
[platform/upstream/iotivity.git] / android / android_api / base / src / main / java / org / iotivity / base / OicSecAcl.java
1 /*
2  * //******************************************************************
3  * //
4  * // Copyright 2015 Samsung Electronics All Rights Reserved.
5  * //
6  * //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
7  * //
8  * // Licensed under the Apache License, Version 2.0 (the "License");
9  * // you may not use this file except in compliance with the License.
10  * // You may obtain a copy of the License at
11  * //
12  * //      http://www.apache.org/licenses/LICENSE-2.0
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,
16  * // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * // See the License for the specific language governing permissions and
18  * // limitations under the License.
19  * //
20  * //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
21  */
22
23 package org.iotivity.base;
24
25 import java.io.Serializable;
26 import java.util.List;
27 import java.util.Arrays;
28
29 public class OicSecAcl implements Serializable {
30
31     private String       subject;
32     private int          permission;
33     private List<String> resources;
34     private List<String> periods;
35     private List<String> recurrences;
36     private String rownerID;
37
38     public OicSecAcl(String subject, List<String> recurrences, List<String> periods, int permission,
39             List<String> resources, String rownerID) {
40         this.subject = subject;
41         this.recurrences = recurrences;
42         this.periods = periods;
43         this.permission = permission;
44         this.resources = resources;
45         this.rownerID = rownerID;
46     }
47
48     public String getSubject() {
49         return this.subject;
50     }
51
52     public void setSubject(String subject) {
53         this.subject = subject;
54     }
55
56
57     public void setRownerID(String rownerID) {
58         this.rownerID = rownerID;
59     }
60
61     public List<String> getRecurrences() {
62         return recurrences;
63     }
64
65     public void setRecurrences(List<String> recurrences) {
66         this.recurrences = recurrences;
67     }
68
69     public List<String> getPeriods() {
70         return periods;
71     }
72
73     public void setPeriods(List<String> periods) {
74         this.periods = periods;
75     }
76
77     public int getPermission() {
78         return this.permission;
79     }
80
81     public void setPermission(int permission) {
82         this.permission = permission;
83     }
84
85     public List<String> getResources() {
86         return resources;
87     }
88
89     public void setResources(List<String> resources) {
90         this.resources = resources;
91     }
92
93     public int getResourcesCount() {
94         return this.resources.size();
95     }
96
97     public String getResources(int i) {
98         return this.resources.get(i);
99     }
100
101     public int getPeriodsCount() {
102         return this.periods.size();
103     }
104
105     public String getPeriods(int i) {
106         return this.periods.get(i);
107     }
108
109     public String getRecurrences(int i) {
110         return this.recurrences.get(i);
111     }
112
113     public String getRownerID() {
114         return this.rownerID;
115     }
116 }