Imported Upstream version 1.1.1
[platform/upstream/iotivity.git] / android / android_api / base / src / main / java / org / iotivity / base / OicSecAce.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.util.List;
26 public class OicSecAce {
27         private String subjectID;
28         private int permission;
29         private List<OicSecResr> resources;
30         private List<OicSecValidity> validities;
31
32         public OicSecAce(String subjectID, int permission,
33                 List<OicSecResr> resources, List<OicSecValidity> validities) {
34             super();
35             this.subjectID = subjectID;
36             this.permission = permission;
37             this.resources = resources;
38             this.validities = validities;
39         }
40
41         public String getSubjectID() {
42             return subjectID;
43         }
44
45         public void setSubjectID(String subjectID) {
46             this.subjectID = subjectID;
47         }
48
49         public int getPermission() {
50             return permission;
51         }
52
53         public void setPermission(int permission) {
54             this.permission = permission;
55         }
56
57         public List<OicSecResr> getResourcesList() {
58             return resources;
59         }
60
61         public OicSecResr[] getResources() {
62             return resources.toArray(new OicSecResr[resources.size()]);
63         }
64         public void setResources(List<OicSecResr> resources) {
65             this.resources = resources;
66         }
67
68         public List<OicSecValidity> getValiditiesList() {
69             return validities;
70         }
71
72         public OicSecValidity[] getValidities() {
73             return validities.toArray(new OicSecValidity[validities.size()]);
74         }
75
76
77         public void setValidities(List<OicSecValidity> validities) {
78             this.validities = validities;
79         }
80 }