X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;ds=inline;f=org.argeo.util%2Fsrc%2Forg%2Fargeo%2Futil%2Fdirectory%2FHierarchyUnit.java;h=947b6bc8553124e189f16fc6ab64671fffc6f1ed;hb=6211e86ec9bd6dfd4445fed12c1baa0e98314824;hp=2673f16f0760cf04ad2f75ab6929d1418d5862ed;hpb=3066d79e3ced9339679672242bdf2340a03e1f29;p=lgpl%2Fargeo-commons.git
diff --git a/org.argeo.util/src/org/argeo/util/directory/HierarchyUnit.java b/org.argeo.util/src/org/argeo/util/directory/HierarchyUnit.java
index 2673f16f0..947b6bc85 100644
--- a/org.argeo.util/src/org/argeo/util/directory/HierarchyUnit.java
+++ b/org.argeo.util/src/org/argeo/util/directory/HierarchyUnit.java
@@ -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 null
if a
+ * {@link Directory}.
+ */
HierarchyUnit getParent();
+ /** Direct children {@link HierarchyUnit}s. */
Iterable getDirectHierarchyUnits(boolean functionalOnly);
+ /**
+ * Whether this is an arbitrary named and placed {@link HierarchyUnit}.
+ *
+ * @return true
if functional, false
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 getProperties();
}