+
+ @Override
+ default Optional<Content> getContent(String path) {
+ String absolutePath;
+ if (path.startsWith(Content.ROOT_PATH)) {// absolute
+ absolutePath = path;
+ } else {// relative
+ absolutePath = getPath() + '/' + path;
+ }
+ return getSession().exists(absolutePath) ? Optional.of(getSession().get(absolutePath)) : Optional.empty();
+ }
+
+ /*
+ * ACCESS
+ */
+ /** Whether the session has the right to access the parent. */
+ default boolean isParentAccessible() {
+ return true;
+ }
+
+ /** Whether the related session can open this content for edit. */
+ default boolean canEdit() {
+ return false;
+ }