@PermitAll public class OrgStructureFunctionsImpl extends Object implements OrgStructureFunctions
| Modifier and Type | Field and Description |
|---|---|
static String |
PERSON_NOT_FOUND_ERROR
Error code for person not found
|
| Constructor and Description |
|---|
OrgStructureFunctionsImpl()
Creates new instance.
|
OrgStructureFunctionsImpl(PersonServiceLocal personService,
OrgTypeFactory orgTypeFactory,
SecurityManagerServiceLocal securityManagerService)
Creates new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addPersonToRole(ExecutionContext context,
RecordHolder personRecord,
RecordHolder roleRecord)
Assign role to person.
|
AnyPerformerHolder |
anyPerformer(ExecutionContext context)
Returns a special performer representing any known process performer.
|
SetHolder |
children(ExecutionContext context,
RecordHolder roleUnitHolder)
Returns a
SetHolder of children of the roleUnitHolder. |
RecordHolder |
getCurrentPerson(ExecutionContext context)
Returns the person who has initiates the current model processing request.
|
RecordHolder |
getOrgUnit(ExecutionContext context,
String moduleName,
String localName,
MapHolder parameterMap)
Returns an organization unit given the module name and the organization unit name, or
null, if there is no such organization unit. |
RecordHolder |
getOrgUnitRecordHolder(ExecutionContext context,
String moduleName,
String localName,
Map<?,?> parameterMap)
Returns an organization unit given the module name and the organization unit name, or
null, if there is no such organization unit. |
String |
getPersonFullName(ExecutionContext context,
RecordHolder person)
Returns the full name of the specified person.
|
RecordHolder |
getPersonPicture(ExecutionContext context,
RecordHolder person)
Returns file with photo for the person.
|
MapHolder |
getPersonProperties(ExecutionContext context,
RecordHolder person)
Returns the additional properties of the specified person.
|
SetHolder |
getPersonRoles(ExecutionContext context,
RecordHolder person)
Returns a set of organization roles from the current model directly as signed to the
specified person.
|
RecordHolder |
getPersonWithId(ExecutionContext context,
String id)
Returns a person given the id of the process performer or ErrorExcetion, if there is
no such person.
|
RecordHolder |
getPersonWithLogin(ExecutionContext context,
String name)
Returns a person given the unique name of the process performer or ErrorExcetion, if there is
no such person.
|
RecordHolder |
getRole(ExecutionContext context,
String moduleName,
String localName,
MapHolder parameterMap)
Returns a role given the module name and the local role name, or
null, if there is no
such role. |
RecordHolder |
getRoleRecordHolder(ExecutionContext context,
String moduleName,
String localName,
Map<?,?> parameterMap)
Returns a role given the module name and the local role name, or
null, if there is no
such role. |
RoleUnitHolder |
getRoleUnitByName(ExecutionContext context,
String module,
String name)
|
RoleUnitHolder |
getRoleUnitByName(ExecutionContext context,
String module,
String name,
MapHolder parameters)
Returns a
RoleUnit or OrgUnit specified by module name , RoleUnitName
and parameters defined in the given module. |
boolean |
isPersonIn(ExecutionContext context,
RecordHolder personHolder,
RecordHolder roleUnitHolder)
Returns
true, if the given person belongs in the given organizational structure to
the given role or unit. |
boolean |
isPersonStrictlyIn(ExecutionContext context,
RecordHolder personHolder,
RecordHolder roleHolder)
Returns
true, if the given person belongs in the given organizational structure
strictly to the given role or unit, not to their sub-roles or sub-units. |
SetHolder |
personsStrictlyWith(ExecutionContext context,
RecordHolder roleHolder)
Returns a set of all persons that belong in the given organizational structure strictly to
the given role or unit, not to their sub-roles or sub-units.
|
SetHolder |
personsWith(ExecutionContext context,
RecordHolder roleUnitHolder)
Returns a set of all persons that belong in the given organizational structure to the given
role or unit.
|
void |
removePersonFromRole(ExecutionContext context,
RecordHolder personRecord,
RecordHolder roleRecord)
Remove person from role.
|
void |
setPersonPicture(ExecutionContext context,
RecordHolder person,
RecordHolder file)
Sets file with photo to the person.
|
public static final String PERSON_NOT_FOUND_ERROR
public OrgStructureFunctionsImpl()
public OrgStructureFunctionsImpl(PersonServiceLocal personService, OrgTypeFactory orgTypeFactory, SecurityManagerServiceLocal securityManagerService)
personService - orgTypeFactory - securityManagerService - NullPointerException - if any of the arguments is nullpublic SetHolder children(ExecutionContext context, RecordHolder roleUnitHolder) throws ErrorException
OrgStructureFunctionsSetHolder of children of the roleUnitHolder. In the case of parametric
RoleUnit the values of children's parameters are derived from the parameters of this
RoleUnit, i.e., the value of a child's parameter is given by the value of the
parent's parameter with their parent.children in interface OrgStructureFunctionscontext - the execution contextroleUnitHolder - The holder of RoleUnit of interest.SetHolder of children, wrapped in RecordHolder. If RoleUnit
of interest has no children, the empty SetHolder is returned.ErrorExceptionpublic boolean isPersonIn(ExecutionContext context, RecordHolder personHolder, RecordHolder roleUnitHolder) throws ErrorException
OrgStructureFunctionstrue, if the given person belongs in the given organizational structure to
the given role or unit. The person "belongs" to the given role or unit if it
belongs to it directly or belongs to a child (recursively evaluated) of the given role or
unit.isPersonIn in interface OrgStructureFunctionscontext - the execution contextpersonHolder - The holder representing a Person record.roleUnitHolder - The holder representing a RoleUnit record.true if the given person belongs in the given organizational structure to the
given role or unit, otherwise false.ErrorExceptionpublic boolean isPersonStrictlyIn(ExecutionContext context, RecordHolder personHolder, RecordHolder roleHolder) throws ErrorException
OrgStructureFunctionstrue, if the given person belongs in the given organizational structure
strictly to the given role or unit, not to their sub-roles or sub-units. Therefore, this is a
non-recursive version of the isPersonIn() function.isPersonStrictlyIn in interface OrgStructureFunctionscontext - the execution contextpersonHolder - The holder representing a Person record.roleHolder - The holder representing a RoleUnit record.true, if the given person belongs in the given organizational structure
strictly to the given role or unit, otherwise false.ErrorExceptionpublic SetHolder personsWith(ExecutionContext context, RecordHolder roleUnitHolder) throws ErrorException
OrgStructureFunctionspersonsWith in interface OrgStructureFunctionscontext - the execution contextroleUnitHolder - The holder representing a RoleUnit record.ErrorExceptionpublic SetHolder personsStrictlyWith(ExecutionContext context, RecordHolder roleHolder) throws ErrorException
OrgStructureFunctionsOrgStructureFunctions.personsWith(com.whitestein.lsps.engine.lang.ExecutionContext, com.whitestein.lsps.lang.exec.RecordHolder) function (method).personsStrictlyWith in interface OrgStructureFunctionscontext - the execution contextroleHolder - The holder representing a RoleUnit record.ErrorExceptionpublic RecordHolder getPersonWithId(ExecutionContext context, String id) throws ErrorException
OrgStructureFunctionsgetPersonWithId in interface OrgStructureFunctionscontext - the execution contextid - The id of the person to look for.ErrorExceptionpublic RecordHolder getPersonWithLogin(ExecutionContext context, String name) throws ErrorException
OrgStructureFunctionsgetPersonWithLogin in interface OrgStructureFunctionscontext - the execution contextname - The unique name of the person to look for.ErrorExceptionpublic RecordHolder getPersonPicture(ExecutionContext context, RecordHolder person) throws ErrorException
OrgStructureFunctionsgetPersonPicture in interface OrgStructureFunctionsErrorExceptionpublic void setPersonPicture(ExecutionContext context, RecordHolder person, RecordHolder file) throws ErrorException
OrgStructureFunctionssetPersonPicture in interface OrgStructureFunctionsErrorExceptionpublic RecordHolder getCurrentPerson(ExecutionContext context) throws ErrorException
OrgStructureFunctionsgetCurrentPerson in interface OrgStructureFunctionsErrorExceptionpublic RecordHolder getOrgUnit(ExecutionContext context, String moduleName, String localName, MapHolder parameterMap) throws ErrorException
OrgStructureFunctionsnull, if there is no such organization unit.getOrgUnit in interface OrgStructureFunctionscontext - the execution contextmoduleName - the module namelocalName - the local nameparameterMap - the parameter mapnull, if there is no such organization unitErrorExceptionpublic RecordHolder getOrgUnitRecordHolder(ExecutionContext context, String moduleName, String localName, Map<?,?> parameterMap) throws ErrorException
OrgStructureFunctionsnull, if there is no such organization unit.getOrgUnitRecordHolder in interface OrgStructureFunctionscontext - the execution contextmoduleName - the module namelocalName - the local nameparameterMap - the parameter mapnull, if there is no such organization unitErrorExceptionpublic RecordHolder getRole(ExecutionContext context, String moduleName, String localName, MapHolder parameterMap) throws ErrorException
OrgStructureFunctionsnull, if there is no
such role.getRole in interface OrgStructureFunctionscontext - the execution contextmoduleName - the module namelocalName - the local nameparameterMap - the parameter mapnull, if there is no
such roleErrorExceptionpublic RecordHolder getRoleRecordHolder(ExecutionContext context, String moduleName, String localName, Map<?,?> parameterMap) throws ErrorException
OrgStructureFunctionsnull, if there is no
such role.getRoleRecordHolder in interface OrgStructureFunctionscontext - the execution contextmoduleName - the module namelocalName - the local nameparameterMap - the parameter mapnull, if there is no
such roleErrorExceptionpublic RoleUnitHolder getRoleUnitByName(ExecutionContext context, String module, String name) throws ErrorException
OrgStructureFunctionsgetRoleUnitByName in interface OrgStructureFunctionscontext - the execution contextmodule - the module namename - the role-unit nameRoleUnit or OrgUnitErrorExceptionpublic RoleUnitHolder getRoleUnitByName(ExecutionContext context, String module, String name, MapHolder parameters) throws ErrorException
OrgStructureFunctionsRoleUnit or OrgUnit specified by module name , RoleUnitName
and parameters defined in the given module.getRoleUnitByName in interface OrgStructureFunctionscontext - the execution contextmodule - the module namename - the role-unit nameparameters - the parameters mapRoleUnit or OrgUnitErrorExceptionpublic AnyPerformerHolder anyPerformer(ExecutionContext context) throws ErrorException
OrgStructureFunctionsanyPerformer in interface OrgStructureFunctionsErrorExceptionpublic String getPersonFullName(ExecutionContext context, RecordHolder person) throws ErrorException
OrgStructureFunctionsgetPersonFullName in interface OrgStructureFunctionsErrorExceptionpublic MapHolder getPersonProperties(ExecutionContext context, RecordHolder person) throws ErrorException
OrgStructureFunctionsgetPersonProperties in interface OrgStructureFunctionsErrorExceptionpublic SetHolder getPersonRoles(ExecutionContext context, RecordHolder person) throws ErrorException
OrgStructureFunctionsgetPersonRoles in interface OrgStructureFunctionsErrorExceptionpublic void addPersonToRole(ExecutionContext context, RecordHolder personRecord, RecordHolder roleRecord) throws ErrorException
OrgStructureFunctionsaddPersonToRole in interface OrgStructureFunctionsErrorExceptionpublic void removePersonFromRole(ExecutionContext context, RecordHolder personRecord, RecordHolder roleRecord) throws ErrorException
OrgStructureFunctionsremovePersonFromRole in interface OrgStructureFunctionsErrorExceptionCopyright © 2007-2020 Whitestein Technologies. All Rights Reserved.