Class AppointmentHandler
java.lang.Object
org.odpi.openmetadata.accessservices.governanceprogram.handlers.AppointmentHandler
AppointmentHandler is responsible for managing the relationship between a person role and a
profile. It typically returns the combination of the relationship and the profile bean.
Specifically it supports the return of GovernanceAppointee in GovernanceRoleAppointee and
GovernanceRoleHistory.
-
Constructor Summary
ConstructorDescriptionAppointmentHandler
(PersonRoleHandler<GovernanceRoleElement> roleHandler, ActorProfileHandler<ProfileElement> profileHandler, OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName, AuditLog auditLog) Create an AppointmentHandler. -
Method Summary
Modifier and TypeMethodDescriptiongetCurrentGovernanceRoleAppointments
(String userId, int domainIdentifier, int startFrom, int pageSize, String methodName) Return all the governance roles and their incumbents (if any).getGovernanceRoleHistoryByGUID
(String userId, String governanceRoleGUID, String methodName) Retrieve a governance role description by unique guid along with the history of who has been appointed to the role.
-
Constructor Details
-
AppointmentHandler
public AppointmentHandler(PersonRoleHandler<GovernanceRoleElement> roleHandler, ActorProfileHandler<ProfileElement> profileHandler, OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName, AuditLog auditLog) Create an AppointmentHandler.- Parameters:
roleHandler
- handler for person rolesprofileHandler
- handler for actor profilesrepositoryHelper
- helperserviceName
- this serviceserverName
- controlling server nameauditLog
- logging destination
-
-
Method Details
-
getCurrentGovernanceRoleAppointments
public List<GovernanceRoleAppointee> getCurrentGovernanceRoleAppointments(String userId, int domainIdentifier, int startFrom, int pageSize, String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Return all the governance roles and their incumbents (if any).- Parameters:
userId
- the name of the calling userdomainIdentifier
- identifier of domain - 0 means allstartFrom
- where to start from in the list of definitionspageSize
- max number of results to return in one callmethodName
- calling method- Returns:
- list of governance role objects
- Throws:
InvalidParameterException
- the userId is either null or invalid.PropertyServerException
- the server is not available.UserNotAuthorizedException
- the calling user is not authorized to issue the call.
-
getGovernanceRoleHistoryByGUID
public GovernanceRoleHistory getGovernanceRoleHistoryByGUID(String userId, String governanceRoleGUID, String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Retrieve a governance role description by unique guid along with the history of who has been appointed to the role.- Parameters:
userId
- the name of the calling user.governanceRoleGUID
- unique identifier (guid) of the governance rolemethodName
- calling method- Returns:
- governance role object
- Throws:
InvalidParameterException
- the unique identifier of the governance role is either null or invalid.PropertyServerException
- the server is not available.UserNotAuthorizedException
- the calling user is not authorized to issue the call.
-