Imported Upstream version 1.1.1
[platform/upstream/iotivity.git] / android / android_api / base / src / main / java / org / iotivity / base / OicSecPdAcl.java
1 /*
2  * //******************************************************************
3  * //
4  * // Copyright 2016 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 OicSecPdAcl implements Serializable {
30
31     private int          mPermission;
32     private List<String> mResources;
33     private List<String> mPeriods;
34     private List<String> mRecurrences;
35
36     public OicSecPdAcl(List<String> recurrences, List<String> periods, int permission,
37             List<String> resources) {
38         this.mRecurrences = recurrences;
39         this.mPeriods = periods;
40         this.mPermission = permission;
41         this.mResources = resources;
42     }
43
44     public List<String> getRecurrences() {
45         return mRecurrences;
46     }
47
48     public void setRecurrences(List<String> recurrences) {
49         this.mRecurrences = recurrences;
50     }
51
52     public List<String> getPeriods() {
53         return mPeriods;
54     }
55
56     public void setPeriods(List<String> periods) {
57         this.mPeriods = periods;
58     }
59
60     public int getPermission() {
61         return this.mPermission;
62     }
63
64     public void setPermission(int permission) {
65         this.mPermission = permission;
66     }
67
68     public List<String> getResources() {
69         return mResources;
70     }
71
72     public void setResources(List<String> resources) {
73         this.mResources = resources;
74     }
75
76     public int getResourcesCount() {
77         return this.mResources.size();
78     }
79
80     public String getResources(int i) {
81         return this.mResources.get(i);
82     }
83
84     public int getPeriodsCount() {
85         return this.mPeriods.size();
86     }
87
88     public String getPeriods(int i) {
89         return this.mPeriods.get(i);
90     }
91
92     public String getRecurrences(int i) {
93         return this.mRecurrences.get(i);
94     }
95 }