public interface OrgStructureFunctions
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.
|
SetHolder children(ExecutionContext context, RecordHolder roleUnitHolder) throws ErrorException
SetHolder
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.context
- 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.ErrorException
boolean isPersonIn(ExecutionContext context, RecordHolder personHolder, RecordHolder roleUnitHolder) throws ErrorException
true
, 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.context
- 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
.ErrorException
boolean isPersonStrictlyIn(ExecutionContext context, RecordHolder personHolder, RecordHolder roleHolder) throws ErrorException
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. Therefore, this is a
non-recursive version of the isPersonIn() function.context
- 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
.ErrorException
SetHolder personsWith(ExecutionContext context, RecordHolder roleUnitHolder) throws ErrorException
context
- the execution contextroleUnitHolder
- The holder representing a RoleUnit record.ErrorException
SetHolder personsStrictlyWith(ExecutionContext context, RecordHolder roleHolder) throws ErrorException
personsWith(com.whitestein.lsps.engine.lang.ExecutionContext, com.whitestein.lsps.lang.exec.RecordHolder)
function (method).context
- the execution contextroleHolder
- The holder representing a RoleUnit record.ErrorException
RecordHolder getPersonWithId(ExecutionContext context, String id) throws ErrorException
context
- the execution contextid
- The id of the person to look for.ErrorException
RecordHolder getPersonWithLogin(ExecutionContext context, String name) throws ErrorException
context
- the execution contextname
- The unique name of the person to look for.ErrorException
RecordHolder getCurrentPerson(ExecutionContext context) throws ErrorException
context
- ErrorException
RecordHolder getOrgUnit(ExecutionContext context, String moduleName, String localName, MapHolder parameterMap) throws ErrorException
null
, if there is no such organization unit.context
- the execution contextmoduleName
- the module namelocalName
- the local nameparameterMap
- the parameter mapnull
, if there is no such organization unitErrorException
RecordHolder getOrgUnitRecordHolder(ExecutionContext context, String moduleName, String localName, Map<?,?> parameterMap) throws ErrorException
null
, if there is no such organization unit.context
- the execution contextmoduleName
- the module namelocalName
- the local nameparameterMap
- the parameter mapnull
, if there is no such organization unitErrorException
RecordHolder getRole(ExecutionContext context, String moduleName, String localName, MapHolder parameterMap) throws ErrorException
null
, if there is no
such role.context
- the execution contextmoduleName
- the module namelocalName
- the local nameparameterMap
- the parameter mapnull
, if there is no
such roleErrorException
NullPointerException
- if moduleName
or localName
or parameterMap
is nullIllegalArgumentException
- if parameterMap
does not contain only stringsRecordHolder getRoleRecordHolder(ExecutionContext context, String moduleName, String localName, Map<?,?> parameterMap) throws ErrorException
null
, if there is no
such role.context
- the execution contextmoduleName
- the module namelocalName
- the local nameparameterMap
- the parameter mapnull
, if there is no
such roleErrorException
NullPointerException
- if moduleName
or localName
or parameterMap
is nullIllegalArgumentException
- if parameterMap
does not contain only stringsRoleUnitHolder getRoleUnitByName(ExecutionContext context, String module, String name) throws ErrorException
context
- the execution contextmodule
- the module namename
- the role-unit nameRoleUnit
or OrgUnit
ErrorException
RoleUnitHolder getRoleUnitByName(ExecutionContext context, String module, String name, MapHolder parameters) throws ErrorException
RoleUnit
or OrgUnit
specified by module name , RoleUnitName
and parameters defined in the given module.context
- the execution contextmodule
- the module namename
- the role-unit nameparameters
- the parameters mapRoleUnit
or OrgUnit
ErrorException
AnyPerformerHolder anyPerformer(ExecutionContext context) throws ErrorException
context
- ErrorException
String getPersonFullName(ExecutionContext context, RecordHolder person) throws ErrorException
context
- person
- ErrorException
MapHolder getPersonProperties(ExecutionContext context, RecordHolder person) throws ErrorException
context
- person
- ErrorException
SetHolder getPersonRoles(ExecutionContext context, RecordHolder person) throws ErrorException
context
- person
- ErrorException
RecordHolder getPersonPicture(ExecutionContext context, RecordHolder person) throws ErrorException
context
- person
- ErrorException
void setPersonPicture(ExecutionContext context, RecordHolder person, RecordHolder file) throws ErrorException
context
- person
- file
- ErrorException
void addPersonToRole(ExecutionContext context, RecordHolder personRecord, RecordHolder roleRecord) throws ErrorException
context
- personRecord
- roleRecord
- ErrorException
void removePersonFromRole(ExecutionContext context, RecordHolder personRecord, RecordHolder roleRecord) throws ErrorException
context
- personRecord
- roleRecord
- ErrorException
Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.