]> gitweb.fperrin.net Git - Dictionary.git/blob - jars/gss-lib-2.2/src/com/pras/Collaborator.java
2e5be4108b216c3217eea7d8fb4db04a5b56fcbe
[Dictionary.git] / jars / gss-lib-2.2 / src / com / pras / Collaborator.java
1 /*\r
2  * Copyright (C) 2010 Prasanta Paul, http://prasanta-paul.blogspot.com\r
3  *\r
4  * Licensed under the Apache License, Version 2.0 (the "License");\r
5  * you may not use this file except in compliance with the License.\r
6  * You may obtain a copy of the License at\r
7  *\r
8  *      http://www.apache.org/licenses/LICENSE-2.0\r
9  *\r
10  * Unless required by applicable law or agreed to in writing, software\r
11  * distributed under the License is distributed on an "AS IS" BASIS,\r
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
13  * See the License for the specific language governing permissions and\r
14  * limitations under the License.\r
15  */\r
16 \r
17 package com.pras;\r
18 \r
19 /**\r
20  * ACL details of a SpreadSheet\r
21  * \r
22  * @author Prasanta Paul\r
23  *\r
24  */\r
25 public class Collaborator {\r
26 \r
27         // Defined Roles\r
28         /**\r
29          * Owner of a SpreadSheet\r
30          */\r
31         public static String ROLE_OWNER = "owner";\r
32         /**\r
33          * Able to Read/Write and Further Share as Reader/Writer\r
34          */\r
35         public static String ROLE_WRITER = "writer";\r
36         /**\r
37          * Able to Read\r
38          */\r
39         public static String ROLE_READER = "reader";\r
40         \r
41         // Defined Scopes\r
42         /**\r
43          * Use this scope to share it with an Email account \r
44          */\r
45         public static String SCOPE_USER = "user";\r
46         /**\r
47          * Use this scope to share it with a Group \r
48          */\r
49         public static String SCOPE_GROUP = "group";\r
50         /**\r
51          * Use this scope to share it with a Domain\r
52          */\r
53         public static String SCOPE_DOMAIN = "domain";\r
54         /**\r
55          * Use this scope to make the SpreadSheet publicly accessible to anyuser\r
56          */\r
57         public static String SCOPE_DEFAULT = "default";\r
58         \r
59         String role;\r
60         String scopeType;\r
61         String scopeValue;\r
62         String editLink;\r
63         \r
64         /**\r
65          * Get Role - {"owner", "writer", "reader"}\r
66          * @return\r
67          */\r
68         public String getRole() {\r
69                 return role;\r
70         }\r
71         /**\r
72          * Set Role - {"owner", "writer", "reader"}\r
73          * @param role {ROLE_OWNER, ROLE_WRITER, ROLE_READER} \r
74          */\r
75         public void setRole(String role) {\r
76                 this.role = role;\r
77         }\r
78         /**\r
79          * Get Scope Type - {"user", "group", "domain", "default"}\r
80          * @return\r
81          */\r
82         public String getScopeType() {\r
83                 return scopeType;\r
84         }\r
85         /**\r
86          * Set Scope Type {"user", "group", "domain", "default"}\r
87          * @param scopeType {SCOPE_USER, SCOPE_GROUP, SCOPE_DOMAIN, SCOPE_DEFAULT}\r
88          */\r
89         public void setScopeType(String scopeType) {\r
90                 this.scopeType = scopeType;\r
91         }\r
92         /**\r
93          * Get Scope Value e.g. <email address>\r
94          * @return\r
95          */\r
96         public String getScopeValue() {\r
97                 return scopeValue;\r
98         }\r
99         /**\r
100          * Set Scope Value\r
101          * @param scopeValue Email Address\r
102          */\r
103         public void setScopeValue(String scopeValue) {\r
104                 this.scopeValue = scopeValue;\r
105         }\r
106         /**\r
107          * Get Edit Link\r
108          * @return\r
109          */\r
110         public String getEditLink() {\r
111                 return editLink;\r
112         }\r
113         /**\r
114          * Set Edit Link\r
115          * @param editLink\r
116          */\r
117         public void setEditLink(String editLink) {\r
118                 this.editLink = editLink;\r
119         }\r
120 }\r