]> git.argeo.org Git - lgpl/argeo-commons.git/blobdiff - org.argeo.util/src/org/argeo/util/directory/Directory.java
Improve Directory framework.
[lgpl/argeo-commons.git] / org.argeo.util / src / org / argeo / util / directory / Directory.java
index 05808908d109adc00da816b0a19b615bc1737e33..11e8e6285e64bcb0bf809e5adc22e2c56a76b953 100644 (file)
@@ -1,10 +1,12 @@
 package org.argeo.util.directory;
 
+import java.util.Dictionary;
 import java.util.Optional;
 
 import org.argeo.util.transaction.WorkControl;
 
-public interface Directory {
+/** An information directory (typicylly LDAP). */
+public interface Directory extends HierarchyUnit {
        /**
         * The base of the hierarchy defined by this directory. This could typically be
         * an LDAP base DN.
@@ -13,20 +15,33 @@ public interface Directory {
 
        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
+        * METADATA
         */
+       /** Metadata of this directory. */
+       public Dictionary<String, Object> getProperties();
 
+       /*
+        * HIERARCHY
+        */
+       /** The first level of hierarchy units. */
        Iterable<HierarchyUnit> getDirectHierarchyUnits(boolean functionalOnly);
 
+       /** The hierarchy unit at this path. */
        HierarchyUnit getHierarchyUnit(String path);
 
+       /** Create a new hierarchy unit. */
+       HierarchyUnit createHierarchyUnit(String path);
 }