Package org.ametys.odf.orgunit
Class RootOrgUnitProvider
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.odf.orgunit.RootOrgUnitProvider
- All Implemented Interfaces:
LogEnabled
,Component
,Serviceable
Component to provide the root OrgUnit
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetChildOrgUnitIds
(String orgUnitId, boolean recursive) Get the child orgunits of an orgunitgetRoot()
Returns the rootOrgUnit
.Get the root idboolean
Determines the given id is the root orgunit idboolean
Determines the given orgunit is the root orgunitvoid
service
(ServiceManager smanager) Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
ROLE
Avalon role.
-
-
Constructor Details
-
RootOrgUnitProvider
public RootOrgUnitProvider()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
getRoot
Returns the rootOrgUnit
.- Returns:
- the root
OrgUnit
.
-
getRootId
Get the root id- Returns:
- the root id
-
isRoot
Determines the given id is the root orgunit id- Parameters:
id
- the id to test- Returns:
- true if is root
-
isRoot
Determines the given orgunit is the root orgunit- Parameters:
orgUnit
- the orgunit to test- Returns:
- true if is root
-
getChildOrgUnitIds
Get the child orgunits of an orgunit- Parameters:
orgUnitId
- The identifier of the main orgunitrecursive
- true to children recursively- Returns:
- A set containing all the child orgunit identifiers.
-