Changeset 9201 in josm


Ignore:
Timestamp:
2015-12-28T17:10:17+01:00 (4 years ago)
Author:
Don-vip
Message:

add more unit tests, javadoc

Location:
trunk
Files:
4 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/oauth/OsmPrivileges.java

    r8510 r9201  
    22package org.openstreetmap.josm.data.oauth;
    33
     4/**
     5 * List of permissions granted to the current OSM connection.
     6 * @since 2747
     7 */
    48public class OsmPrivileges {
    59    private boolean allowWriteApi;
     
    1014    private boolean allowModifyNotes;
    1115
     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     */
    1220    public boolean isAllowWriteApi() {
    1321        return allowWriteApi;
    1422    }
    1523
     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     */
    1628    public void setAllowWriteApi(boolean allowWriteApi) {
    1729        this.allowWriteApi = allowWriteApi;
    1830    }
    1931
     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     */
    2036    public boolean isAllowWriteGpx() {
    2137        return allowWriteGpx;
    2238    }
    2339
     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     */
    2444    public void setAllowWriteGpx(boolean allowWriteGpx) {
    2545        this.allowWriteGpx = allowWriteGpx;
    2646    }
    2747
     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     */
    2852    public boolean isAllowReadGpx() {
    2953        return allowReadGpx;
    3054    }
    3155
     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     */
    3260    public void setAllowReadGpx(boolean allowReadGpx) {
    3361        this.allowReadGpx = allowReadGpx;
    3462    }
    3563
     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     */
    3668    public boolean isAllowReadPrefs() {
    3769        return allowReadPrefs;
    3870    }
    3971
     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     */
    4076    public void setAllowReadPrefs(boolean allowReadPrefs) {
    4177        this.allowReadPrefs = allowReadPrefs;
    4278    }
    4379
     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     */
    4484    public boolean isAllowWritePrefs() {
    4585        return allowWritePrefs;
    4686    }
    4787
     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     */
    4892    public void setAllowWritePrefs(boolean allowWritePrefs) {
    4993        this.allowWritePrefs = allowWritePrefs;
    5094    }
    5195
     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     */
    52100    public boolean isAllowModifyNotes() {
    53101        return allowModifyNotes;
    54102    }
    55103
     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     */
    56108    public void setAllowModifyNotes(boolean allowModifyNotes) {
    57109        this.allowModifyNotes = allowModifyNotes;
Note: See TracChangeset for help on using the changeset viewer.