source: josm/trunk/src/org/openstreetmap/josm/data/osm/Lockable.java@ 13512

Last change on this file since 13512 was 13453, checked in by Don-vip, 6 years ago

fix #8039, fix #10456: final fixes for the read-only/locked layers:

  • rename "read-only" to "locked" (in XML and Java classes/interfaces)
  • add a new download policy (true/never) to allow private layers forbidding only to download data, but allowing everything else

This leads to:

  • normal layers: download allowed, modifications allowed, upload allowed
  • private layers: download allowed or not (download=true/never), modifications allowed, upload allowed or not (upload=true/discouraged/never)
  • locked layers: nothing allowed, the data cannot be modified in any way
  • Property svn:eol-style set to native
File size: 551 bytes
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.data.osm;
3
4/**
5 * To be implemented by modifiable objects to offer a "read-only/locked" mode.
6 * @since 13453
7 */
8public interface Lockable {
9
10 /**
11 * Enables the read-only/locked mode.
12 */
13 void lock();
14
15 /**
16 * Disables the read-only/locked mode.
17 */
18 void unlock();
19
20 /**
21 * Determines if this is read-only/locked (thus it cannot be modified).
22 * @return {@code true} if this is read-only/locked
23 */
24 boolean isLocked();
25}
Note: See TracBrowser for help on using the repository browser.