X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=org.argeo.api.acr%2Fsrc%2Forg%2Fargeo%2Fapi%2Facr%2Fspi%2FProvidedContent.java;fp=org.argeo.api.acr%2Fsrc%2Forg%2Fargeo%2Fapi%2Facr%2Fspi%2FProvidedContent.java;h=d4162afb0d09d9db7ac8ebccc9ea8d7ea938861d;hb=369abbec35158f11bcca3651c1c3f2f7d6652226;hp=3cf130a7c456d35e22c5d74e961bc1c2acc0ffd1;hpb=40b08908d2519f46bce6d1bc3364224100c59c28;p=lgpl%2Fargeo-commons.git diff --git a/org.argeo.api.acr/src/org/argeo/api/acr/spi/ProvidedContent.java b/org.argeo.api.acr/src/org/argeo/api/acr/spi/ProvidedContent.java index 3cf130a7c..d4162afb0 100644 --- a/org.argeo.api.acr/src/org/argeo/api/acr/spi/ProvidedContent.java +++ b/org.argeo.api.acr/src/org/argeo/api/acr/spi/ProvidedContent.java @@ -6,10 +6,13 @@ import org.argeo.api.acr.Content; public interface ProvidedContent extends Content { final static String ROOT_PATH = "/"; + /** The related {@link ProvidedSession}. */ ProvidedSession getSession(); + /** The {@link ContentProvider} this {@link Content} belongs to. */ ContentProvider getProvider(); + /** Depth relative to the root of the repository. */ int getDepth(); /** @@ -27,10 +30,15 @@ public interface ProvidedContent extends Content { */ String getSessionLocalId(); + /** + * The {@link Content} within the same {@link ContentProvider} which can be used + * to mount another {@link ContentProvider}. + */ default ProvidedContent getMountPoint(String relativePath) { throw new UnsupportedOperationException("This content doe not support mount"); } + @Override default ProvidedContent getContent(String path) { Content fileNode; if (path.startsWith(ROOT_PATH)) {// absolute @@ -50,4 +58,8 @@ public interface ProvidedContent extends Content { return true; } + /** Whether the related session can open this content for edit. */ + default boolean canEdit() { + return false; + } }