]> git.argeo.org Git - lgpl/argeo-commons.git/blob - CmsEditable.java
bc952c3021b6755908902058379fd0e71706ee1f
[lgpl/argeo-commons.git] / CmsEditable.java
1 package org.argeo.cms.ui;
2
3 /** Abstraction of a simple edition life cycle. */
4 public interface CmsEditable {
5
6 /** Whether the calling thread can edit, the value is immutable */
7 public Boolean canEdit();
8
9 public Boolean isEditing();
10
11 public void startEditing();
12
13 public void stopEditing();
14
15 public static CmsEditable NON_EDITABLE = new CmsEditable() {
16
17 @Override
18 public void stopEditing() {
19 }
20
21 @Override
22 public void startEditing() {
23 }
24
25 @Override
26 public Boolean isEditing() {
27 return false;
28 }
29
30 @Override
31 public Boolean canEdit() {
32 return false;
33 }
34 };
35
36 }