]>
git.argeo.org Git - lgpl/argeo-commons.git/blob - org.argeo.api.acr/src/org/argeo/api/acr/spi/ProvidedContent.java
1 package org
.argeo
.api
.acr
.spi
;
3 import org
.argeo
.api
.acr
.Content
;
5 /** A {@link Content} implementation. */
6 public interface ProvidedContent
extends Content
{
7 final static String ROOT_PATH
= "/";
9 ProvidedSession
getSession();
11 ContentProvider
getProvider();
16 * An opaque ID which is guaranteed to uniquely identify this content within the
17 * session return by {@link #getSession()}. Typically used for UI.
19 String
getSessionLocalId();
21 default ProvidedContent
getMountPoint(String relativePath
) {
22 throw new UnsupportedOperationException("This content doe not support mount");
25 default ProvidedContent
getContent(String path
) {
27 if (path
.startsWith(ROOT_PATH
)) {// absolute
28 fileNode
= getSession().get(path
);
30 String absolutePath
= getPath() + '/' + path
;
31 fileNode
= getSession().get(absolutePath
);
33 return (ProvidedContent
) fileNode
;