org.ow2.bonita.connector.core
Class RoleResolver
java.lang.Object
org.ow2.bonita.connector.core.Connector
org.ow2.bonita.connector.core.ProcessConnector
org.ow2.bonita.connector.core.Mapper
org.ow2.bonita.connector.core.RoleResolver
- All Implemented Interfaces:
- RoleMapper, TxHook
public abstract class RoleResolver
- extends Mapper
- implements RoleMapper
A Role Resolver searches and returns the possible members which can execute a task
- Author:
- Matthieu Chaffotte
| Methods inherited from class org.ow2.bonita.connector.core.Connector |
bonitaListToArrayMap, bonitaListToMap, checkGraphicalAnnotations, checkRuntimeAnnotations, containsErrors, execute, execute, fieldExists, getField, getFieldName, getGetterName, getGetterReturnType, getGetters, getMethod, getSetters, isFieldExist, validate, validateConnector |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RoleResolver
public RoleResolver()
getRoleId
public java.lang.String getRoleId()
setRoleId
public void setRoleId(java.lang.String roleId)
validateValues
protected java.util.List<ConnectorError> validateValues()
- Description copied from class:
Connector
- Checks if field values are well-set.
- Overrides:
validateValues in class Mapper
- Returns:
- a list containing
ConnectorError;
an empty list otherwise
getMembersSet
protected abstract java.util.Set<java.lang.String> getMembersSet(java.lang.String roleId)
throws java.lang.Exception
- Throws:
java.lang.Exception
executeConnector
protected final void executeConnector()
throws java.lang.Exception
- Description copied from class:
Connector
- Execute the specific content of the
Connector.
- Specified by:
executeConnector in class Connector
- Throws:
java.lang.Exception - if an exception occurs
searchMembers
public final java.util.Set<java.lang.String> searchMembers(QueryAPIAccessor accessor,
ProcessInstanceUUID instanceUUID,
java.lang.String roleId)
throws java.lang.Exception
- Description copied from interface:
RoleMapper
- This method of the interface is intended to return an unsorted set of users that
match the specified role.
good practice is to call an identity module (ie. user data base, Ldap server).
Returned users become the candidates to execute the task.
- Specified by:
searchMembers in interface RoleMapper
- Parameters:
accessor - The QueryAPIAccessor interface to access: QueryRuntimeAPI or QueryDefinitionAPI.instanceUUID - Id of the instance.roleId - Value of Id attribute of the Participant element (with role type) defined into the xpdl definition.
- Returns:
- The set of unordered list of user Id that match the role in the user base.
- Throws:
java.lang.Exception - If an Exception has occurred.
Copyright © 2010 BonitaSoft. All Rights Reserved.