Massive package refactoring
[lgpl/argeo-commons.git] / org.argeo.api.cms / src / org / argeo / api / cms / directory / Directory.java
diff --git a/org.argeo.api.cms/src/org/argeo/api/cms/directory/Directory.java b/org.argeo.api.cms/src/org/argeo/api/cms/directory/Directory.java
new file mode 100644 (file)
index 0000000..7ed61eb
--- /dev/null
@@ -0,0 +1,32 @@
+package org.argeo.api.cms.directory;
+
+import java.util.Optional;
+
+import org.argeo.api.cms.transaction.WorkControl;
+
+/** An information directory (typicylly LDAP). */
+public interface Directory extends HierarchyUnit {
+       String getName();
+
+       /** Whether this directory is read only. */
+       boolean isReadOnly();
+
+       /** Whether this directory is disabled. */
+       boolean isDisabled();
+
+       /** The realm (typically Kerberos) of this directory. */
+       Optional<String> getRealm();
+
+       /** Sets the transaction control used by this directory when editing. */
+       void setTransactionControl(WorkControl transactionControl);
+
+       /*
+        * HIERARCHY
+        */
+
+       /** The hierarchy unit at this path. */
+       HierarchyUnit getHierarchyUnit(String path);
+
+       /** Create a new hierarchy unit. */
+       HierarchyUnit createHierarchyUnit(String path);
+}