Search in sources :

Example 16 with IdmRequestIdentityRoleDto

use of eu.bcvsolutions.idm.core.api.dto.IdmRequestIdentityRoleDto in project CzechIdMng by bcvsolutions.

the class DefaultIdmRequestIdentityRoleService method conceptToRequestIdentityRole.

/**
 * Converts concept to the request-identity-roles.
 *
 * @param concept
 * @param filter
 * @return
 */
@SuppressWarnings("unchecked")
private IdmRequestIdentityRoleDto conceptToRequestIdentityRole(IdmConceptRoleRequestDto concept, IdmRequestIdentityRoleFilter filter) {
    IdmRequestIdentityRoleDto requestIdentityRoleDto = modelMapper.map(concept, IdmRequestIdentityRoleDto.class);
    // load permission from related contract or role (OR)
    if (// from find method only
    filter != null && // newly requested role only
    ConceptRoleRequestOperation.ADD == concept.getOperation() && !concept.getState().isTerminatedState()) {
        // not terminated concepts
        // by related contract (backward compatible)
        IdmIdentityContractDto contract = lookupService.lookupEmbeddedDto(concept, IdmConceptRoleRequest_.identityContract);
        Set<String> contractPermissions = identityContractService.getPermissions(contract);
        if (PermissionUtils.hasPermission(contractPermissions, ContractBasePermission.CHANGEPERMISSION)) {
            Set<String> permissions = requestIdentityRoleDto.getPermissions();
            if (permissions == null) {
                permissions = new HashSet<>();
            }
            permissions.add(ContractBasePermission.CHANGEPERMISSION.getName());
            requestIdentityRoleDto.setPermissions(permissions);
        } else {
            // by related role
            IdmRoleDto role = lookupService.lookupEmbeddedDto(concept, IdmConceptRoleRequest_.role);
            Set<String> rolePermissions = roleService.getPermissions(role);
            if (PermissionUtils.hasPermission(rolePermissions, RoleBasePermission.CHANGEPERMISSION)) {
                Set<String> permissions = requestIdentityRoleDto.getPermissions();
                if (permissions == null) {
                    permissions = new HashSet<>();
                }
                permissions.add(RoleBasePermission.CHANGEPERMISSION.getName());
                requestIdentityRoleDto.setPermissions(permissions);
            }
        }
    }
    if (filter != null && filter.isIncludeEav()) {
        IdmFormInstanceDto formInstanceDto;
        if (ConceptRoleRequestOperation.REMOVE == concept.getOperation()) {
            IdmIdentityRoleDto identityRole = DtoUtils.getEmbedded(concept, IdmConceptRoleRequest_.identityRole, IdmIdentityRoleDto.class, (IdmIdentityRoleDto) null);
            if (identityRole == null) {
                // Identity-role was not found, remove concept was executed (identity-role was removed).
                return addCandidates(requestIdentityRoleDto, concept, filter);
            }
            formInstanceDto = identityRoleService.getRoleAttributeValues(identityRole);
        } else {
            // Check on change of values is made only on ended request! 'Original' value is current value and in audit it was confusing (only 'new' value is show now).
            formInstanceDto = conceptRoleService.getRoleAttributeValues(concept, !concept.getState().isTerminatedState());
        }
        addEav(requestIdentityRoleDto, formInstanceDto);
    }
    // Include info if is role in cross-domain group.
    if (filter != null && filter.isIncludeCrossDomainsSystemsCount()) {
        if (ConceptRoleRequestOperation.REMOVE != concept.getOperation()) {
            IdmRoleDto roleDto = DtoUtils.getEmbedded(concept, IdmConceptRoleRequest_.role.getName(), IdmRoleDto.class, null);
            if (roleDto != null && this.roleSystemService instanceof AbstractReadDtoService) {
                AbstractReadDtoService<?, ?, IdmRoleSystemFilter> roleSystemService = (AbstractReadDtoService<?, ?, IdmRoleSystemFilter>) this.roleSystemService;
                BaseFilter roleSystemFilter = roleSystemService.createFilterInstance();
                if (roleSystemFilter instanceof IdmRoleSystemFilter) {
                    IdmRoleSystemFilter idmRoleSystemFilter = (IdmRoleSystemFilter) roleSystemFilter;
                    idmRoleSystemFilter.setIsInCrossDomainGroupRoleId(roleDto.getId());
                    long count = roleSystemService.count(idmRoleSystemFilter);
                    roleDto.setSystemsInCrossDomains(count);
                }
            }
        }
    }
    return addCandidates(requestIdentityRoleDto, concept, filter);
}
Also used : IdmFormInstanceDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormInstanceDto) IdmRoleDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleDto) IdmRequestIdentityRoleDto(eu.bcvsolutions.idm.core.api.dto.IdmRequestIdentityRoleDto) IdmRoleSystemFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmRoleSystemFilter) BaseFilter(eu.bcvsolutions.idm.core.api.dto.filter.BaseFilter) AbstractReadDtoService(eu.bcvsolutions.idm.core.api.service.AbstractReadDtoService) IdmIdentityRoleDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityRoleDto) IdmIdentityContractDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityContractDto)

Example 17 with IdmRequestIdentityRoleDto

use of eu.bcvsolutions.idm.core.api.dto.IdmRequestIdentityRoleDto in project CzechIdMng by bcvsolutions.

the class DefaultIdmRequestIdentityRoleService method conceptsToRequestIdentityRoles.

/**
 * Converts concepts to request-identity-roles
 *
 * @param concepts
 * @param filter
 * @return
 */
private List<IdmRequestIdentityRoleDto> conceptsToRequestIdentityRoles(List<IdmConceptRoleRequestDto> concepts, IdmRequestIdentityRoleFilter filter) {
    List<IdmRequestIdentityRoleDto> results = Lists.newArrayList();
    if (concepts == null) {
        return results;
    }
    // Mark duplicates
    // TODO: Rewrite to query, this is very ineffective!!
    UUID identityId = filter.getIdentityId();
    LOG.debug(MessageFormat.format("Start searching duplicates for identity [{1}].", identityId));
    Assert.notNull(identityId, "Identity identifier is required.");
    List<IdmIdentityRoleDto> identityRoles = identityRoleService.findValidRoles(identityId, null).getContent();
    // Add to all identity roles form instance. For identity role can exists only
    // one form instance.
    identityRoles.forEach(identityRole -> {
        IdmFormInstanceDto formInstance = identityRoleService.getRoleAttributeValues(identityRole);
        if (formInstance != null) {
            identityRole.setEavs(Lists.newArrayList(formInstance));
        }
    });
    // Find potential duplicated concepts (only ADD and not in terminated state)
    List<IdmConceptRoleRequestDto> conceptsForMarkDuplicates = // 
    concepts.stream().filter(// 
    concept -> ConceptRoleRequestOperation.ADD == concept.getOperation()).filter(// 
    concept -> !concept.getState().isTerminatedState()).collect(// 
    Collectors.toList());
    roleRequestService.markDuplicates(conceptsForMarkDuplicates, identityRoles);
    // End mark duplicates
    LOG.debug(MessageFormat.format("End searching duplicates for identity [{1}].", identityId));
    concepts.forEach(concept -> {
        IdmRequestIdentityRoleDto requestIdentityRoleDto = conceptToRequestIdentityRole(concept, filter);
        results.add(requestIdentityRoleDto);
    });
    return results;
}
Also used : IdmFormInstanceDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormInstanceDto) IdmConceptRoleRequestService(eu.bcvsolutions.idm.core.api.service.IdmConceptRoleRequestService) DtoUtils(eu.bcvsolutions.idm.core.api.utils.DtoUtils) IdmRequestIdentityRoleDto(eu.bcvsolutions.idm.core.api.dto.IdmRequestIdentityRoleDto) IdmIdentityRoleDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityRoleDto) AbstractReadDtoService(eu.bcvsolutions.idm.core.api.service.AbstractReadDtoService) Autowired(org.springframework.beans.factory.annotation.Autowired) IdmRoleRequestService(eu.bcvsolutions.idm.core.api.service.IdmRoleRequestService) RoleBasePermission(eu.bcvsolutions.idm.core.security.api.domain.RoleBasePermission) IdmRequestIdentityRoleService(eu.bcvsolutions.idm.core.api.service.IdmRequestIdentityRoleService) IdmConceptRoleRequest_(eu.bcvsolutions.idm.core.model.entity.IdmConceptRoleRequest_) AbstractBaseDtoService(eu.bcvsolutions.idm.core.rest.AbstractBaseDtoService) BasePermission(eu.bcvsolutions.idm.core.security.api.domain.BasePermission) Pageable(org.springframework.data.domain.Pageable) IdmIdentityContractService(eu.bcvsolutions.idm.core.api.service.IdmIdentityContractService) IdmRoleRequestDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleRequestDto) Set(java.util.Set) PageRequest(org.springframework.data.domain.PageRequest) UUID(java.util.UUID) Page(org.springframework.data.domain.Page) Collectors(java.util.stream.Collectors) Sets(com.google.common.collect.Sets) List(java.util.List) ContractBasePermission(eu.bcvsolutions.idm.core.security.api.domain.ContractBasePermission) PermissionUtils(eu.bcvsolutions.idm.core.security.api.utils.PermissionUtils) LocalDate(java.time.LocalDate) PageImpl(org.springframework.data.domain.PageImpl) IdmIdentityRole_(eu.bcvsolutions.idm.core.model.entity.IdmIdentityRole_) RoleRequestedByType(eu.bcvsolutions.idm.core.api.domain.RoleRequestedByType) IdmRoleSystemService(eu.bcvsolutions.idm.core.api.service.IdmRoleSystemService) MessageFormat(java.text.MessageFormat) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) ModelMapper(org.modelmapper.ModelMapper) Lists(com.google.common.collect.Lists) LookupService(eu.bcvsolutions.idm.core.api.service.LookupService) Service(org.springframework.stereotype.Service) IdmConceptRoleRequestDto(eu.bcvsolutions.idm.core.api.dto.IdmConceptRoleRequestDto) WorkflowProcessInstanceService(eu.bcvsolutions.idm.core.workflow.service.WorkflowProcessInstanceService) IdmFormInstanceDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormInstanceDto) IdmIdentityContractDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityContractDto) IdmIdentityRoleService(eu.bcvsolutions.idm.core.api.service.IdmIdentityRoleService) IdmIdentityRoleFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmIdentityRoleFilter) IdmRoleService(eu.bcvsolutions.idm.core.api.service.IdmRoleService) IdmRoleSystemFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmRoleSystemFilter) BaseFilter(eu.bcvsolutions.idm.core.api.dto.filter.BaseFilter) IdmRoleDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleDto) IdmRequestIdentityRoleFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmRequestIdentityRoleFilter) ConceptRoleRequestOperation(eu.bcvsolutions.idm.core.api.domain.ConceptRoleRequestOperation) IdmConceptRoleRequestFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmConceptRoleRequestFilter) Transactional(org.springframework.transaction.annotation.Transactional) Assert(org.springframework.util.Assert) InvalidFormAttributeDto(eu.bcvsolutions.idm.core.eav.api.dto.InvalidFormAttributeDto) IdmRequestIdentityRoleDto(eu.bcvsolutions.idm.core.api.dto.IdmRequestIdentityRoleDto) IdmConceptRoleRequestDto(eu.bcvsolutions.idm.core.api.dto.IdmConceptRoleRequestDto) UUID(java.util.UUID) IdmIdentityRoleDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityRoleDto)

Example 18 with IdmRequestIdentityRoleDto

use of eu.bcvsolutions.idm.core.api.dto.IdmRequestIdentityRoleDto in project CzechIdMng by bcvsolutions.

the class DefaultIdmRequestIdentityRoleService method identityRolesToRequestIdentityRoles.

/**
 * Converts identity-roles to request-identity-roles
 *
 * @param identityRoles
 * @param filter
 * @return
 */
private List<IdmRequestIdentityRoleDto> identityRolesToRequestIdentityRoles(List<IdmIdentityRoleDto> identityRoles, IdmRequestIdentityRoleFilter filter) {
    List<IdmRequestIdentityRoleDto> concepts = Lists.newArrayList();
    if (identityRoles == null) {
        return concepts;
    }
    identityRoles.forEach(identityRole -> {
        IdmRequestIdentityRoleDto request = new IdmRequestIdentityRoleDto();
        request.setId(identityRole.getId());
        request.setRole(identityRole.getRole());
        request.setIdentityRole(identityRole.getId());
        request.setDirectRole(identityRole.getDirectRole());
        request.setRoleSystem(identityRole.getRoleSystem());
        request.setRoleComposition(identityRole.getRoleComposition());
        request.setIdentityContract(identityRole.getIdentityContract());
        request.setValidFrom(identityRole.getValidFrom());
        request.setValidTill(identityRole.getValidTill());
        request.setAutomaticRole(identityRole.getAutomaticRole());
        request.setTrimmed(true);
        request.getEmbedded().put(IdmIdentityRole_.role.getName(), identityRole.getEmbedded().get(IdmIdentityRole_.role.getName()));
        request.getEmbedded().put(IdmIdentityRole_.identityContract.getName(), identityRole.getEmbedded().get(IdmIdentityRole_.identityContract.getName()));
        request.setPermissions(identityRole.getPermissions());
        if (filter.isIncludeEav()) {
            IdmFormInstanceDto formInstanceDto = identityRoleService.getRoleAttributeValues(identityRole);
            addEav(request, formInstanceDto);
        }
        concepts.add(request);
    });
    return concepts;
}
Also used : IdmFormInstanceDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormInstanceDto) IdmRequestIdentityRoleDto(eu.bcvsolutions.idm.core.api.dto.IdmRequestIdentityRoleDto)

Example 19 with IdmRequestIdentityRoleDto

use of eu.bcvsolutions.idm.core.api.dto.IdmRequestIdentityRoleDto in project CzechIdMng by bcvsolutions.

the class IdmRequestIdentityRoleServiceIntegrationTest method testFindByRoleText.

@Test
@Transactional
public void testFindByRoleText() {
    IdmIdentityDto identity = this.getHelper().createIdentity(new GuardedString());
    IdmIdentityContractDto contract = this.getHelper().getPrimeContract(identity);
    IdmRoleDto assignedRole = this.getHelper().createRole();
    IdmIdentityRoleDto identityRole = this.getHelper().createIdentityRole(contract, assignedRole);
    IdmRoleDto role = this.getHelper().createRole();
    IdmRequestIdentityRoleFilter filter = new IdmRequestIdentityRoleFilter();
    filter.setIdentityId(identity.getId());
    filter.setRoleText(assignedRole.getCode());
    // We expecting only one already assigned identity-role
    List<IdmRequestIdentityRoleDto> requestIdentityRoles = requestIdentityRoleService.find(filter, null).getContent();
    Assert.assertEquals(1, requestIdentityRoles.size());
    Assert.assertEquals(identityRole.getId(), requestIdentityRoles.get(0).getId());
    // Create request for new identity-role
    IdmRequestIdentityRoleDto dto = new IdmRequestIdentityRoleDto();
    dto.setIdentityContract(contract.getId());
    dto.setRole(role.getId());
    dto.setValidFrom(LocalDate.now().minusDays(1));
    dto.setValidTill(LocalDate.now().plusDays(10));
    IdmRequestIdentityRoleDto createdRequestIdentityRole = requestIdentityRoleService.save(dto);
    Assert.assertNotNull(createdRequestIdentityRole);
    // Request must been created
    Assert.assertNotNull(createdRequestIdentityRole.getRoleRequest());
    // Filter will be filtering by this request
    filter.setRoleRequestId(createdRequestIdentityRole.getRoleRequest());
    // We expecting one item
    requestIdentityRoles = requestIdentityRoleService.find(filter, null).getContent();
    Assert.assertEquals(1, requestIdentityRoles.size());
}
Also used : IdmRoleDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleDto) IdmRequestIdentityRoleFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmRequestIdentityRoleFilter) IdmRequestIdentityRoleDto(eu.bcvsolutions.idm.core.api.dto.IdmRequestIdentityRoleDto) GuardedString(eu.bcvsolutions.idm.core.security.api.domain.GuardedString) IdmIdentityDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto) IdmIdentityRoleDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityRoleDto) IdmIdentityContractDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityContractDto) AbstractIntegrationTest(eu.bcvsolutions.idm.test.api.AbstractIntegrationTest) Test(org.junit.Test) Transactional(org.springframework.transaction.annotation.Transactional)

Example 20 with IdmRequestIdentityRoleDto

use of eu.bcvsolutions.idm.core.api.dto.IdmRequestIdentityRoleDto in project CzechIdMng by bcvsolutions.

the class IdmRequestIdentityRoleServiceIntegrationTest method testUniqueConceptValidation.

@Test(expected = InvalidFormException.class)
public void testUniqueConceptValidation() {
    // Create role with attribute (include the sub-definition)
    IdmRoleDto role = createRoleWithAttributes(true);
    IdmRoleFormAttributeFilter filter = new IdmRoleFormAttributeFilter();
    filter.setRole(role.getId());
    List<IdmRoleFormAttributeDto> list = roleFormAttributeService.find(filter, null).getContent();
    Assert.assertEquals(2, list.size());
    IdmFormDefinitionDto formAttributeSubdefinition = roleService.getFormAttributeSubdefinition(role);
    Assert.assertEquals(2, formAttributeSubdefinition.getFormAttributes().size());
    // Delete IP attribute from the sub-definition
    list.stream().filter(roleFormAttributeDto -> {
        IdmFormAttributeDto formAttributeDto = DtoUtils.getEmbedded(roleFormAttributeDto, IdmRoleFormAttribute_.formAttribute.getName(), IdmFormAttributeDto.class);
        return formAttributeDto.getCode().equals(IP);
    }).forEach(roleFormAttributeDto -> roleFormAttributeService.delete(roleFormAttributeDto));
    formAttributeSubdefinition = roleService.getFormAttributeSubdefinition(role);
    Assert.assertEquals(1, formAttributeSubdefinition.getFormAttributes().size());
    Assert.assertEquals(NUMBER_OF_FINGERS, formAttributeSubdefinition.getFormAttributes().get(0).getCode());
    IdmIdentityDto identity = getHelper().createIdentity();
    IdmIdentityContractDto contract = getHelper().getPrimeContract(identity);
    IdmIdentityRoleFilter identityRoleFilter = new IdmIdentityRoleFilter();
    identityRoleFilter.setIdentityContractId(contract.getId());
    List<IdmIdentityRoleDto> identityRoles = identityRoleService.find(identityRoleFilter, null).getContent();
    assertEquals(0, identityRoles.size());
    // Create request identity-role
    IdmRequestIdentityRoleDto createdRequestIdentityRole = new IdmRequestIdentityRoleDto();
    createdRequestIdentityRole.setIdentityContract(contract.getId());
    // Change the valid from
    createdRequestIdentityRole.setValidFrom(LocalDate.now());
    createdRequestIdentityRole.setRole(role.getId());
    // Create role attribute value in concept
    IdmFormDefinitionDto formDefinitionDto = roleService.getFormAttributeSubdefinition(role);
    IdmFormInstanceDto formInstanceDto = new IdmFormInstanceDto();
    IdmFormAttributeDto attribute = formDefinitionDto.getMappedAttributeByCode(NUMBER_OF_FINGERS);
    IdmFormValueDto formValueDto = new IdmFormValueDto(attribute);
    formValueDto.setValue(5);
    List<IdmFormValueDto> values = Lists.newArrayList(formValueDto);
    formInstanceDto.setValues(values);
    List<IdmFormInstanceDto> forms = Lists.newArrayList(formInstanceDto);
    createdRequestIdentityRole.setEavs(forms);
    createdRequestIdentityRole = requestIdentityRoleService.save(createdRequestIdentityRole);
    IdmRoleRequestDto request = roleRequestService.get(createdRequestIdentityRole.getRoleRequest(), new IdmRoleRequestFilter(true));
    Assert.assertNotNull(request);
    // Execute a role-request.
    getHelper().executeRequest(request, false, true);
    IdmRequestIdentityRoleFilter filterRequestIdentityRole = new IdmRequestIdentityRoleFilter();
    filterRequestIdentityRole.setIdentityId(identity.getId());
    filterRequestIdentityRole.setRoleRequestId(request.getId());
    // Include EAV attributes
    filterRequestIdentityRole.setIncludeEav(true);
    // Check EAV value in the request-identity-role
    List<IdmRequestIdentityRoleDto> requestIdentityRoles = requestIdentityRoleService.find(filterRequestIdentityRole, null).getContent();
    Assert.assertEquals(1, requestIdentityRoles.size());
    Assert.assertEquals(role.getId(), requestIdentityRoles.get(0).getRole());
    Assert.assertEquals(1, requestIdentityRoles.get(0).getEavs().size());
    IdmFormInstanceDto formInstance = requestIdentityRoles.get(0).getEavs().get(0);
    Assert.assertEquals(1, formInstance.getValues().size());
    IdmFormValueDto formValue = formInstance.getValues().get(0);
    Serializable value = formValue.getValue();
    Assert.assertEquals(((BigDecimal) formValueDto.getValue()).longValue(), ((BigDecimal) value).longValue());
    IdmFormAttributeDto mappedAttribute = formInstance.getMappedAttribute(formValue.getFormAttribute());
    Assert.assertNotNull(mappedAttribute);
    Assert.assertNull(formInstance.getValidationErrors());
    identityRoles = identityRoleService.find(identityRoleFilter, null).getContent();
    assertEquals(1, identityRoles.size());
    // Create request identity-role
    createdRequestIdentityRole = new IdmRequestIdentityRoleDto();
    createdRequestIdentityRole.setIdentityContract(contract.getId());
    // Change the valid from
    createdRequestIdentityRole.setValidFrom(LocalDate.now());
    createdRequestIdentityRole.setRole(role.getId());
    // Create role attribute value in concept
    formDefinitionDto = roleService.getFormAttributeSubdefinition(role);
    formInstanceDto = new IdmFormInstanceDto();
    attribute = formDefinitionDto.getMappedAttributeByCode(NUMBER_OF_FINGERS);
    formValueDto = new IdmFormValueDto(attribute);
    formValueDto.setValue(5);
    values = Lists.newArrayList(formValueDto);
    formInstanceDto.setValues(values);
    forms = Lists.newArrayList(formInstanceDto);
    createdRequestIdentityRole.setEavs(forms);
    requestIdentityRoleService.save(createdRequestIdentityRole);
}
Also used : IdmRoleFormAttributeDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleFormAttributeDto) DtoUtils(eu.bcvsolutions.idm.core.api.utils.DtoUtils) IdmRequestIdentityRoleDto(eu.bcvsolutions.idm.core.api.dto.IdmRequestIdentityRoleDto) IdmIdentityRoleDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityRoleDto) IdmFormAttributeDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormAttributeDto) Autowired(org.springframework.beans.factory.annotation.Autowired) FormService(eu.bcvsolutions.idm.core.eav.api.service.FormService) IdmRoleRequestService(eu.bcvsolutions.idm.core.api.service.IdmRoleRequestService) BigDecimal(java.math.BigDecimal) IdmFormValueDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormValueDto) IdmRequestIdentityRoleService(eu.bcvsolutions.idm.core.api.service.IdmRequestIdentityRoleService) After(org.junit.After) IdmRoleRequestDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleRequestDto) Set(java.util.Set) UUID(java.util.UUID) InvalidFormException(eu.bcvsolutions.idm.core.api.exception.InvalidFormException) Serializable(java.io.Serializable) List(java.util.List) LocalDate(java.time.LocalDate) IdmRoleRequestFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmRoleRequestFilter) GuardedString(eu.bcvsolutions.idm.core.security.api.domain.GuardedString) IdmRoleFormAttribute_(eu.bcvsolutions.idm.core.model.entity.IdmRoleFormAttribute_) IdmRoleFormAttributeDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleFormAttributeDto) PersistentType(eu.bcvsolutions.idm.core.eav.api.domain.PersistentType) Lists(com.google.common.collect.Lists) IdmIdentityRole(eu.bcvsolutions.idm.core.model.entity.IdmIdentityRole) Sets(org.mockito.internal.util.collections.Sets) ImmutableList(com.google.common.collect.ImmutableList) IdmConceptRoleRequestDto(eu.bcvsolutions.idm.core.api.dto.IdmConceptRoleRequestDto) AbstractIntegrationTest(eu.bcvsolutions.idm.test.api.AbstractIntegrationTest) IdmFormInstanceDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormInstanceDto) IdmIdentityContractDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityContractDto) IdmRoleFormAttributeFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmRoleFormAttributeFilter) Before(org.junit.Before) IdmIdentityRoleService(eu.bcvsolutions.idm.core.api.service.IdmIdentityRoleService) IdmIdentityRoleFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmIdentityRoleFilter) Assert.assertNotNull(org.junit.Assert.assertNotNull) IdmIdentityDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto) IdmRoleService(eu.bcvsolutions.idm.core.api.service.IdmRoleService) RoleRequestState(eu.bcvsolutions.idm.core.api.domain.RoleRequestState) Test(org.junit.Test) IdmRoleFormAttributeService(eu.bcvsolutions.idm.core.api.service.IdmRoleFormAttributeService) IdmFormDefinitionDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormDefinitionDto) IdmRoleDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleDto) Assert.assertNull(org.junit.Assert.assertNull) IdmRequestIdentityRoleFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmRequestIdentityRoleFilter) Assert(org.junit.Assert) ConceptRoleRequestOperation(eu.bcvsolutions.idm.core.api.domain.ConceptRoleRequestOperation) Assert.assertEquals(org.junit.Assert.assertEquals) Transactional(org.springframework.transaction.annotation.Transactional) IdmFormInstanceDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormInstanceDto) IdmRoleDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleDto) Serializable(java.io.Serializable) IdmRequestIdentityRoleDto(eu.bcvsolutions.idm.core.api.dto.IdmRequestIdentityRoleDto) IdmFormDefinitionDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormDefinitionDto) IdmIdentityRoleFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmIdentityRoleFilter) IdmRoleFormAttributeFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmRoleFormAttributeFilter) IdmRequestIdentityRoleFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmRequestIdentityRoleFilter) IdmFormAttributeDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormAttributeDto) IdmFormValueDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormValueDto) IdmRoleRequestFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmRoleRequestFilter) IdmIdentityDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto) IdmIdentityRoleDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityRoleDto) IdmIdentityContractDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityContractDto) IdmRoleRequestDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleRequestDto) AbstractIntegrationTest(eu.bcvsolutions.idm.test.api.AbstractIntegrationTest) Test(org.junit.Test)

Aggregations

IdmRequestIdentityRoleDto (eu.bcvsolutions.idm.core.api.dto.IdmRequestIdentityRoleDto)23 IdmIdentityContractDto (eu.bcvsolutions.idm.core.api.dto.IdmIdentityContractDto)20 IdmRoleDto (eu.bcvsolutions.idm.core.api.dto.IdmRoleDto)20 IdmIdentityRoleDto (eu.bcvsolutions.idm.core.api.dto.IdmIdentityRoleDto)17 IdmRoleRequestDto (eu.bcvsolutions.idm.core.api.dto.IdmRoleRequestDto)17 IdmConceptRoleRequestDto (eu.bcvsolutions.idm.core.api.dto.IdmConceptRoleRequestDto)16 IdmIdentityDto (eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto)16 Test (org.junit.Test)16 Transactional (org.springframework.transaction.annotation.Transactional)16 GuardedString (eu.bcvsolutions.idm.core.security.api.domain.GuardedString)15 IdmRequestIdentityRoleFilter (eu.bcvsolutions.idm.core.api.dto.filter.IdmRequestIdentityRoleFilter)12 IdmRoleRequestFilter (eu.bcvsolutions.idm.core.api.dto.filter.IdmRoleRequestFilter)12 AbstractIntegrationTest (eu.bcvsolutions.idm.test.api.AbstractIntegrationTest)12 IdmFormInstanceDto (eu.bcvsolutions.idm.core.eav.api.dto.IdmFormInstanceDto)9 IdmIdentityRoleFilter (eu.bcvsolutions.idm.core.api.dto.filter.IdmIdentityRoleFilter)8 UUID (java.util.UUID)8 ConceptRoleRequestOperation (eu.bcvsolutions.idm.core.api.domain.ConceptRoleRequestOperation)7 IdmIdentityRoleService (eu.bcvsolutions.idm.core.api.service.IdmIdentityRoleService)7 IdmRequestIdentityRoleService (eu.bcvsolutions.idm.core.api.service.IdmRequestIdentityRoleService)7 IdmRoleRequestService (eu.bcvsolutions.idm.core.api.service.IdmRoleRequestService)7