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 orgunitOrgUnit
getRoot()
Returns the rootOrgUnit
.String
getRootId()
Get the root idboolean
isRoot(String id)
Determines the given id is the root orgunit idboolean
isRoot(OrgUnit orgUnit)
Determines the given orgunit is the root orgunitvoid
service(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:
service
in 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.
-
-