Search in sources :

Example 66 with SysSystemMappingFilter

use of eu.bcvsolutions.idm.acc.dto.filter.SysSystemMappingFilter in project CzechIdMng by bcvsolutions.

the class DefaultSysSystemAttributeMappingServiceFilterTest method testFilterByEntityTypeFound.

@Test
public void testFilterByEntityTypeFound() {
    SysSystemDto system = this.getHelper().createTestResourceSystem(true, getHelper().createName());
    // Generate second system for add mapped attributes
    this.getHelper().createTestResourceSystem(true, getHelper().createName());
    SysSystemMappingFilter filterMapping = new SysSystemMappingFilter();
    filterMapping.setSystemId(system.getId());
    List<SysSystemMappingDto> mappings = systemMappingService.find(filterMapping, null).getContent();
    assertEquals(1, mappings.size());
    SysSystemAttributeMappingFilter filter = new SysSystemAttributeMappingFilter();
    filter.setSystemId(system.getId());
    filter.setEntityType(SystemEntityType.IDENTITY);
    List<SysSystemAttributeMappingDto> attributeMappings = systemAttributeMappingService.find(filter, null).getContent();
    // Six is default for standard test resource
    assertEquals(6, attributeMappings.size());
}
Also used : SysSystemAttributeMappingFilter(eu.bcvsolutions.idm.acc.dto.filter.SysSystemAttributeMappingFilter) SysSystemMappingFilter(eu.bcvsolutions.idm.acc.dto.filter.SysSystemMappingFilter) SysSystemAttributeMappingDto(eu.bcvsolutions.idm.acc.dto.SysSystemAttributeMappingDto) SysSystemMappingDto(eu.bcvsolutions.idm.acc.dto.SysSystemMappingDto) SysSystemDto(eu.bcvsolutions.idm.acc.dto.SysSystemDto) Test(org.junit.Test) AbstractIntegrationTest(eu.bcvsolutions.idm.test.api.AbstractIntegrationTest)

Example 67 with SysSystemMappingFilter

use of eu.bcvsolutions.idm.acc.dto.filter.SysSystemMappingFilter in project CzechIdMng by bcvsolutions.

the class DefaultSysSystemAttributeMappingServiceFilterTest method testFilterByUid.

@Test
public void testFilterByUid() {
    SysSystemDto system = this.getHelper().createTestResourceSystem(true, getHelper().createName());
    // Generate second system for add mapped attributes
    this.getHelper().createTestResourceSystem(true, getHelper().createName());
    SysSystemMappingFilter filterMapping = new SysSystemMappingFilter();
    filterMapping.setSystemId(system.getId());
    List<SysSystemMappingDto> mappings = systemMappingService.find(filterMapping, null).getContent();
    assertEquals(1, mappings.size());
    SysSystemMappingDto mappingDto = mappings.get(0);
    SysSystemAttributeMappingFilter filter = new SysSystemAttributeMappingFilter();
    filter.setSystemMappingId(mappingDto.getId());
    filter.setIsUid(Boolean.TRUE);
    List<SysSystemAttributeMappingDto> attributeMappings = systemAttributeMappingService.find(filter, null).getContent();
    assertEquals(1, attributeMappings.size());
    SysSystemAttributeMappingDto attributeMappingDto = attributeMappings.get(0);
    assertEquals(TestHelper.ATTRIBUTE_MAPPING_NAME, attributeMappingDto.getName());
}
Also used : SysSystemAttributeMappingFilter(eu.bcvsolutions.idm.acc.dto.filter.SysSystemAttributeMappingFilter) SysSystemMappingFilter(eu.bcvsolutions.idm.acc.dto.filter.SysSystemMappingFilter) SysSystemAttributeMappingDto(eu.bcvsolutions.idm.acc.dto.SysSystemAttributeMappingDto) SysSystemMappingDto(eu.bcvsolutions.idm.acc.dto.SysSystemMappingDto) SysSystemDto(eu.bcvsolutions.idm.acc.dto.SysSystemDto) Test(org.junit.Test) AbstractIntegrationTest(eu.bcvsolutions.idm.test.api.AbstractIntegrationTest)

Example 68 with SysSystemMappingFilter

use of eu.bcvsolutions.idm.acc.dto.filter.SysSystemMappingFilter in project CzechIdMng by bcvsolutions.

the class DefaultSysSystemAttributeMappingServiceFilterTest method testFilterBySchemaName.

@Test
public void testFilterBySchemaName() {
    SysSystemDto system = this.getHelper().createTestResourceSystem(true, getHelper().createName());
    // Generate second system for add mapped attributes
    this.getHelper().createTestResourceSystem(true, getHelper().createName());
    SysSystemMappingFilter filterMapping = new SysSystemMappingFilter();
    filterMapping.setSystemId(system.getId());
    List<SysSystemMappingDto> mappings = systemMappingService.find(filterMapping, null).getContent();
    assertEquals(1, mappings.size());
    SysSystemMappingDto mappingDto = mappings.get(0);
    SysSystemAttributeMappingFilter filter = new SysSystemAttributeMappingFilter();
    filter.setSystemMappingId(mappingDto.getId());
    filter.setName(TestHelper.ATTRIBUTE_MAPPING_FIRSTNAME);
    List<SysSystemAttributeMappingDto> attributeMappings = systemAttributeMappingService.find(filter, null).getContent();
    assertEquals(1, attributeMappings.size());
    SysSystemAttributeMappingDto attributeMappingDto = attributeMappings.get(0);
    assertEquals(TestHelper.ATTRIBUTE_MAPPING_FIRSTNAME, attributeMappingDto.getName());
    assertEquals(mappingDto.getId(), attributeMappingDto.getSystemMapping());
}
Also used : SysSystemAttributeMappingFilter(eu.bcvsolutions.idm.acc.dto.filter.SysSystemAttributeMappingFilter) SysSystemMappingFilter(eu.bcvsolutions.idm.acc.dto.filter.SysSystemMappingFilter) SysSystemAttributeMappingDto(eu.bcvsolutions.idm.acc.dto.SysSystemAttributeMappingDto) SysSystemMappingDto(eu.bcvsolutions.idm.acc.dto.SysSystemMappingDto) SysSystemDto(eu.bcvsolutions.idm.acc.dto.SysSystemDto) Test(org.junit.Test) AbstractIntegrationTest(eu.bcvsolutions.idm.test.api.AbstractIntegrationTest)

Example 69 with SysSystemMappingFilter

use of eu.bcvsolutions.idm.acc.dto.filter.SysSystemMappingFilter in project CzechIdMng by bcvsolutions.

the class DefaultSysSystemAttributeMappingServiceFilterTest method testFilterByOperationTypeFound.

@Test
public void testFilterByOperationTypeFound() {
    SysSystemDto system = this.getHelper().createTestResourceSystem(true, getHelper().createName());
    // Generate second system for add mapped attributes
    this.getHelper().createTestResourceSystem(true, getHelper().createName());
    SysSystemMappingFilter filterMapping = new SysSystemMappingFilter();
    filterMapping.setSystemId(system.getId());
    List<SysSystemMappingDto> mappings = systemMappingService.find(filterMapping, null).getContent();
    assertEquals(1, mappings.size());
    SysSystemAttributeMappingFilter filter = new SysSystemAttributeMappingFilter();
    filter.setSystemId(system.getId());
    filter.setOperationType(SystemOperationType.PROVISIONING);
    List<SysSystemAttributeMappingDto> attributeMappings = systemAttributeMappingService.find(filter, null).getContent();
    // Six is default for standard test resource
    assertEquals(6, attributeMappings.size());
}
Also used : SysSystemAttributeMappingFilter(eu.bcvsolutions.idm.acc.dto.filter.SysSystemAttributeMappingFilter) SysSystemMappingFilter(eu.bcvsolutions.idm.acc.dto.filter.SysSystemMappingFilter) SysSystemAttributeMappingDto(eu.bcvsolutions.idm.acc.dto.SysSystemAttributeMappingDto) SysSystemMappingDto(eu.bcvsolutions.idm.acc.dto.SysSystemMappingDto) SysSystemDto(eu.bcvsolutions.idm.acc.dto.SysSystemDto) Test(org.junit.Test) AbstractIntegrationTest(eu.bcvsolutions.idm.test.api.AbstractIntegrationTest)

Example 70 with SysSystemMappingFilter

use of eu.bcvsolutions.idm.acc.dto.filter.SysSystemMappingFilter in project CzechIdMng by bcvsolutions.

the class DefaultSysSystemAttributeMappingServiceFilterTest method testFilterByNameNotFound.

@Test
public void testFilterByNameNotFound() {
    SysSystemDto system = this.getHelper().createTestResourceSystem(true, getHelper().createName());
    // Generate second system for add mapped attributes
    this.getHelper().createTestResourceSystem(true, getHelper().createName());
    SysSystemMappingFilter filterMapping = new SysSystemMappingFilter();
    filterMapping.setSystemId(system.getId());
    List<SysSystemMappingDto> mappings = systemMappingService.find(filterMapping, null).getContent();
    assertEquals(1, mappings.size());
    SysSystemAttributeMappingFilter filter = new SysSystemAttributeMappingFilter();
    filter.setSystemId(system.getId());
    filter.setName(IdmIdentity_.state.getName());
    List<SysSystemAttributeMappingDto> attributeMappings = systemAttributeMappingService.find(filter, null).getContent();
    assertEquals(0, attributeMappings.size());
}
Also used : SysSystemAttributeMappingFilter(eu.bcvsolutions.idm.acc.dto.filter.SysSystemAttributeMappingFilter) SysSystemMappingFilter(eu.bcvsolutions.idm.acc.dto.filter.SysSystemMappingFilter) SysSystemAttributeMappingDto(eu.bcvsolutions.idm.acc.dto.SysSystemAttributeMappingDto) SysSystemMappingDto(eu.bcvsolutions.idm.acc.dto.SysSystemMappingDto) SysSystemDto(eu.bcvsolutions.idm.acc.dto.SysSystemDto) Test(org.junit.Test) AbstractIntegrationTest(eu.bcvsolutions.idm.test.api.AbstractIntegrationTest)

Aggregations

SysSystemMappingFilter (eu.bcvsolutions.idm.acc.dto.filter.SysSystemMappingFilter)91 SysSystemMappingDto (eu.bcvsolutions.idm.acc.dto.SysSystemMappingDto)84 SysSystemDto (eu.bcvsolutions.idm.acc.dto.SysSystemDto)67 Test (org.junit.Test)62 AbstractIntegrationTest (eu.bcvsolutions.idm.test.api.AbstractIntegrationTest)55 SysSystemAttributeMappingDto (eu.bcvsolutions.idm.acc.dto.SysSystemAttributeMappingDto)51 SysSystemAttributeMappingFilter (eu.bcvsolutions.idm.acc.dto.filter.SysSystemAttributeMappingFilter)49 SysSyncConfigFilter (eu.bcvsolutions.idm.acc.dto.filter.SysSyncConfigFilter)25 AbstractSysSyncConfigDto (eu.bcvsolutions.idm.acc.dto.AbstractSysSyncConfigDto)23 SysSchemaObjectClassDto (eu.bcvsolutions.idm.acc.dto.SysSchemaObjectClassDto)20 IdmBasePermission (eu.bcvsolutions.idm.core.security.api.domain.IdmBasePermission)14 SystemEntityType (eu.bcvsolutions.idm.acc.domain.SystemEntityType)11 ConnectorType (eu.bcvsolutions.idm.acc.service.api.ConnectorType)11 ConnectorTypeDto (eu.bcvsolutions.idm.acc.dto.ConnectorTypeDto)10 SysSyncIdentityConfigDto (eu.bcvsolutions.idm.acc.dto.SysSyncIdentityConfigDto)10 SysSchemaAttributeDto (eu.bcvsolutions.idm.acc.dto.SysSchemaAttributeDto)8 GuardedString (eu.bcvsolutions.idm.core.security.api.domain.GuardedString)8 Transactional (org.springframework.transaction.annotation.Transactional)8 SysSyncRoleConfigDto (eu.bcvsolutions.idm.acc.dto.SysSyncRoleConfigDto)7 SysSchemaAttributeFilter (eu.bcvsolutions.idm.acc.dto.filter.SysSchemaAttributeFilter)7