]> git.argeo.org Git - lgpl/argeo-commons.git/blobdiff - org.argeo.api.acr/src/org/argeo/api/acr/spi/ContentProvider.java
Improve documentation when in multi-runtime
[lgpl/argeo-commons.git] / org.argeo.api.acr / src / org / argeo / api / acr / spi / ContentProvider.java
index 56610ef4b097c917ceec3a155fc59e95b1f5893d..e354672a781c77adc1a09a009f42a3f2264c71b1 100644 (file)
@@ -7,6 +7,7 @@ import javax.xml.namespace.NamespaceContext;
 
 import org.argeo.api.acr.Content;
 import org.argeo.api.acr.ContentNotFoundException;
+import org.argeo.api.acr.ContentSession;
 import org.argeo.api.acr.search.BasicSearch;
 
 /**
@@ -50,6 +51,32 @@ public interface ContentProvider extends NamespaceContext {
                throw new UnsupportedOperationException();
        }
 
+       /*
+        * EDITION
+        */
+       /** Switch this content (and its subtree) to editing mode. */
+       default void openForEdit(ProvidedSession session, String relativePath) {
+               throw new UnsupportedOperationException();
+       }
+
+       /** Switch this content (and its subtree) to frozen mode. */
+       default void freeze(ProvidedSession session, String relativePath) {
+               throw new UnsupportedOperationException();
+       }
+
+       /** Whether this content (and its subtree) are in editing mode. */
+       default boolean isOpenForEdit(ProvidedSession session, String relativePath) {
+               throw new UnsupportedOperationException();
+       }
+
+       /**
+        * Called when an edition cycle is completed. Does nothing by default.
+        * 
+        * @see ContentSession#edit(java.util.function.Consumer)
+        */
+       default void persist(ProvidedSession session) {
+       }
+
        /*
         * NAMESPACE CONTEXT
         */