Class RootOrgUnitProvider

All Implemented Interfaces:
LogEnabled, Component, Serviceable

Component to provide the root OrgUnit
  • Field Details

    • ROLE

      public static final String ROLE
      Avalon role.
  • Constructor Details

  • Method Details

    • service

      public void service(ServiceManager smanager) throws ServiceException
      Specified by:
      service in interface Serviceable
      Throws:
      ServiceException
    • getRoot

      public OrgUnit getRoot()
      Returns the root OrgUnit.
      Returns:
      the root OrgUnit.
    • getRootId

      public String getRootId()
      Get the root id
      Returns:
      the root id
    • 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 orgunit
      recursive - true to children recursively
      Returns:
      A set containing all the child orgunit identifiers.