use of eu.bcvsolutions.idm.core.api.domain.Contextable in project CzechIdMng by bcvsolutions.
the class AbstractProvisioningExecutor method getRoleRequestIdFromContext.
/**
* Return ID of role-request from DTO's context. If context or value missing,
* then return null.
*
* @param dto
* @return
*/
private UUID getRoleRequestIdFromContext(AbstractDto dto) {
if (dto instanceof Contextable) {
Contextable contextable = (Contextable) dto;
Map<String, Object> context = contextable.getContext();
if (context != null && context.containsKey(IdmRoleRequestService.ROLE_REQUEST_ID_KEY)) {
Object value = context.get(IdmRoleRequestService.ROLE_REQUEST_ID_KEY);
if (value instanceof UUID) {
return (UUID) value;
}
}
}
return null;
}
Aggregations