Implement acl/group resource in cloud account server.
[platform/upstream/iotivity.git] / cloud / account / src / main / java / org / iotivity / cloud / accountserver / db / TokenTable.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 package org.iotivity.cloud.accountserver.db;
23
24 import org.iotivity.cloud.accountserver.Constants;
25
26 /**
27  *
28  * This class provides a set of APIs storing session information of authorized
29  * user.
30  *
31  */
32
33 public class TokenTable {
34
35     private String uuid         = null;
36     private String did          = null;
37     private String accesstoken  = null;
38     private String refreshtoken = null;
39     private String provider     = null;
40     private long   expiredtime  = Constants.TOKEN_INFINITE;
41     private String issuedtime   = null;
42
43     public String getUuid() {
44         return uuid;
45     }
46
47     public void setUuid(Object uuid) {
48         this.uuid = uuid.toString();
49     }
50
51     public String getDid() {
52         return did;
53     }
54
55     public void setDid(String did) {
56         this.did = did;
57     }
58
59     public String getAccesstoken() {
60         return accesstoken;
61     }
62
63     public void setAccesstoken(Object accesstoken) {
64         if (accesstoken != null)
65             this.accesstoken = accesstoken.toString();
66     }
67
68     public String getRefreshtoken() {
69         return refreshtoken;
70     }
71
72     public void setRefreshtoken(Object refreshtoken) {
73         if (refreshtoken != null)
74             this.refreshtoken = refreshtoken.toString();
75     }
76
77     public String getProvider() {
78         return provider;
79     }
80
81     public void setProvider(Object provider) {
82         if (provider != null)
83             this.provider = provider.toString();
84     }
85
86     public long getExpiredtime() {
87         return expiredtime;
88     }
89
90     public void setExpiredtime(Object expiredtime) {
91         if (expiredtime != null)
92             this.expiredtime = Long.valueOf(expiredtime.toString());
93     }
94
95     public String getIssuedtime() {
96         return issuedtime;
97     }
98
99     public void setIssuedtime(Object issuedtime) {
100         if (issuedtime != null)
101             this.issuedtime = issuedtime.toString();
102     }
103 }