projects
/
lgpl
/
argeo-commons.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Improve role management
[lgpl/argeo-commons.git]
/
org.argeo.api.cms
/
src
/
org
/
argeo
/
api
/
cms
/
directory
/
HierarchyUnit.java
diff --git
a/org.argeo.api.cms/src/org/argeo/api/cms/directory/HierarchyUnit.java
b/org.argeo.api.cms/src/org/argeo/api/cms/directory/HierarchyUnit.java
index 04593d94e428ef766fa87831fbaa0f3c745aaee7..f04dc4648637f9ca3c3197f584f7e70b41411998 100644
(file)
--- a/
org.argeo.api.cms/src/org/argeo/api/cms/directory/HierarchyUnit.java
+++ b/
org.argeo.api.cms/src/org/argeo/api/cms/directory/HierarchyUnit.java
@@
-26,7
+26,11
@@
public interface HierarchyUnit {
* @return <code>true</code> if functional, <code>false</code> is technical
* (e.g. People, Groups, etc.)
*/
* @return <code>true</code> if functional, <code>false</code> is technical
* (e.g. People, Groups, etc.)
*/
- boolean isFunctional();
+ default boolean isFunctional() {
+ return isType(Type.FUNCTIONAL);
+ }
+
+ boolean isType(Type type);
/**
* The base of this organisational unit within the hierarchy. This would
/**
* The base of this organisational unit within the hierarchy. This would
@@
-39,4
+43,11
@@
public interface HierarchyUnit {
/** Its metadata (typically LDAP attributes). */
Dictionary<String, Object> getProperties();
/** Its metadata (typically LDAP attributes). */
Dictionary<String, Object> getProperties();
+
+ enum Type {
+ PEOPLE, //
+ GROUPS, //
+ ROLES, //
+ FUNCTIONAL;
+ }
}
}