Search in sources :

Example 1 with Assert.assertNotNull

use of org.junit.Assert.assertNotNull in project CzechIdMng by bcvsolutions.

the class IdmRequestIdentityRoleServiceIntegrationTest method testUniqueValidation.

@Test
public void testUniqueValidation() {
    // 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 for change an identity-role
    IdmRequestIdentityRoleDto changeRequestIdentityRole = new IdmRequestIdentityRoleDto();
    changeRequestIdentityRole.setId(identityRoles.get(0).getId());
    changeRequestIdentityRole.setIdentityContract(contract.getId());
    // Change the valid from
    changeRequestIdentityRole.setValidFrom(LocalDate.now());
    changeRequestIdentityRole.setIdentityRole(identityRoles.get(0).getId());
    changeRequestIdentityRole.setEavs(forms);
    changeRequestIdentityRole = requestIdentityRoleService.save(changeRequestIdentityRole);
    IdmRoleRequestDto requestChange = roleRequestService.get(changeRequestIdentityRole.getRoleRequest(), new IdmRoleRequestFilter(true));
    Assert.assertNotNull(requestChange);
    // Execute a role-request.
    requestChange = getHelper().executeRequest(requestChange, false, true);
    assertEquals(RoleRequestState.EXECUTED, requestChange.getState());
}
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)

Example 2 with Assert.assertNotNull

use of org.junit.Assert.assertNotNull in project CzechIdMng by bcvsolutions.

the class IdmRequestIdentityRoleServiceIntegrationTest method testFindAddingConceptWithEAVs.

@Test
public void testFindAddingConceptWithEAVs() {
    // Create role with attribute (include the sub-definition)
    IdmRoleDto role = createRoleWithAttributes(false);
    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(BigDecimal.TEN);
    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);
    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());
    Assert.assertEquals(1, requestIdentityRoles.get(0).getEavs().get(0).getValues().size());
    Serializable value = requestIdentityRoles.get(0).getEavs().get(0).getValues().get(0).getValue();
    Assert.assertEquals(BigDecimal.TEN.longValue(), ((BigDecimal) value).longValue());
}
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)

Example 3 with Assert.assertNotNull

use of org.junit.Assert.assertNotNull in project CzechIdMng by bcvsolutions.

the class DefaultIdmRoleFormAttributeServiceIntegrationTest method testDeleteRoleAttributeValueViaRoleRequest.

@Test
public void testDeleteRoleAttributeValueViaRoleRequest() {
    // Create role with attribute (include the sub-definition)
    IdmRoleDto role = createRoleWithAttributes();
    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
    IdmRoleRequestDto request = getHelper().createRoleRequest(identity);
    // Create change role-concept
    IdmConceptRoleRequestDto conceptRoleRequest = new IdmConceptRoleRequestDto();
    conceptRoleRequest.setRoleRequest(request.getId());
    conceptRoleRequest.setIdentityContract(contract.getId());
    // Change the valid from
    conceptRoleRequest.setValidFrom(LocalDate.now());
    conceptRoleRequest.setRole(role.getId());
    conceptRoleRequest.setOperation(ConceptRoleRequestOperation.ADD);
    conceptRoleRequest = conceptRoleRequestService.save(conceptRoleRequest);
    conceptRoleRequest.getEavs().clear();
    // Create role attribute value in concept
    IdmFormInstanceDto formInstanceDto = conceptRoleRequestService.getRoleAttributeValues(conceptRoleRequest, false);
    Assert.assertNotNull(formInstanceDto);
    Assert.assertNotNull(formInstanceDto.getFormDefinition());
    Assert.assertEquals(0, formInstanceDto.getValues().size());
    IdmFormAttributeDto attribute = formInstanceDto.getMappedAttributeByCode(NUMBER_OF_FINGERS);
    IdmFormValueDto formValueDto = new IdmFormValueDto(attribute);
    formValueDto.setValue(BigDecimal.TEN);
    List<IdmFormValueDto> values = Lists.newArrayList(formValueDto);
    formInstanceDto.setValues(values);
    List<IdmFormInstanceDto> forms = Lists.newArrayList(formInstanceDto);
    conceptRoleRequest.setEavs(forms);
    conceptRoleRequest = conceptRoleRequestService.save(conceptRoleRequest);
    conceptRoleRequest.getEavs().clear();
    formInstanceDto = conceptRoleRequestService.getRoleAttributeValues(conceptRoleRequest, false);
    Assert.assertEquals(1, formInstanceDto.getValues().size());
    Serializable value = formInstanceDto.toSinglePersistentValue(NUMBER_OF_FINGERS);
    Assert.assertEquals(BigDecimal.TEN.longValue(), ((BigDecimal) value).longValue());
    request = getHelper().executeRequest(request, false, true);
    // Check request
    assertEquals(RoleRequestState.EXECUTED, request.getState());
    identityRoles = identityRoleService.find(identityRoleFilter, null).getContent();
    assertEquals(1, identityRoles.size());
    IdmIdentityRoleDto identityRole = identityRoles.get(0);
    // Check identity-role
    identityRole = identityRoleService.get(identityRole.getId());
    assertEquals(conceptRoleRequest.getValidFrom(), identityRole.getValidFrom());
    // Check role attribute value in identity-role
    identityRole.getEavs().clear();
    IdmFormInstanceDto identityRoleFormInstanceDto = identityRoleService.getRoleAttributeValues(identityRole);
    Assert.assertEquals(1, identityRoleFormInstanceDto.getValues().size());
    value = identityRoleFormInstanceDto.toSinglePersistentValue(NUMBER_OF_FINGERS);
    Assert.assertEquals(BigDecimal.TEN.longValue(), ((BigDecimal) value).longValue());
    // Create request for delete attribute value
    IdmRoleRequestDto requestUpdate = getHelper().createRoleRequest(identity);
    // Create change role-concept
    IdmConceptRoleRequestDto updateConceptRoleRequest = new IdmConceptRoleRequestDto();
    updateConceptRoleRequest.setRoleRequest(requestUpdate.getId());
    updateConceptRoleRequest.setIdentityContract(contract.getId());
    // Change the valid from
    updateConceptRoleRequest.setValidFrom(LocalDate.now());
    updateConceptRoleRequest.setRole(role.getId());
    updateConceptRoleRequest.setIdentityRole(identityRole.getId());
    updateConceptRoleRequest.setOperation(ConceptRoleRequestOperation.UPDATE);
    updateConceptRoleRequest = conceptRoleRequestService.save(updateConceptRoleRequest);
    updateConceptRoleRequest.getEavs().clear();
    /**
     * Erase role attribute value in concept
     */
    formInstanceDto = conceptRoleRequestService.getRoleAttributeValues(updateConceptRoleRequest, false);
    Assert.assertNotNull(formInstanceDto);
    Assert.assertNotNull(formInstanceDto.getFormDefinition());
    Assert.assertEquals(0, formInstanceDto.getValues().size());
    attribute = formInstanceDto.getMappedAttributeByCode(NUMBER_OF_FINGERS);
    formValueDto = new IdmFormValueDto(attribute);
    formValueDto.setValue(null);
    values = Lists.newArrayList(formValueDto);
    formInstanceDto.setValues(values);
    forms = Lists.newArrayList(formInstanceDto);
    updateConceptRoleRequest.setEavs(forms);
    updateConceptRoleRequest = conceptRoleRequestService.save(updateConceptRoleRequest);
    updateConceptRoleRequest.getEavs().clear();
    formInstanceDto = conceptRoleRequestService.getRoleAttributeValues(updateConceptRoleRequest, false);
    // No form-value can exists
    Assert.assertEquals(0, formInstanceDto.getValues().size());
    requestUpdate = getHelper().executeRequest(requestUpdate, false, true);
    // Check request
    assertEquals(RoleRequestState.EXECUTED, requestUpdate.getState());
    identityRoles = identityRoleService.find(identityRoleFilter, null).getContent();
    assertEquals(1, identityRoles.size());
    identityRole = identityRoles.get(0);
    // Check identity-role
    identityRole = identityRoleService.get(identityRole.getId());
    assertEquals(updateConceptRoleRequest.getValidFrom(), identityRole.getValidFrom());
    // Check role attribute value in identity-role
    identityRole.getEavs().clear();
    identityRoleFormInstanceDto = identityRoleService.getRoleAttributeValues(identityRole);
    Assert.assertEquals(0, identityRoleFormInstanceDto.getValues().size());
}
Also used : IdmRoleFormAttributeDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleFormAttributeDto) IdmRoleFormAttributeDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleFormAttributeDto) IdmConceptRoleRequestService(eu.bcvsolutions.idm.core.api.service.IdmConceptRoleRequestService) DtoUtils(eu.bcvsolutions.idm.core.api.utils.DtoUtils) 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) PersistentType(eu.bcvsolutions.idm.core.eav.api.domain.PersistentType) BigDecimal(java.math.BigDecimal) Lists(com.google.common.collect.Lists) IdmFormValueDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormValueDto) IdmIdentityRole(eu.bcvsolutions.idm.core.model.entity.IdmIdentityRole) ImmutableList(com.google.common.collect.ImmutableList) ResultCodeException(eu.bcvsolutions.idm.core.api.exception.ResultCodeException) 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) 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) IdmRoleRequestDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleRequestDto) IdmRoleService(eu.bcvsolutions.idm.core.api.service.IdmRoleService) Test(org.junit.Test) RoleRequestState(eu.bcvsolutions.idm.core.api.domain.RoleRequestState) IdmRoleFormAttributeService(eu.bcvsolutions.idm.core.api.service.IdmRoleFormAttributeService) Serializable(java.io.Serializable) IdmFormDefinitionDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormDefinitionDto) List(java.util.List) Assert.assertNull(org.junit.Assert.assertNull) IdmRoleDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleDto) LocalDate(java.time.LocalDate) Assert(org.junit.Assert) ConceptRoleRequestOperation(eu.bcvsolutions.idm.core.api.domain.ConceptRoleRequestOperation) Assert.assertEquals(org.junit.Assert.assertEquals) IdmRoleFormAttribute_(eu.bcvsolutions.idm.core.model.entity.IdmRoleFormAttribute_) IdmFormInstanceDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormInstanceDto) IdmRoleDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleDto) Serializable(java.io.Serializable) 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) IdmFormAttributeDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormAttributeDto) IdmConceptRoleRequestDto(eu.bcvsolutions.idm.core.api.dto.IdmConceptRoleRequestDto) IdmFormValueDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormValueDto) 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)

Example 4 with Assert.assertNotNull

use of org.junit.Assert.assertNotNull in project CzechIdMng by bcvsolutions.

the class DefaultIdmRoleFormAttributeServiceIntegrationTest method testSubDefinitionOverrideValidationMax.

@Test
public void testSubDefinitionOverrideValidationMax() {
    // Create role with attribute (include the sub-definition)
    IdmRoleDto role = createRoleWithAttributes();
    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));
    // Set Max
    list.stream().filter(roleFormAttributeDto -> {
        IdmFormAttributeDto formAttributeDto = DtoUtils.getEmbedded(roleFormAttributeDto, IdmRoleFormAttribute_.formAttribute.getName(), IdmFormAttributeDto.class);
        return formAttributeDto.getCode().equals(NUMBER_OF_FINGERS);
    }).forEach(roleFormAttributeDto -> {
        Assert.assertEquals(BigDecimal.TEN.longValue(), roleFormAttributeDto.getMax().longValue());
        roleFormAttributeDto.setMax(BigDecimal.valueOf(111));
        roleFormAttributeService.save(roleFormAttributeDto);
    });
    // Load sub-definition by role
    formAttributeSubdefinition = roleService.getFormAttributeSubdefinition(role);
    Assert.assertEquals(1, formAttributeSubdefinition.getFormAttributes().size());
    IdmFormAttributeDto numberAttribute = formAttributeSubdefinition.getFormAttributes().stream().filter(attributeDto -> {
        return attributeDto.getCode().equals(NUMBER_OF_FINGERS);
    }).findFirst().orElse(null);
    Assert.assertNotNull(numberAttribute);
    Assert.assertEquals(111, numberAttribute.getMax().intValue());
}
Also used : IdmRoleFormAttributeDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleFormAttributeDto) IdmRoleFormAttributeDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleFormAttributeDto) IdmConceptRoleRequestService(eu.bcvsolutions.idm.core.api.service.IdmConceptRoleRequestService) DtoUtils(eu.bcvsolutions.idm.core.api.utils.DtoUtils) 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) PersistentType(eu.bcvsolutions.idm.core.eav.api.domain.PersistentType) BigDecimal(java.math.BigDecimal) Lists(com.google.common.collect.Lists) IdmFormValueDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormValueDto) IdmIdentityRole(eu.bcvsolutions.idm.core.model.entity.IdmIdentityRole) ImmutableList(com.google.common.collect.ImmutableList) ResultCodeException(eu.bcvsolutions.idm.core.api.exception.ResultCodeException) 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) 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) IdmRoleRequestDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleRequestDto) IdmRoleService(eu.bcvsolutions.idm.core.api.service.IdmRoleService) Test(org.junit.Test) RoleRequestState(eu.bcvsolutions.idm.core.api.domain.RoleRequestState) IdmRoleFormAttributeService(eu.bcvsolutions.idm.core.api.service.IdmRoleFormAttributeService) Serializable(java.io.Serializable) IdmFormDefinitionDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormDefinitionDto) List(java.util.List) Assert.assertNull(org.junit.Assert.assertNull) IdmRoleDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleDto) LocalDate(java.time.LocalDate) Assert(org.junit.Assert) ConceptRoleRequestOperation(eu.bcvsolutions.idm.core.api.domain.ConceptRoleRequestOperation) Assert.assertEquals(org.junit.Assert.assertEquals) IdmRoleFormAttribute_(eu.bcvsolutions.idm.core.model.entity.IdmRoleFormAttribute_) IdmRoleDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleDto) IdmFormAttributeDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormAttributeDto) IdmFormDefinitionDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormDefinitionDto) IdmRoleFormAttributeFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmRoleFormAttributeFilter) AbstractIntegrationTest(eu.bcvsolutions.idm.test.api.AbstractIntegrationTest) Test(org.junit.Test)

Example 5 with Assert.assertNotNull

use of org.junit.Assert.assertNotNull in project CzechIdMng by bcvsolutions.

the class DefaultIdmRoleFormAttributeServiceIntegrationTest method testSubDefinitionOverrideValidationRequired.

@Test
public void testSubDefinitionOverrideValidationRequired() {
    // Create role with attribute (include the sub-definition)
    IdmRoleDto role = createRoleWithAttributes();
    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());
    // Set required validation on false to IP attribute in the sub-definition
    list.stream().filter(roleFormAttributeDto -> {
        IdmFormAttributeDto formAttributeDto = DtoUtils.getEmbedded(roleFormAttributeDto, IdmRoleFormAttribute_.formAttribute.getName(), IdmFormAttributeDto.class);
        return formAttributeDto.getCode().equals(IP);
    }).forEach(roleFormAttributeDto -> {
        Assert.assertTrue(roleFormAttributeDto.isRequired());
        roleFormAttributeDto.setRequired(false);
        roleFormAttributeService.save(roleFormAttributeDto);
    });
    // Load sub-definition by role
    formAttributeSubdefinition = roleService.getFormAttributeSubdefinition(role);
    Assert.assertEquals(2, formAttributeSubdefinition.getFormAttributes().size());
    IdmFormAttributeDto ipFormAttribute = formAttributeSubdefinition.getFormAttributes().stream().filter(attributeDto -> {
        return attributeDto.getCode().equals(IP);
    }).findFirst().orElse(null);
    Assert.assertNotNull(ipFormAttribute);
    Assert.assertFalse(ipFormAttribute.isRequired());
}
Also used : IdmRoleFormAttributeDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleFormAttributeDto) IdmRoleFormAttributeDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleFormAttributeDto) IdmConceptRoleRequestService(eu.bcvsolutions.idm.core.api.service.IdmConceptRoleRequestService) DtoUtils(eu.bcvsolutions.idm.core.api.utils.DtoUtils) 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) PersistentType(eu.bcvsolutions.idm.core.eav.api.domain.PersistentType) BigDecimal(java.math.BigDecimal) Lists(com.google.common.collect.Lists) IdmFormValueDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormValueDto) IdmIdentityRole(eu.bcvsolutions.idm.core.model.entity.IdmIdentityRole) ImmutableList(com.google.common.collect.ImmutableList) ResultCodeException(eu.bcvsolutions.idm.core.api.exception.ResultCodeException) 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) 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) IdmRoleRequestDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleRequestDto) IdmRoleService(eu.bcvsolutions.idm.core.api.service.IdmRoleService) Test(org.junit.Test) RoleRequestState(eu.bcvsolutions.idm.core.api.domain.RoleRequestState) IdmRoleFormAttributeService(eu.bcvsolutions.idm.core.api.service.IdmRoleFormAttributeService) Serializable(java.io.Serializable) IdmFormDefinitionDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormDefinitionDto) List(java.util.List) Assert.assertNull(org.junit.Assert.assertNull) IdmRoleDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleDto) LocalDate(java.time.LocalDate) Assert(org.junit.Assert) ConceptRoleRequestOperation(eu.bcvsolutions.idm.core.api.domain.ConceptRoleRequestOperation) Assert.assertEquals(org.junit.Assert.assertEquals) IdmRoleFormAttribute_(eu.bcvsolutions.idm.core.model.entity.IdmRoleFormAttribute_) IdmRoleDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleDto) IdmFormAttributeDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormAttributeDto) IdmFormDefinitionDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormDefinitionDto) IdmRoleFormAttributeFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmRoleFormAttributeFilter) AbstractIntegrationTest(eu.bcvsolutions.idm.test.api.AbstractIntegrationTest) Test(org.junit.Test)

Aggregations

List (java.util.List)30 Assert (org.junit.Assert)30 Assert.assertEquals (org.junit.Assert.assertEquals)30 Assert.assertNotNull (org.junit.Assert.assertNotNull)30 Test (org.junit.Test)30 IdmIdentityDto (eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto)28 Autowired (org.springframework.beans.factory.annotation.Autowired)28 AbstractIntegrationTest (eu.bcvsolutions.idm.test.api.AbstractIntegrationTest)26 IdmRoleDto (eu.bcvsolutions.idm.core.api.dto.IdmRoleDto)25 IdmIdentityContractDto (eu.bcvsolutions.idm.core.api.dto.IdmIdentityContractDto)24 FormService (eu.bcvsolutions.idm.core.eav.api.service.FormService)24 IdmIdentityRoleDto (eu.bcvsolutions.idm.core.api.dto.IdmIdentityRoleDto)23 IdmFormAttributeDto (eu.bcvsolutions.idm.core.eav.api.dto.IdmFormAttributeDto)23 IdmFormDefinitionDto (eu.bcvsolutions.idm.core.eav.api.dto.IdmFormDefinitionDto)22 LocalDate (java.time.LocalDate)22 Assert.assertNull (org.junit.Assert.assertNull)22 Lists (com.google.common.collect.Lists)21 IdmIdentityRoleService (eu.bcvsolutions.idm.core.api.service.IdmIdentityRoleService)20 IdmRoleService (eu.bcvsolutions.idm.core.api.service.IdmRoleService)19 Serializable (java.io.Serializable)18