Interface OrgUnitService
-
- All Known Implementing Classes:
DefaultOrgUnitService
public interface OrgUnitServiceService interface for organizational unit related operations.- Since:
- 6.1
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidactivateUnit(OrgUnitModel orgUnit)Activate the organizational unit with the given orgUnit.voidaddMembers(OrgUnitMemberParameter parameter)Add one or more members to a organizational unit.voidcreateUnit(OrgUnitParameter parameter)Create a new organizational unit.voiddeactivateUnit(OrgUnitModel orgUnit)Deactivate the organizational unit and all of its child units with the given orgUnit.<T extends PrincipalModel>
SearchPageData<T>getMembers(OrgUnitMemberParameter<T> parameter)Get a paged search result for members of the given organizational unit.java.util.Optional<OrgUnitModel>getParent(OrgUnitModel orgUnit)Gets the parent unit of a unit.java.util.Set<PrincipalGroupModel>getRolesForEmployee(EmployeeModel employee)Get a list of user roles that the given employee belongs tojava.util.Optional<OrgUnitModel>getUnitForUid(java.lang.String uid)Get the organizational unit with the given uid.voidremoveMembers(OrgUnitMemberParameter parameter)Remove one or more members from a organizational unit.voidupdateUnit(OrgUnitParameter parameter)Update an existing organizational unit.
-
-
-
Method Detail
-
createUnit
void createUnit(OrgUnitParameter parameter)
Create a new organizational unit.- Parameters:
parameter- ExtensibleOrgUnitParameterbean containing the initial attributes of the organizational unit to be created. Mandatory values:
-
updateUnit
void updateUnit(OrgUnitParameter parameter)
Update an existing organizational unit.- Parameters:
parameter- ExtensibleOrgUnitParameterbean containing the initial attributes of the organizational unit to be updated. Mandatory values:
-
getUnitForUid
java.util.Optional<OrgUnitModel> getUnitForUid(java.lang.String uid)
Get the organizational unit with the given uid.- Parameters:
uid- the uid of the organizational unit- Returns:
- An
Optionalwhich- contains the
OrgUnitModelfor the given uid if it exists and - is empty otherwise.
- contains the
-
activateUnit
void activateUnit(OrgUnitModel orgUnit)
Activate the organizational unit with the given orgUnit.- Parameters:
orgUnit- the organizational unit
-
deactivateUnit
void deactivateUnit(OrgUnitModel orgUnit)
Deactivate the organizational unit and all of its child units with the given orgUnit.- Parameters:
orgUnit- the organizational unit
-
addMembers
void addMembers(OrgUnitMemberParameter parameter)
Add one or more members to a organizational unit.- Parameters:
parameter- ExtensibleOrgUnitMemberParameterbean holding the method parameters. Mandatory values:
-
removeMembers
void removeMembers(OrgUnitMemberParameter parameter)
Remove one or more members from a organizational unit.- Parameters:
parameter- ExtensibleOrgUnitMemberParameterbean holding the method parameters. Mandatory values:
-
getMembers
<T extends PrincipalModel> SearchPageData<T> getMembers(OrgUnitMemberParameter<T> parameter)
Get a paged search result for members of the given organizational unit.- Parameters:
parameter- ExtensibleOrgUnitMemberParameterbean holding the method parameters. Mandatory values:- Returns:
SearchPageDatacontaining the paged search result for members of the given organizational unit
-
getParent
java.util.Optional<OrgUnitModel> getParent(OrgUnitModel orgUnit)
Gets the parent unit of a unit.- Parameters:
orgUnit- the organizational unit- Returns:
- An
Optionalwhich- contains the parent
OrgUnitModelfor the given unit's uid if it exists and - is empty if
unitwas the root unit.
- contains the parent
-
getRolesForEmployee
java.util.Set<PrincipalGroupModel> getRolesForEmployee(EmployeeModel employee)
Get a list of user roles that the given employee belongs to- Parameters:
employee- the employee model to search its belonging user roles- Returns:
- a list of user group which represents user role
-
-