Multiple user referentials working with IPA.
[lgpl/argeo-commons.git] / org.argeo.util / src / org / argeo / util / directory / HierarchyUnit.java
index 2673f16f0760cf04ad2f75ab6929d1418d5862ed..947b6bc8553124e189f16fc6ab64671fffc6f1ed 100644 (file)
@@ -1,20 +1,42 @@
 package org.argeo.util.directory;
 
 import java.util.Dictionary;
+import java.util.Locale;
 
 /** A unit within the high-level organisational structure of a directory. */
 public interface HierarchyUnit {
+       /** Name to use in paths. */
        String getHierarchyUnitName();
 
+       /** Name to use in UI. */
+       String getHierarchyUnitLabel(Locale locale);
+
+       /**
+        * The parent {@link HierarchyUnit}, or <code>null</code> if a
+        * {@link Directory}.
+        */
        HierarchyUnit getParent();
 
+       /** Direct children {@link HierarchyUnit}s. */
        Iterable<HierarchyUnit> getDirectHierarchyUnits(boolean functionalOnly);
 
+       /**
+        * Whether this is an arbitrary named and placed {@link HierarchyUnit}.
+        * 
+        * @return <code>true</code> if functional, <code>false</code> is technical
+        *         (e.g. People, Groups, etc.)
+        */
        boolean isFunctional();
 
-       String getContext();
+       /**
+        * The base of this organisational unit within the hierarchy. This would
+        * typically be an LDAP base DN.
+        */
+       String getBase();
 
+       /** The related {@link Directory}. */
        Directory getDirectory();
 
+       /** Its metadata (typically LDAP attributes). */
        Dictionary<String, Object> getProperties();
 }