Introduce always editing CmsEditable.
[lgpl/argeo-commons.git] / org.argeo.cms.ui / src / org / argeo / cms / ui / CmsEditable.java
index 687e3e83b4922212d4004726f3ddb2a2db22b874..72cc5971ab869e7e4bbd448a3111c652c8142a00 100644 (file)
@@ -1,6 +1,6 @@
 package org.argeo.cms.ui;
 
-/** API NOT STABLE (yet). */
+/** Abstraction of a simple edition life cycle. */
 public interface CmsEditable {
 
        /** Whether the calling thread can edit, the value is immutable */
@@ -33,4 +33,25 @@ public interface CmsEditable {
                }
        };
 
+       public static CmsEditable ALWAYS_EDITING = new CmsEditable() {
+
+               @Override
+               public void stopEditing() {
+               }
+
+               @Override
+               public void startEditing() {
+               }
+
+               @Override
+               public Boolean isEditing() {
+                       return true;
+               }
+
+               @Override
+               public Boolean canEdit() {
+                       return true;
+               }
+       };
+
 }