Search in sources :

Example 16 with IdmFormProjectionDto

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

the class IdentityContractAddGuaranteeByProjectionProcessor method conditional.

@Override
public boolean conditional(EntityEvent<IdmIdentityContractDto> event) {
    if (!super.conditional(event)) {
        return false;
    }
    // check user is logged => from gui
    if (securityService.getCurrentId() == null) {
        LOG.debug("User is not logged in, contract will NOT be processed (e.g. from synchronization).");
        return false;
    }
    // check configured projection is used
    IdmIdentityContractDto content = event.getContent();
    IdmIdentityDto identity = lookupService.lookupEmbeddedDto(content, IdmIdentityContract_.identity);
    UUID formProjectionId = identity.getFormProjection();
    if (formProjectionId == null) {
        LOG.debug("Contract is created without projection, contract will NOT be processer.");
        return false;
    }
    // 
    // projection flag is set
    IdmFormProjectionDto formProjection = lookupService.lookupEmbeddedDto(identity, IdmIdentity_.formProjection);
    if (formProjection.getProperties().getBooleanValue(IdentityFormProjectionRoute.PARAMETER_SET_CONTRACT_GUARANTEE)) {
        LOG.debug("Contract is created with projection [{}], add direct guarantee for newly created contract is enabled.", formProjection.getId());
        return true;
    }
    // 
    LOG.debug("Contract is created with projection [{}], " + "add direct guarantee for newly created contract is NOT enabled, " + "contract will NOT be processed.", formProjection.getId());
    return false;
}
Also used : IdmFormProjectionDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormProjectionDto) IdmIdentityDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto) UUID(java.util.UUID) IdmIdentityContractDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityContractDto)

Example 17 with IdmFormProjectionDto

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

the class InitDemoDataProcessor method process.

@Override
public EventResult<ModuleDescriptorDto> process(EntityEvent<ModuleDescriptorDto> event) {
    LOG.info("Creating demo data.");
    // 
    // form attributes at first => identity will be created with default values
    createFormAttributes();
    // 
    // get default tree type and root (by init data defensively)
    IdmTreeTypeDto treeType = treeTypeService.getByCode(InitApplicationData.DEFAULT_TREE_TYPE);
    Page<IdmTreeNodeDto> rootsList = treeNodeService.findRoots(treeType.getId(), PageRequest.of(0, 1));
    IdmTreeNodeDto rootOrganization = null;
    if (!rootsList.getContent().isEmpty()) {
        rootOrganization = rootsList.getContent().get(0);
    } else {
        rootOrganization = new IdmTreeNodeDto();
        rootOrganization.setCode("root");
        rootOrganization.setName("Organization");
        rootOrganization.setTreeType(treeTypeService.getByCode(InitOrganizationProcessor.DEFAULT_TREE_TYPE).getId());
        rootOrganization = treeNodeService.save(rootOrganization);
    }
    // 
    IdmRoleDto role2 = createRequestableCustomRole();
    // 
    IdmRoleDto userManagerRole = roleConfiguration.getUserManagerRole();
    if (userManagerRole == null) {
        userManagerRole = new IdmRoleDto();
        userManagerRole.setCode("userManagerRole");
        userManagerRole.setCanBeRequested(true);
        userManagerRole = roleService.save(userManagerRole);
        // 
        LOG.info("Role created [id: {}]", userManagerRole.getId());
    }
    // 
    IdmIdentityDto identity = new IdmIdentityDto();
    identity.setUsername("john");
    identity.setPassword(new GuardedString("john"));
    identity.setFirstName("John");
    identity.setLastName("Doe");
    identity.setEmail("john.doe@bcvsolutions.eu");
    identity = identityService.save(identity);
    List<IdmFormValueDto> values = new ArrayList<>();
    IdmFormValueDto phoneValue = new IdmFormValueDto();
    phoneValue.setFormAttribute(formService.getAttribute(identity.getClass(), FORM_ATTRIBUTE_PHONE).getId());
    phoneValue.setStringValue("12345679");
    values.add(phoneValue);
    formService.saveValues(identity.getId(), IdmIdentity.class, null, values);
    LOG.info("Identity created [id: {}]", identity.getId());
    // 
    // create prime contract
    IdmIdentityContractDto identityContract = identityContractService.getPrimeContract(identity.getId());
    if (identityContract == null) {
        identityContract = identityContractService.prepareMainContract(identity.getId());
        identityContract = identityContractService.save(identityContract);
    }
    // 
    IdmIdentityRoleDto identityRole = new IdmIdentityRoleDto();
    identityRole.setIdentityContract(identityContract.getId());
    identityRole.setRole(role2.getId());
    identityRole = identityRoleService.save(identityRole);
    // 
    IdmIdentityDto identity2 = new IdmIdentityDto();
    identity2.setUsername("jane");
    identity2.setFirstName("Jane");
    identity2.setPassword(new GuardedString("jane"));
    identity2.setLastName("Doe");
    identity2.setEmail("jane.doe@bcvsolutions.eu");
    identity2 = identityService.save(identity2);
    LOG.info("Identity created [id: {}]", identity2.getId());
    // 
    IdmIdentityDto identity3 = new IdmIdentityDto();
    identity3.setUsername("novak");
    identity3.setFirstName("Jan");
    identity3.setPassword(new GuardedString("novak"));
    identity3.setLastName("Novák");
    identity3.setEmail("jan.novak@bcvsolutions.eu");
    identity3 = identityService.save(identity3);
    LOG.info("Identity created [id: {}]", identity3.getId());
    // 
    IdmTreeNodeDto organization1 = new IdmTreeNodeDto();
    organization1.setCode("one");
    organization1.setName("Organization One");
    organization1.setParent(rootOrganization.getId());
    organization1.setTreeType(treeType.getId());
    organization1 = treeNodeService.save(organization1);
    // 
    IdmTreeNodeDto organization2 = new IdmTreeNodeDto();
    organization2.setCode("two");
    organization2.setName("Organization Two");
    organization2.setParent(rootOrganization.getId());
    organization2.setTreeType(treeType.getId());
    organization2 = treeNodeService.save(organization2);
    // 
    // form projection for externe user
    IdmFormProjectionDto externeProjection = new IdmFormProjectionDto();
    externeProjection.setOwnerType(lookupService.getOwnerType(IdmIdentity.class));
    externeProjection.setCode("identity-externe");
    externeProjection.setRoute(IdentityFormProjectionRoute.PROJECTION_NAME);
    try {
        // TODO: better setter
        externeProjection.setBasicFields(mapper.writeValueAsString(Lists.newArrayList(IdmIdentity_.username.getName(), IdmIdentity_.firstName.getName(), IdmIdentity_.lastName.getName())));
    } catch (Exception ex) {
        LOG.warn("Demo form proction will show all basic attributes.", ex);
    }
    // not available now in product projection
    externeProjection.getProperties().put(IdentityFormProjectionRoute.PARAMETER_LOAD_ASSIGNED_ROLES, false);
    externeProjection = formProjectionService.save(externeProjection);
    IdmIdentityDto externeIdentity = new IdmIdentityDto();
    externeIdentity.setUsername("externeUser");
    externeIdentity.setFirstName("František");
    externeIdentity.setPassword(new GuardedString("externeUser"));
    externeIdentity.setLastName("Nový");
    externeIdentity.setEmail("frantisek.novy@bcvsolutions.eu");
    externeIdentity.setFormProjection(externeProjection.getId());
    externeIdentity = identityService.save(externeIdentity);
    LOG.info("Externe identity created [id: {}]", externeIdentity.getId());
    // 
    // helpdesk
    IdmRoleDto helpdeskRole = roleConfiguration.getHelpdeskRole();
    if (helpdeskRole != null) {
        identity = new IdmIdentityDto();
        identity.setUsername("helpdesk");
        identity.setPassword(new GuardedString("helpdesk"));
        identity.setFirstName("Helpdesk");
        identity.setLastName("User");
        identity.setEmail("hepldesk@bcvsolutions.eu");
        identity.setDescription("Helpdesk - can read other users and change passwords.");
        identity = identityService.save(identity);
        // create prime contract
        identityContract = identityContractService.getPrimeContract(identity.getId());
        if (identityContract == null) {
            identityContract = identityContractService.prepareMainContract(identity.getId());
            identityContract = identityContractService.save(identityContract);
        }
        // 
        identityRole = new IdmIdentityRoleDto();
        identityRole.setIdentityContract(identityContract.getId());
        identityRole.setRole(helpdeskRole.getId());
        identityRole = identityRoleService.save(identityRole);
    }
    // 
    // user manager - role created defensively above
    identity = new IdmIdentityDto();
    identity.setUsername("manager");
    identity.setPassword(new GuardedString("manager"));
    identity.setFirstName("Manager");
    identity.setLastName("User");
    identity.setEmail("manager@bcvsolutions.eu");
    identity.setDescription("Manager with subordinates (externeUser)");
    identity = identityService.save(identity);
    // create prime contract
    identityContract = identityContractService.getPrimeContract(identity.getId());
    if (identityContract == null) {
        identityContract = identityContractService.prepareMainContract(identity.getId());
        identityContract = identityContractService.save(identityContract);
    }
    // 
    identityRole = new IdmIdentityRoleDto();
    identityRole.setIdentityContract(identityContract.getId());
    identityRole.setRole(userManagerRole.getId());
    identityRole = identityRoleService.save(identityRole);
    // 
    identityContract = identityContractService.getPrimeContract(externeIdentity.getId());
    if (identityContract == null) {
        identityContract = identityContractService.prepareMainContract(identity.getId());
        identityContract.setExterne(true);
        identityContract = identityContractService.save(identityContract);
    } else {
        identityContract.setExterne(true);
        identityContract = identityContractService.save(identityContract);
    }
    // externe - set manager
    IdmContractGuaranteeDto guarantee = new IdmContractGuaranteeDto();
    guarantee.setIdentityContract(identityContract.getId());
    guarantee.setGuarantee(identity.getId());
    contractGuaranteeService.save(guarantee);
    // 
    // role manager
    IdmRoleDto roleManagerRole = roleConfiguration.getRoleManagerRole();
    if (roleManagerRole != null) {
        identity = new IdmIdentityDto();
        identity.setUsername("roleManager");
        identity.setPassword(new GuardedString("roleManager"));
        identity.setFirstName("Role");
        identity.setLastName("Manager");
        identity.setEmail("role.manager@bcvsolutions.eu");
        identity.setDescription("Role manager - can edit managed roles.");
        identity = identityService.save(identity);
        // create prime contract
        identityContract = identityContractService.getPrimeContract(identity.getId());
        if (identityContract == null) {
            identityContract = identityContractService.prepareMainContract(identity.getId());
            identityContract = identityContractService.save(identityContract);
        }
        // 
        identityRole = new IdmIdentityRoleDto();
        identityRole.setIdentityContract(identityContract.getId());
        identityRole.setRole(roleManagerRole.getId());
        identityRole = identityRoleService.save(identityRole);
    }
    // 
    LOG.info("Demo data was created.");
    // 
    configurationService.setBooleanValue(PARAMETER_DEMO_DATA_CREATED, true);
    // 
    return new DefaultEventResult<>(event, this);
}
Also used : IdmRoleDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleDto) ArrayList(java.util.ArrayList) IdmTreeNodeDto(eu.bcvsolutions.idm.core.api.dto.IdmTreeNodeDto) GuardedString(eu.bcvsolutions.idm.core.security.api.domain.GuardedString) IdmTreeTypeDto(eu.bcvsolutions.idm.core.api.dto.IdmTreeTypeDto) IdmFormProjectionDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormProjectionDto) IdmContractGuaranteeDto(eu.bcvsolutions.idm.core.api.dto.IdmContractGuaranteeDto) DefaultEventResult(eu.bcvsolutions.idm.core.api.event.DefaultEventResult) 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) IdmIdentity(eu.bcvsolutions.idm.core.model.entity.IdmIdentity)

Example 18 with IdmFormProjectionDto

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

the class IdentityChangeUserTypeBulkActionTest method processBulkActionByIds.

@Test
public void processBulkActionByIds() {
    List<IdmIdentityDto> identities = this.createIdentities(5);
    IdmFormProjectionDto projection = new IdmFormProjectionDto();
    projection.setCode(getHelper().createName());
    projection.setOwnerType(lookupService.getOwnerType(IdmIdentityDto.class));
    projection = projectionService.save(projection);
    IdmFormProjectionDto projection2 = new IdmFormProjectionDto();
    projection2.setCode(getHelper().createName());
    projection2.setOwnerType(lookupService.getOwnerType(IdmIdentityDto.class));
    projection2 = projectionService.save(projection2);
    IdmBulkActionDto bulkAction = this.findBulkAction(IdmIdentity.class, IdentityChangeUserTypeBulkAction.NAME);
    Set<UUID> ids = this.getIdFromList(identities);
    bulkAction.setIdentifiers(this.getIdFromList(identities));
    // set created form projection to all identities
    Map<String, Object> properties = new HashMap<>();
    properties.put(IdentityChangeUserTypeBulkAction.PROPERTY_USER_TYPE, projection.getId().toString());
    bulkAction.setProperties(properties);
    IdmBulkActionDto processAction = bulkActionManager.processAction(bulkAction);
    checkResultLrt(processAction, 5l, null, null);
    for (UUID id : ids) {
        IdmIdentityDto identityDto = identityService.get(id);
        assertNotNull(identityDto);
        assertEquals(identityDto.getFormProjection(), projection.getId());
    }
    // change form projection to another type
    properties.put(IdentityChangeUserTypeBulkAction.PROPERTY_USER_TYPE, projection2.getId().toString());
    bulkAction.setProperties(properties);
    processAction = bulkActionManager.processAction(bulkAction);
    checkResultLrt(processAction, 5l, null, null);
    for (UUID id : ids) {
        IdmIdentityDto identityDto = identityService.get(id);
        assertNotNull(identityDto);
        assertEquals(identityDto.getFormProjection(), projection2.getId());
    }
    // removing projection in bulk action is now forbidden
    properties.put(IdentityChangeUserTypeBulkAction.PROPERTY_USER_TYPE, null);
    bulkAction.setProperties(properties);
    try {
        processAction = bulkActionManager.processAction(bulkAction);
        Assert.fail();
    } catch (ResultCodeException e) {
        assertEquals(e.getError().getError().getStatusEnum(), CoreResultCode.BULK_ACTION_REQUIRED_PROPERTY.getCode());
    }
    checkResultLrt(processAction, 5l, null, null);
    for (UUID id : ids) {
        IdmIdentityDto identityDto = identityService.get(id);
        assertNotNull(identityDto);
        assertEquals(identityDto.getFormProjection(), projection2.getId());
    }
}
Also used : IdmFormProjectionDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormProjectionDto) IdmBulkActionDto(eu.bcvsolutions.idm.core.api.bulk.action.dto.IdmBulkActionDto) HashMap(java.util.HashMap) ResultCodeException(eu.bcvsolutions.idm.core.api.exception.ResultCodeException) IdmIdentityDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto) UUID(java.util.UUID) AbstractBulkActionTest(eu.bcvsolutions.idm.test.api.AbstractBulkActionTest) Test(org.junit.Test)

Example 19 with IdmFormProjectionDto

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

the class DefaultIdmAutomaticRoleAttributeServiceIntegrationTest method testAssingByIdentityFormProjection.

@Test
public void testAssingByIdentityFormProjection() {
    IdmFormProjectionDto formProjection = new IdmFormProjectionDto();
    formProjection.setCode(getHelper().createName());
    formProjection.setOwnerType(getLookupService().getOwnerType(IdmIdentityDto.class));
    formProjection = formProjectionService.save(formProjection);
    IdmIdentityDto identity = getHelper().createIdentity();
    identity.setFormProjection(formProjection.getId());
    identity = identityService.save(identity);
    // 
    IdmRoleDto role = getHelper().createRole();
    IdmAutomaticRoleAttributeDto automaticRole = getHelper().createAutomaticRole(role.getId());
    getHelper().createAutomaticRoleRule(automaticRole.getId(), AutomaticRoleAttributeRuleComparison.EQUALS, AutomaticRoleAttributeRuleType.IDENTITY, IdmIdentity_.formProjection.getName(), null, formProjection.getId().toString());
    // 
    List<IdmIdentityRoleDto> identityRoles = identityRoleService.findAllByIdentity(identity.getId());
    assertEquals(0, identityRoles.size());
    // 
    // add new one
    this.recalculateSync(automaticRole.getId());
    // 
    identityRoles = identityRoleService.findAllByIdentity(identity.getId());
    assertEquals(1, identityRoles.size());
    // 
    IdmIdentityRoleDto identityRoleDto = identityRoles.get(0);
    assertNotNull(identityRoleDto.getAutomaticRole());
    assertEquals(automaticRole.getId(), identityRoleDto.getAutomaticRole());
    assertEquals(automaticRole.getRole(), identityRoleDto.getRole());
    // 
    // change value and recalculate
    identity.setFormProjection(null);
    identity = identityService.save(identity);
    // 
    // recalculate isn't needed, is done when save identity
    // 
    identityRoles = identityRoleService.findAllByIdentity(identity.getId());
    assertEquals(0, identityRoles.size());
}
Also used : IdmFormProjectionDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormProjectionDto) IdmRoleDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleDto) IdmIdentityDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto) IdmIdentityRoleDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityRoleDto) IdmAutomaticRoleAttributeDto(eu.bcvsolutions.idm.core.api.dto.IdmAutomaticRoleAttributeDto) AbstractIntegrationTest(eu.bcvsolutions.idm.test.api.AbstractIntegrationTest) Test(org.junit.Test)

Example 20 with IdmFormProjectionDto

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

the class IdmIdentityControllerRestTest method testFindWithoutFormProjection.

@Test
public void testFindWithoutFormProjection() {
    String description = getHelper().createName();
    // 
    // without
    IdmIdentityDto identity = prepareDto();
    identity.setDescription(description);
    IdmIdentityDto identityOne = createDto(identity);
    // 
    // with projection
    IdmFormProjectionDto projection = new IdmFormProjectionDto();
    projection.setCode(getHelper().createName());
    projection.setOwnerType(lookupService.getOwnerType(IdmIdentityDto.class));
    projection = formProjectionService.save(projection);
    identity = prepareDto();
    identity.setDescription(description);
    identity.setFormProjection(projection.getId());
    IdmIdentityDto identityTwo = createDto(identity);
    // 
    IdmIdentityFilter filter = new IdmIdentityFilter();
    filter.setText(description);
    filter.setWithoutFormProjection(Boolean.TRUE);
    List<IdmIdentityDto> results = find(filter);
    // 
    Assert.assertEquals(1, results.size());
    Assert.assertTrue(results.stream().anyMatch(r -> r.getId().equals(identityOne.getId())));
    // 
    filter.setWithoutFormProjection(Boolean.FALSE);
    results = find(filter);
    // 
    Assert.assertEquals(1, results.size());
    Assert.assertTrue(results.stream().anyMatch(r -> r.getId().equals(identityTwo.getId())));
}
Also used : IdmFormProjectionDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormProjectionDto) MockMvcResultMatchers.jsonPath(org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath) ZonedDateTime(java.time.ZonedDateTime) IdmFormAttributeDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormAttributeDto) IdmTreeNodeDto(eu.bcvsolutions.idm.core.api.dto.IdmTreeNodeDto) Autowired(org.springframework.beans.factory.annotation.Autowired) ConfigurationService(eu.bcvsolutions.idm.core.api.service.ConfigurationService) FormService(eu.bcvsolutions.idm.core.eav.api.service.FormService) StringUtils(org.apache.commons.lang3.StringUtils) IdmPasswordDto(eu.bcvsolutions.idm.core.api.dto.IdmPasswordDto) CoreGroupPermission(eu.bcvsolutions.idm.core.model.domain.CoreGroupPermission) IdmFormValueDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormValueDto) SecurityMockMvcRequestPostProcessors.authentication(org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestPostProcessors.authentication) IdmIdentityFormValue(eu.bcvsolutions.idm.core.model.entity.eav.IdmIdentityFormValue) TypeReference(com.fasterxml.jackson.core.type.TypeReference) IdmProfileService(eu.bcvsolutions.idm.core.api.service.IdmProfileService) IdmIdentity(eu.bcvsolutions.idm.core.model.entity.IdmIdentity) IdmIdentityContractService(eu.bcvsolutions.idm.core.api.service.IdmIdentityContractService) Set(java.util.Set) IdmFormProjectionDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormProjectionDto) UUID(java.util.UUID) IdmFormAttributeFilter(eu.bcvsolutions.idm.core.eav.api.dto.filter.IdmFormAttributeFilter) Collectors(java.util.stream.Collectors) IdentityState(eu.bcvsolutions.idm.core.api.domain.IdentityState) MockMultipartFile(org.springframework.mock.web.MockMultipartFile) MockMvcRequestBuilders.patch(org.springframework.test.web.servlet.request.MockMvcRequestBuilders.patch) IOUtils(org.apache.commons.io.IOUtils) List(java.util.List) Matchers.equalTo(org.hamcrest.Matchers.equalTo) PanelDto(eu.bcvsolutions.idm.core.api.dto.PanelDto) IdmIdentityService(eu.bcvsolutions.idm.core.api.service.IdmIdentityService) GuardedString(eu.bcvsolutions.idm.core.security.api.domain.GuardedString) UnsupportedEncodingException(java.io.UnsupportedEncodingException) IdmAttachmentDto(eu.bcvsolutions.idm.core.ecm.api.dto.IdmAttachmentDto) MockMvcResultMatchers.content(org.springframework.test.web.servlet.result.MockMvcResultMatchers.content) FilterManager(eu.bcvsolutions.idm.core.api.repository.filter.FilterManager) AbstractReadWriteDtoControllerRestTest(eu.bcvsolutions.idm.core.api.rest.AbstractReadWriteDtoControllerRestTest) IdmPasswordService(eu.bcvsolutions.idm.core.api.service.IdmPasswordService) IdmTreeTypeDto(eu.bcvsolutions.idm.core.api.dto.IdmTreeTypeDto) DataFilter(eu.bcvsolutions.idm.core.api.dto.filter.DataFilter) IdmBasePermission(eu.bcvsolutions.idm.core.security.api.domain.IdmBasePermission) Lists(com.google.common.collect.Lists) AbstractReadWriteDtoController(eu.bcvsolutions.idm.core.api.rest.AbstractReadWriteDtoController) LookupService(eu.bcvsolutions.idm.core.api.service.LookupService) MockMvcResultMatchers.status(org.springframework.test.web.servlet.result.MockMvcResultMatchers.status) IdmIdentityFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmIdentityFilter) IdmFormProjectionService(eu.bcvsolutions.idm.core.eav.api.service.IdmFormProjectionService) TestHelper(eu.bcvsolutions.idm.test.api.TestHelper) IdmFormInstanceDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormInstanceDto) IdentityFormValueEvaluator(eu.bcvsolutions.idm.core.security.evaluator.eav.IdentityFormValueEvaluator) AttachmentManager(eu.bcvsolutions.idm.core.ecm.api.service.AttachmentManager) IdmIdentityDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto) IdmProfileDto(eu.bcvsolutions.idm.core.api.dto.IdmProfileDto) Matchers(org.hamcrest.Matchers) MultiValueMap(org.springframework.util.MultiValueMap) IOException(java.io.IOException) Test(org.junit.Test) MockMvcRequestBuilders(org.springframework.test.web.servlet.request.MockMvcRequestBuilders) ConfigurationMap(eu.bcvsolutions.idm.core.api.domain.ConfigurationMap) IdmFormDefinitionDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormDefinitionDto) URLEncoder(java.net.URLEncoder) IdmBulkActionDto(eu.bcvsolutions.idm.core.api.bulk.action.dto.IdmBulkActionDto) IdmRoleDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleDto) SelfIdentityEvaluator(eu.bcvsolutions.idm.core.security.evaluator.identity.SelfIdentityEvaluator) Ignore(org.junit.Ignore) PrivateIdentityConfiguration(eu.bcvsolutions.idm.core.api.config.domain.PrivateIdentityConfiguration) ResolvedIncompatibleRoleDto(eu.bcvsolutions.idm.core.api.dto.ResolvedIncompatibleRoleDto) IdentityDisableBulkAction(eu.bcvsolutions.idm.core.bulk.action.impl.IdentityDisableBulkAction) MockMvcRequestBuilders.get(org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get) Assert(org.junit.Assert) IdmIncompatibleRoleDto(eu.bcvsolutions.idm.core.api.dto.IdmIncompatibleRoleDto) LinkedMultiValueMap(org.springframework.util.LinkedMultiValueMap) InputStream(java.io.InputStream) IdmIdentityFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmIdentityFilter) GuardedString(eu.bcvsolutions.idm.core.security.api.domain.GuardedString) IdmIdentityDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto) AbstractReadWriteDtoControllerRestTest(eu.bcvsolutions.idm.core.api.rest.AbstractReadWriteDtoControllerRestTest) Test(org.junit.Test)

Aggregations

IdmFormProjectionDto (eu.bcvsolutions.idm.core.eav.api.dto.IdmFormProjectionDto)36 IdmIdentityDto (eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto)30 Test (org.junit.Test)21 IdmIdentityProjectionDto (eu.bcvsolutions.idm.core.api.dto.projection.IdmIdentityProjectionDto)17 Transactional (org.springframework.transaction.annotation.Transactional)16 IdmFormAttributeDto (eu.bcvsolutions.idm.core.eav.api.dto.IdmFormAttributeDto)13 IdmIdentityContractDto (eu.bcvsolutions.idm.core.api.dto.IdmIdentityContractDto)12 IdentityProjectionEvent (eu.bcvsolutions.idm.core.eav.api.event.IdentityProjectionEvent)12 AbstractRestTest (eu.bcvsolutions.idm.test.api.AbstractRestTest)12 IdmFormValueDto (eu.bcvsolutions.idm.core.eav.api.dto.IdmFormValueDto)11 IdmRoleDto (eu.bcvsolutions.idm.core.api.dto.IdmRoleDto)10 IdmFormDefinitionDto (eu.bcvsolutions.idm.core.eav.api.dto.IdmFormDefinitionDto)10 IdmFormInstanceDto (eu.bcvsolutions.idm.core.eav.api.dto.IdmFormInstanceDto)8 IdmIdentity (eu.bcvsolutions.idm.core.model.entity.IdmIdentity)6 AbstractIntegrationTest (eu.bcvsolutions.idm.test.api.AbstractIntegrationTest)6 IdmIdentityRoleDto (eu.bcvsolutions.idm.core.api.dto.IdmIdentityRoleDto)4 ArrayList (java.util.ArrayList)4 List (java.util.List)4 UUID (java.util.UUID)4 ConfigurationMap (eu.bcvsolutions.idm.core.api.domain.ConfigurationMap)3