public class Role extends RoleUnit
Constructor and Description |
---|
Role(OrgStructModule module,
Map<String,String> metadata,
String name,
String... parameterNames)
Creates new
Role instance with given name. |
Modifier and Type | Method and Description |
---|---|
Role |
addChild(RoleUnit roleUnit)
Adds given
roleUnit into the children of this role and returns
current Role instance. |
Role |
addParent(RoleUnit roleUnit)
Adds given
roleUnit into the parents of this role and returns
current Role instance. |
RoleUnitName |
getNameWithBoundParameters(Collection<RoleUnitParameter> parameters)
Returns the
full name of this role with given
parameters bound to the parameter names of this role. |
equals, getChildren, getFullName, getMetadata, getModule, getParameterNames, getParents, hashCode, toString
public Role(OrgStructModule module, Map<String,String> metadata, String name, String... parameterNames)
Role
instance with given name.module
- The name of the module this role belongs to.metadata
- name
- The name of the role.parameterNames
- The names of parameters of the role or the organization unit.public RoleUnitName getNameWithBoundParameters(Collection<RoleUnitParameter> parameters)
full name
of this role with given
parameters bound to the parameter names of this role. Thus, returned role
name will contain only those parameters (name-value pairs), that have
been bound (linked) with the parameters given as an argument.parameters
- The set of parameters to bind to the parameter names of this
role.full name
of this role with given
parameters bound to the parameter names of this role.public Role addParent(RoleUnit roleUnit)
roleUnit
into the parents of this role and returns
current Role
instance.public Role addChild(RoleUnit roleUnit)
roleUnit
into the children of this role and returns
current Role
instance.addChild
in class RoleUnit
roleUnit
- The role to add into the children of this role.OrgUnit
instance.IllegalStateException
- (unchecked)
if roleUnit
is an instance of OrgUnit
.Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.