]> git.argeo.org Git - lgpl/argeo-commons.git/blob - org.argeo.util/src/org/argeo/util/directory/HierarchyUnit.java
Introduce argeo-desktop-open
[lgpl/argeo-commons.git] / org.argeo.util / src / org / argeo / util / directory / HierarchyUnit.java
1 package org.argeo.util.directory;
2
3 import java.util.Dictionary;
4 import java.util.Locale;
5
6 /** A unit within the high-level organisational structure of a directory. */
7 public interface HierarchyUnit {
8 /** Name to use in paths. */
9 String getHierarchyUnitName();
10
11 /** Name to use in UI. */
12 String getHierarchyUnitLabel(Locale locale);
13
14 /**
15 * The parent {@link HierarchyUnit}, or <code>null</code> if a
16 * {@link Directory}.
17 */
18 HierarchyUnit getParent();
19
20 /** Direct children {@link HierarchyUnit}s. */
21 Iterable<HierarchyUnit> getDirectHierarchyUnits(boolean functionalOnly);
22
23 /**
24 * Whether this is an arbitrary named and placed {@link HierarchyUnit}.
25 *
26 * @return <code>true</code> if functional, <code>false</code> is technical
27 * (e.g. People, Groups, etc.)
28 */
29 boolean isFunctional();
30
31 /**
32 * The base of this organisational unit within the hierarchy. This would
33 * typically be an LDAP base DN.
34 */
35 String getBase();
36
37 /** The related {@link Directory}. */
38 Directory getDirectory();
39
40 /** Its metadata (typically LDAP attributes). */
41 Dictionary<String, Object> getProperties();
42 }