source: josm/trunk/src/org/openstreetmap/josm/data/oauth/OsmPrivileges.java@ 12851

Last change on this file since 12851 was 9201, checked in by Don-vip, 8 years ago

add more unit tests, javadoc

  • Property svn:eol-style set to native
File size: 3.7 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.data.oauth;
3
4/**
5 * List of permissions granted to the current OSM connection.
6 * @since 2747
7 */
8public class OsmPrivileges {
9 private boolean allowWriteApi;
10 private boolean allowWriteGpx;
11 private boolean allowReadGpx;
12 private boolean allowReadPrefs;
13 private boolean allowWritePrefs;
14 private boolean allowModifyNotes;
15
16 /**
17 * Determines if the client is allowed to modify the map.
18 * @return {@code true} if the client is allowed to modify the map, {@code false} otherwise
19 */
20 public boolean isAllowWriteApi() {
21 return allowWriteApi;
22 }
23
24 /**
25 * Sets whether the client is allowed to modify the map.
26 * @param allowWriteApi {@code true} if the client is allowed to modify the map, {@code false} otherwise
27 */
28 public void setAllowWriteApi(boolean allowWriteApi) {
29 this.allowWriteApi = allowWriteApi;
30 }
31
32 /**
33 * Determines if the client is allowed to upload GPS traces.
34 * @return {@code true} if the client is allowed to upload GPS traces, {@code false} otherwise
35 */
36 public boolean isAllowWriteGpx() {
37 return allowWriteGpx;
38 }
39
40 /**
41 * Sets whether the client is allowed to upload GPS traces.
42 * @param allowWriteGpx {@code true} if the client is allowed to upload GPS traces, {@code false} otherwise
43 */
44 public void setAllowWriteGpx(boolean allowWriteGpx) {
45 this.allowWriteGpx = allowWriteGpx;
46 }
47
48 /**
49 * Determines if the client is allowed to read private GPS traces.
50 * @return {@code true} if the client is allowed to read private GPS traces, {@code false} otherwise
51 */
52 public boolean isAllowReadGpx() {
53 return allowReadGpx;
54 }
55
56 /**
57 * Sets whether the client is allowed to read private GPS traces.
58 * @param allowReadGpx {@code true} if the client is allowed to read private GPS traces, {@code false} otherwise
59 */
60 public void setAllowReadGpx(boolean allowReadGpx) {
61 this.allowReadGpx = allowReadGpx;
62 }
63
64 /**
65 * Determines if the client is allowed to read user preferences.
66 * @return {@code true} if the client is allowed to read user preferences, {@code false} otherwise
67 */
68 public boolean isAllowReadPrefs() {
69 return allowReadPrefs;
70 }
71
72 /**
73 * Sets whether the client is allowed to read user preferences.
74 * @param allowReadPrefs {@code true} if the client is allowed to read user preferences, {@code false} otherwise
75 */
76 public void setAllowReadPrefs(boolean allowReadPrefs) {
77 this.allowReadPrefs = allowReadPrefs;
78 }
79
80 /**
81 * Determines if the client is allowed to modify user preferences.
82 * @return {@code true} if the client is allowed to modify user preferences, {@code false} otherwise
83 */
84 public boolean isAllowWritePrefs() {
85 return allowWritePrefs;
86 }
87
88 /**
89 * Sets whether the client is allowed to modify user preferences.
90 * @param allowWritePrefs {@code true} if the client is allowed to modify user preferences, {@code false} otherwise
91 */
92 public void setAllowWritePrefs(boolean allowWritePrefs) {
93 this.allowWritePrefs = allowWritePrefs;
94 }
95
96 /**
97 * Determines if the client is allowed to modify notes.
98 * @return {@code true} if the client is allowed to modify notes, {@code false} otherwise
99 */
100 public boolean isAllowModifyNotes() {
101 return allowModifyNotes;
102 }
103
104 /**
105 * Sets whether the client is allowed to modify notes.
106 * @param allowModifyNotes {@code true} if the client is allowed to modify notes, {@code false} otherwise
107 */
108 public void setAllowModifyNotes(boolean allowModifyNotes) {
109 this.allowModifyNotes = allowModifyNotes;
110 }
111}
Note: See TracBrowser for help on using the repository browser.