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
public class RootOrgUnitProvider extends AbstractLogEnabled implements Component, Serviceable
Component to provide the root OrgUnit
-
-
Constructor Summary
Constructors Constructor Description RootOrgUnitProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<String>getChildOrgUnitIds(String orgUnitId, boolean recursive)Get the child orgunits of an orgunitOrgUnitgetRoot()Returns the rootOrgUnit.StringgetRootId()Get the root idbooleanisRoot(String id)Determines the given id is the root orgunit idbooleanisRoot(OrgUnit orgUnit)Determines the given orgunit is the root orgunitvoidservice(ServiceManager smanager)-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Constructor Detail
-
RootOrgUnitProvider
public RootOrgUnitProvider()
-
-
Method Detail
-
service
public void service(ServiceManager smanager) throws ServiceException
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
isRoot
public boolean isRoot(String id)
Determines the given id is the root orgunit id- Parameters:
id- the id to test- Returns:
- true if is root
-
isRoot
public boolean isRoot(OrgUnit orgUnit)
Determines the given orgunit is the root orgunit- Parameters:
orgUnit- the orgunit to test- Returns:
- true if is root
-
getChildOrgUnitIds
public Set<String> getChildOrgUnitIds(String orgUnitId, boolean recursive)
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.
-
-