X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=org.argeo.cms%2Fsrc%2Forg%2Fargeo%2Fcms%2Facr%2Fdirectory%2FDirectoryContent.java;h=6e39280cee86a12bbb4d1dfa85f51ddedb8c392a;hb=55d88fba80cec198a0f11ba7545e19878c51fc5e;hp=4e738ae2b8399e315d68a45816373191e34725b9;hpb=0ce8ecfe974cec9f524c16884209cd08544d890d;p=lgpl%2Fargeo-commons.git
diff --git a/org.argeo.cms/src/org/argeo/cms/acr/directory/DirectoryContent.java b/org.argeo.cms/src/org/argeo/cms/acr/directory/DirectoryContent.java
index 4e738ae2b..6e39280ce 100644
--- a/org.argeo.cms/src/org/argeo/cms/acr/directory/DirectoryContent.java
+++ b/org.argeo.cms/src/org/argeo/cms/acr/directory/DirectoryContent.java
@@ -10,13 +10,13 @@ import javax.xml.namespace.QName;
import org.argeo.api.acr.Content;
import org.argeo.api.acr.ContentName;
import org.argeo.api.acr.spi.ProvidedSession;
-import org.argeo.util.directory.Directory;
-import org.argeo.util.directory.HierarchyUnit;
+import org.argeo.api.cms.directory.CmsDirectory;
+import org.argeo.api.cms.directory.HierarchyUnit;
class DirectoryContent extends AbstractDirectoryContent {
- private Directory directory;
+ private CmsDirectory directory;
- public DirectoryContent(ProvidedSession session, DirectoryContentProvider provider, Directory directory) {
+ public DirectoryContent(ProvidedSession session, DirectoryContentProvider provider, CmsDirectory directory) {
super(session, provider);
this.directory = directory;
}
@@ -45,4 +45,14 @@ class DirectoryContent extends AbstractDirectoryContent {
return provider.getRootContent(getSession());
}
+ @SuppressWarnings("unchecked")
+ @Override
+ public A adapt(Class clss) {
+ if (clss.equals(HierarchyUnit.class))
+ return (A) directory;
+ if (clss.equals(CmsDirectory.class))
+ return (A) directory;
+ return super.adapt(clss);
+ }
+
}