public abstract class AbstractRolesResolver extends java.lang.Object implements ParametricRolesResolver
The algorithm of the resolve(RoleUnit, Collection) template
method does the following steps:
doResolve(com.whitestein.lsps.orgstructure.model.RoleUnit, java.util.Collection<com.whitestein.lsps.os.dto.RoleUnitParameter>) method
addRole(com.whitestein.lsps.orgstructure.model.Role, java.util.Collection<com.whitestein.lsps.os.dto.RoleUnitParameter>)
method can be called...| Constructor and Description |
|---|
AbstractRolesResolver() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addRole(Role role,
java.util.Collection<RoleUnitParameter> parameters)
Adds given role into the set of resolved roles.
|
protected abstract void |
doResolve(RoleUnit roleUnit,
java.util.Collection<RoleUnitParameter> parameters)
Runs actual roles resolving algorithm applied to given
roleUnit. |
java.util.Set<RoleUnitName> |
resolve(RoleUnit roleUnit)
Runs a resolving algorithm and returns a set of names of roles that were
resolved from given
roleUnit. |
java.util.Set<RoleUnitName> |
resolve(RoleUnit roleUnit,
java.util.Collection<RoleUnitParameter> parameters)
Runs a resolving algorithm and returns a set of names of roles that were
resolved from given
roleUnit. |
public final java.util.Set<RoleUnitName> resolve(RoleUnit roleUnit)
RolesResolverroleUnit.resolve in interface RolesResolverroleUnit - The role or the organization unit to resolve.roleUnit.public final java.util.Set<RoleUnitName> resolve(RoleUnit roleUnit, java.util.Collection<RoleUnitParameter> parameters)
ParametricRolesResolverroleUnit.resolve in interface ParametricRolesResolverroleUnit - The role or the organization unit to resolve.parameters - The set of parameters to bind to each role or organization
unit that is visited during resolution process.roleUnit.protected final void addRole(Role role, java.util.Collection<RoleUnitParameter> parameters)
It is best to call this method from within the overridden
doResolve(RoleUnit, Collection) method body.
role - The role to add into the set.parameters - The set of parameters to bind to each role or organization
unit that is visited during resolution process.java.lang.NullPointerException - (unchecked)
If role is null.java.lang.IllegalStateException - (unchecked)
If the internal set of roles is not initialized, probably
because of calling this method from outside of the
doResolve(RoleUnit, Collection) method.protected abstract void doResolve(RoleUnit roleUnit, java.util.Collection<RoleUnitParameter> parameters)
roleUnit.roleUnit - The role or organization unit to resolve.parameters - The set of parameters to bind to each role or organization
unit that is visited during resolution process.Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.