use of eu.bcvsolutions.idm.core.api.dto.DelegationTypeDto in project CzechIdMng by bcvsolutions.
the class DefaultDelegationManager method convertDelegationTypeToDto.
@Override
public DelegationTypeDto convertDelegationTypeToDto(DelegationType delegationType) {
DelegationTypeDto delegationTypeDto = new DelegationTypeDto();
delegationTypeDto.setId(delegationType.getId());
delegationTypeDto.setName(delegationType.getId());
if (delegationType.getOwnerType() != null) {
delegationTypeDto.setOwnerType(delegationType.getOwnerType().getCanonicalName());
}
delegationTypeDto.setModule(delegationType.getModule());
delegationTypeDto.setSupportsDelegatorContract(delegationType.isSupportsDelegatorContract());
delegationTypeDto.setCanBeCreatedManually(delegationType.canBeCreatedManually());
delegationTypeDto.setSendNotifications(delegationType.sendNotifications());
//
return delegationTypeDto;
}
use of eu.bcvsolutions.idm.core.api.dto.DelegationTypeDto in project CzechIdMng by bcvsolutions.
the class DefaultIdmDelegationDefinitionService method toDto.
@Override
protected IdmDelegationDefinitionDto toDto(IdmDelegationDefinition entity, IdmDelegationDefinitionDto dto, IdmDelegationDefinitionFilter filter) {
dto = super.toDto(entity, dto, filter);
if (dto != null && dto.getType() != null) {
// Add delegation type DTO to the delegation definition.
DelegationType delegateType = delegationManager.getDelegateType(dto.getType());
if (delegateType != null) {
DelegationTypeDto delegationTypeDto = delegationManager.convertDelegationTypeToDto(delegateType);
// I cannot use a key "type", because EnumSelect on FE try to use complex value from embedded.
dto.getEmbedded().put(DelegationManager.WORKFLOW_DELEGATION_TYPE_KEY, delegationTypeDto);
}
}
return dto;
}
Aggregations