Search in sources :

Example 1 with IdmScriptFilter

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

the class ScriptRedeployBulkActionIntegrationTest method processBulkActionByFilter.

@Test
public void processBulkActionByFilter() {
    IdmScriptDto script1 = scriptService.getByCode(TEST_SCRIPT_CODE_1);
    Set<UUID> scripts = new HashSet<UUID>();
    scripts.add(script1.getId());
    String origDesc = script1.getDescription();
    script1.setDescription(CHANGED_TEST_DESC);
    script1 = scriptService.save(script1);
    assertNotEquals(script1.getDescription(), origDesc);
    IdmScriptFilter filter = new IdmScriptFilter();
    filter.setCode(TEST_SCRIPT_CODE_1);
    List<IdmScriptDto> checkScripts = scriptService.find(filter, null).getContent();
    assertEquals(1, checkScripts.size());
    IdmBulkActionDto bulkAction = this.findBulkAction(IdmScript.class, ScriptRedeployBulkAction.NAME);
    bulkAction.setTransformedFilter(filter);
    bulkAction.setFilter(toMap(filter));
    IdmBulkActionDto processAction = bulkActionManager.processAction(bulkAction);
    checkResultLrt(processAction, 1l, null, null);
    script1 = scriptService.get(script1.getId());
    assertEquals(script1.getDescription(), origDesc);
}
Also used : IdmBulkActionDto(eu.bcvsolutions.idm.core.api.bulk.action.dto.IdmBulkActionDto) IdmScriptFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmScriptFilter) IdmScriptDto(eu.bcvsolutions.idm.core.api.dto.IdmScriptDto) UUID(java.util.UUID) HashSet(java.util.HashSet) AbstractBulkActionTest(eu.bcvsolutions.idm.test.api.AbstractBulkActionTest) Test(org.junit.Test)

Example 2 with IdmScriptFilter

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

the class ScriptDuplicateBulkActionIntegrationTest method processBulkActionWithoutPermission.

@Test
public void processBulkActionWithoutPermission() {
    IdmScriptDto original = createIdmScript();
    IdmScriptFilter filt = new IdmScriptFilter();
    filt.setText(original.getCode());
    List<IdmScriptDto> dtos = scriptService.find(filt, null).getContent();
    Assert.assertEquals(1, dtos.size());
    IdmIdentityDto readerIdentity = this.createUserWithAuthorities(IdmBasePermission.READ);
    loginAsNoAdmin(readerIdentity.getUsername());
    IdmBulkActionDto bulkAction = this.findBulkAction(IdmScript.class, ScriptDuplicateBulkAction.NAME);
    bulkAction.getIdentifiers().add(original.getId());
    IdmBulkActionDto processAction = bulkActionManager.processAction(bulkAction);
    checkResultLrt(processAction, null, null, 1l);
    dtos = scriptService.find(filt, null).getContent();
    Assert.assertEquals(1, dtos.size());
    Assert.assertEquals(original.getId(), dtos.get(0).getId());
    cleanScript(dtos);
}
Also used : IdmBulkActionDto(eu.bcvsolutions.idm.core.api.bulk.action.dto.IdmBulkActionDto) IdmScriptFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmScriptFilter) IdmScriptDto(eu.bcvsolutions.idm.core.api.dto.IdmScriptDto) IdmIdentityDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto) AbstractBulkActionTest(eu.bcvsolutions.idm.test.api.AbstractBulkActionTest) Test(org.junit.Test)

Example 3 with IdmScriptFilter

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

the class ScriptDuplicateBulkActionIntegrationTest method processBulkActionByIds.

@Test
public void processBulkActionByIds() {
    IdmScriptDto original = createIdmScript();
    IdmScriptFilter filt = new IdmScriptFilter();
    filt.setText(original.getCode());
    List<IdmScriptDto> dtos = scriptService.find(filt, null).getContent();
    Assert.assertEquals(1, dtos.size());
    IdmBulkActionDto bulkAction = this.findBulkAction(IdmScript.class, ScriptDuplicateBulkAction.NAME);
    bulkAction.getIdentifiers().add(original.getId());
    IdmBulkActionDto processAction = bulkActionManager.processAction(bulkAction);
    checkResultLrt(processAction, 1l, null, null);
    dtos = scriptService.find(filt, null).getContent();
    Assert.assertEquals(2, dtos.size());
    Assert.assertTrue(compareScripts(dtos.get(0), dtos.get(1)));
    cleanScript(dtos);
}
Also used : IdmBulkActionDto(eu.bcvsolutions.idm.core.api.bulk.action.dto.IdmBulkActionDto) IdmScriptFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmScriptFilter) IdmScriptDto(eu.bcvsolutions.idm.core.api.dto.IdmScriptDto) AbstractBulkActionTest(eu.bcvsolutions.idm.test.api.AbstractBulkActionTest) Test(org.junit.Test)

Example 4 with IdmScriptFilter

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

the class DefaultRoleSynchronizationExecutorTest method testSyncRolesCatalogueByDn.

@Test
public /**
 * Test create role catalog by DN:
 *  "CN=WizardGroup01,OU=one,OU=two,OU=one,OU=WizardGroups,DC=kyblicek,DC=piskoviste,DC=bcv"
 *  "CN=WizardGroup02,OU=two,OU=one,OU=WizardGroups,DC=kyblicek,DC=piskoviste,DC=bcv"
 *  "CN=WizardGroup03,OU=one,OU=WizardGroups,DC=kyblicek,DC=piskoviste,DC=bcv"
 * 	"CN=WizardGroup04,OU=WizardGroups,DC=kyblicek,DC=piskoviste,DC=bcv"
 * 	"CN=WizardGroup05,OU=WizardGroups,DC=kyblicek,DC=piskoviste,DC=bcv"
 */
void testSyncRolesCatalogueByDn() {
    AbstractSysSyncConfigDto syncConfigCustom = createSyncConfig();
    SysSystemDto userSystem = helper.createTestResourceSystem(true);
    List<SysSystemMappingDto> userSystemMappings = systemMappingService.findBySystem(userSystem, SystemOperationType.PROVISIONING, SystemEntityType.IDENTITY);
    Assert.assertNotNull(userSystemMappings);
    Assert.assertEquals(1, userSystemMappings.size());
    SysSystemMappingDto userMappingDto = userSystemMappings.get(0);
    // Switch to the sync.
    userMappingDto.setOperationType(SystemOperationType.SYNCHRONIZATION);
    userMappingDto = systemMappingService.save(userMappingDto);
    List<SysSystemAttributeMappingDto> attributeMappingDtos = schemaAttributeMappingService.findBySystemMapping(userMappingDto);
    SysSystemAttributeMappingDto userEmailAttribute = attributeMappingDtos.stream().filter(attribute -> attribute.getName().equalsIgnoreCase(TestHelper.ATTRIBUTE_MAPPING_EMAIL)).findFirst().orElse(null);
    Assert.assertNotNull(userEmailAttribute);
    Assert.assertFalse(syncConfigService.isRunning(syncConfigCustom));
    Assert.assertTrue(syncConfigCustom instanceof SysSyncRoleConfigDto);
    SysSyncRoleConfigDto roleConfigDto = (SysSyncRoleConfigDto) syncConfigCustom;
    SysSystemMappingDto systemMappingDto = DtoUtils.getEmbedded(syncConfigCustom, SysSyncConfig_.systemMapping, SysSystemMappingDto.class);
    SysSchemaObjectClassDto schemaObjectClassDto = DtoUtils.getEmbedded(systemMappingDto, SysSystemMapping_.objectClass, SysSchemaObjectClassDto.class);
    UUID roleSystemId = schemaObjectClassDto.getSystem();
    Assert.assertNotNull(roleSystemId);
    SysSchemaAttributeFilter schemaAttributeFilter = new SysSchemaAttributeFilter();
    schemaAttributeFilter.setSystemId(roleSystemId);
    schemaAttributeFilter.setObjectClassId(schemaObjectClassDto.getId());
    SysSchemaAttributeDto schemaAttributeDto = schemaAttributeService.find(schemaAttributeFilter, null).getContent().stream().filter(attribute -> attribute.getName().equalsIgnoreCase("name")).findFirst().orElse(null);
    Assert.assertNotNull(schemaAttributeDto);
    SysSystemDto roleSystemDto = new SysSystemDto();
    roleSystemDto.setId(roleSystemId);
    List<SysSystemMappingDto> roleSystemMappings = systemMappingService.findBySystem(roleSystemDto, SystemOperationType.SYNCHRONIZATION, SystemEntityType.ROLE);
    Assert.assertNotNull(roleSystemMappings);
    Assert.assertEquals(1, roleSystemMappings.size());
    SysSystemMappingDto roleMappingDto = roleSystemMappings.get(0);
    // Use ACC script "resolveRoleCatalogueByDn".
    IdmScriptFilter scriptFilter = new IdmScriptFilter();
    scriptFilter.setCode(MsAdSyncMappingRoleAutoAttributesProcessor.RESOLVE_ROLE_CATALOG_BY_DN_SCRIPT);
    scriptFilter.setCategory(IdmScriptCategory.TRANSFORM_FROM);
    String catalogTransformationScript = null;
    IdmScriptDto scriptDto = scriptService.find(scriptFilter, null).getContent().stream().findFirst().orElse(null);
    if (scriptDto != null) {
        catalogTransformationScript = this.getPluginExecutors().getPluginFor(IdmScriptCategory.TRANSFORM_FROM).generateTemplate(scriptDto);
    }
    Assert.assertNotNull(catalogTransformationScript);
    // Create mapping attribute for get catalog.
    SysSystemAttributeMappingDto roleIdAttribute = new SysSystemAttributeMappingDto();
    roleIdAttribute.setEntityAttribute(true);
    roleIdAttribute.setUid(false);
    roleIdAttribute.setSystemMapping(roleMappingDto.getId());
    roleIdAttribute.setExtendedAttribute(false);
    roleIdAttribute.setIdmPropertyName(RoleSynchronizationExecutor.ROLE_CATALOGUE_FIELD);
    roleIdAttribute.setSchemaAttribute(schemaAttributeDto.getId());
    roleIdAttribute.setTransformFromResourceScript(catalogTransformationScript);
    roleIdAttribute.setName(helper.createName());
    roleIdAttribute = attributeMappingService.save(roleIdAttribute);
    IdmRoleCatalogueDto mainRoleCatalogue = getHelper().createRoleCatalogue();
    // Enable assign of role catalogue.
    roleConfigDto.setAssignCatalogueSwitch(true);
    roleConfigDto.setRemoveCatalogueRoleSwitch(false);
    roleConfigDto.setMainCatalogueRoleNode(mainRoleCatalogue.getId());
    syncConfigCustom = syncConfigService.save(roleConfigDto);
    // Init data - roles with DN.
    getBean().initDataRolesWithDn();
    // Start sync
    helper.startSynchronization(syncConfigCustom);
    // 
    SysSyncLogFilter logFilter = new SysSyncLogFilter();
    logFilter.setSynchronizationConfigId(syncConfigCustom.getId());
    List<SysSyncLogDto> logs = syncLogService.find(logFilter, null).getContent();
    Assert.assertEquals(1, logs.size());
    SysSyncLogDto log = logs.get(0);
    Assert.assertFalse(log.isRunning());
    Assert.assertFalse(log.isContainsError());
    helper.checkSyncLog(syncConfigCustom, SynchronizationActionType.CREATE_ENTITY, 5, OperationResultType.SUCCESS);
    // "CN=WizardGroup01,OU=one,OU=two,OU=one,OU=WizardGroups,DC=kyblicek,DC=piskoviste,DC=bcv"
    // "CN=WizardGroup02,OU=two,OU=one,OU=WizardGroups,DC=kyblicek,DC=piskoviste,DC=bcv"
    // "CN=WizardGroup03,OU=one,OU=WizardGroups,DC=kyblicek,DC=piskoviste,DC=bcv"
    // "CN=WizardGroup04,OU=WizardGroups,DC=kyblicek,DC=piskoviste,DC=bcv"
    // "CN=WizardGroup05,OU=WizardGroups,DC=kyblicek,DC=piskoviste,DC=bcv"
    // Check catalog structure:
    IdmRoleCatalogueDto wizardGroups = roleCatalogueService.getByCode("WizardGroups/" + mainRoleCatalogue.getCode());
    Assert.assertNotNull(wizardGroups);
    IdmRoleCatalogueDto one = roleCatalogueService.getByCode("one/WizardGroups/" + mainRoleCatalogue.getCode());
    Assert.assertNotNull(one);
    Assert.assertEquals(wizardGroups.getId(), one.getParent());
    IdmRoleCatalogueDto two = roleCatalogueService.getByCode("two/one/WizardGroups/" + mainRoleCatalogue.getCode());
    Assert.assertNotNull(two);
    Assert.assertEquals(one.getId(), two.getParent());
    IdmRoleCatalogueDto one2 = roleCatalogueService.getByCode("one/two/one/WizardGroups/" + mainRoleCatalogue.getCode());
    Assert.assertNotNull(one2);
    Assert.assertEquals(two.getId(), one2.getParent());
    IdmRoleCatalogueRoleFilter roleCatalogueRoleFilter = new IdmRoleCatalogueRoleFilter();
    roleCatalogueRoleFilter.setRoleCatalogueId(wizardGroups.getId());
    List<IdmRoleCatalogueRoleDto> roleCatalogRoles = roleCatalogueRoleService.find(roleCatalogueRoleFilter, null).getContent();
    Assert.assertEquals(2, roleCatalogRoles.size());
    Assert.assertTrue(roleCatalogRoles.stream().map(roleCatalogRole -> (IdmRoleDto) roleCatalogRole.getEmbedded().get(IdmRoleCatalogueRole_.role.getName())).anyMatch(role -> role.getCode().equals("CN=WizardGroup04,OU=WizardGroups,DC=kyblicek,DC=piskoviste,DC=bcv")));
    Assert.assertTrue(roleCatalogRoles.stream().map(roleCatalogRole -> (IdmRoleDto) roleCatalogRole.getEmbedded().get(IdmRoleCatalogueRole_.role.getName())).anyMatch(role -> role.getCode().equals("CN=WizardGroup05,OU=WizardGroups,DC=kyblicek,DC=piskoviste,DC=bcv")));
    roleCatalogueRoleFilter.setRoleCatalogueId(one.getId());
    roleCatalogRoles = roleCatalogueRoleService.find(roleCatalogueRoleFilter, null).getContent();
    Assert.assertEquals(1, roleCatalogRoles.size());
    Assert.assertTrue(roleCatalogRoles.stream().map(roleCatalogRole -> (IdmRoleDto) roleCatalogRole.getEmbedded().get(IdmRoleCatalogueRole_.role.getName())).anyMatch(role -> role.getCode().equals("CN=WizardGroup03,OU=one,OU=WizardGroups,DC=kyblicek,DC=piskoviste,DC=bcv")));
    roleCatalogueRoleFilter.setRoleCatalogueId(two.getId());
    roleCatalogRoles = roleCatalogueRoleService.find(roleCatalogueRoleFilter, null).getContent();
    Assert.assertEquals(1, roleCatalogRoles.size());
    Assert.assertTrue(roleCatalogRoles.stream().map(roleCatalogRole -> (IdmRoleDto) roleCatalogRole.getEmbedded().get(IdmRoleCatalogueRole_.role.getName())).anyMatch(role -> role.getCode().equals("CN=WizardGroup02,OU=two,OU=one,OU=WizardGroups,DC=kyblicek,DC=piskoviste,DC=bcv")));
    roleCatalogueRoleFilter.setRoleCatalogueId(one2.getId());
    roleCatalogRoles = roleCatalogueRoleService.find(roleCatalogueRoleFilter, null).getContent();
    Assert.assertEquals(1, roleCatalogRoles.size());
    Assert.assertTrue(roleCatalogRoles.stream().map(roleCatalogRole -> (IdmRoleDto) roleCatalogRole.getEmbedded().get(IdmRoleCatalogueRole_.role.getName())).anyMatch(role -> role.getCode().equals("CN=WizardGroup01,OU=one,OU=two,OU=one,OU=WizardGroups,DC=kyblicek,DC=piskoviste,DC=bcv")));
    AccRoleAccountFilter roleAccountFilter = new AccRoleAccountFilter();
    roleAccountFilter.setSystemId(roleSystemId);
    List<AccRoleAccountDto> roleAccountDtos = roleAccountService.find(roleAccountFilter, null).getContent();
    Assert.assertEquals(5, roleAccountDtos.size());
    roleAccountDtos.forEach(roleAccountDto -> {
        UUID roleId = roleAccountDto.getRole();
        IdmRoleCatalogueRoleFilter roleCatalogueFilter = new IdmRoleCatalogueRoleFilter();
        roleCatalogueFilter.setRoleId(roleId);
        List<IdmRoleCatalogueRoleDto> roleCatalogueRoleDtos = roleCatalogueRoleService.find(roleCatalogueFilter, null).getContent();
        Assert.assertEquals(1, roleCatalogueRoleDtos.size());
    });
    cleanAfterTest(syncConfigCustom, roleSystemId, log, roleAccountDtos);
}
Also used : OperationResultType(eu.bcvsolutions.idm.acc.domain.OperationResultType) IdmScriptCategory(eu.bcvsolutions.idm.core.api.domain.IdmScriptCategory) RoleType(eu.bcvsolutions.idm.core.api.domain.RoleType) DtoUtils(eu.bcvsolutions.idm.core.api.utils.DtoUtils) SysSchemaAttributeDto(eu.bcvsolutions.idm.acc.dto.SysSchemaAttributeDto) SysSyncConfig_(eu.bcvsolutions.idm.acc.entity.SysSyncConfig_) ZonedDateTime(java.time.ZonedDateTime) PluginRegistry(org.springframework.plugin.core.PluginRegistry) Autowired(org.springframework.beans.factory.annotation.Autowired) AccRoleAccountFilter(eu.bcvsolutions.idm.acc.dto.filter.AccRoleAccountFilter) SysRoleSystemService(eu.bcvsolutions.idm.acc.service.api.SysRoleSystemService) SynchronizationMissingEntityActionType(eu.bcvsolutions.idm.acc.domain.SynchronizationMissingEntityActionType) MsAdSyncMappingRoleAutoAttributesProcessor(eu.bcvsolutions.idm.acc.event.processor.MsAdSyncMappingRoleAutoAttributesProcessor) Map(java.util.Map) After(org.junit.After) SysSyncConfigService(eu.bcvsolutions.idm.acc.service.api.SysSyncConfigService) SynchronizationUnlinkedActionType(eu.bcvsolutions.idm.acc.domain.SynchronizationUnlinkedActionType) SysSyncLogService(eu.bcvsolutions.idm.acc.service.api.SysSyncLogService) AbstractSysSyncConfigDto(eu.bcvsolutions.idm.acc.dto.AbstractSysSyncConfigDto) AccRoleAccountDto(eu.bcvsolutions.idm.acc.dto.AccRoleAccountDto) IdmRoleCatalogueRoleFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmRoleCatalogueRoleFilter) SysSchemaAttributeFilter(eu.bcvsolutions.idm.acc.dto.filter.SysSchemaAttributeFilter) IdmScriptFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmScriptFilter) SystemOperationType(eu.bcvsolutions.idm.acc.domain.SystemOperationType) SysSchemaObjectClassDto(eu.bcvsolutions.idm.acc.dto.SysSchemaObjectClassDto) UUID(java.util.UUID) Page(org.springframework.data.domain.Page) ReconciliationMissingAccountActionType(eu.bcvsolutions.idm.acc.domain.ReconciliationMissingAccountActionType) Sets(com.google.common.collect.Sets) SysSyncIdentityConfigDto(eu.bcvsolutions.idm.acc.dto.SysSyncIdentityConfigDto) IdmRoleCatalogueService(eu.bcvsolutions.idm.core.api.service.IdmRoleCatalogueService) EventConfiguration(eu.bcvsolutions.idm.core.api.config.domain.EventConfiguration) List(java.util.List) Query(javax.persistence.Query) SysRoleSystemAttributeFilter(eu.bcvsolutions.idm.acc.dto.filter.SysRoleSystemAttributeFilter) SysRoleSystemDto(eu.bcvsolutions.idm.acc.dto.SysRoleSystemDto) IdmIdentityService(eu.bcvsolutions.idm.core.api.service.IdmIdentityService) TestResource(eu.bcvsolutions.idm.acc.entity.TestResource) RoleDeleteBulkAction(eu.bcvsolutions.idm.core.bulk.action.impl.role.RoleDeleteBulkAction) IdmRole(eu.bcvsolutions.idm.core.model.entity.IdmRole) SysSystemMapping_(eu.bcvsolutions.idm.acc.entity.SysSystemMapping_) OrderAwarePluginRegistry(org.springframework.plugin.core.OrderAwarePluginRegistry) IdmScriptService(eu.bcvsolutions.idm.core.api.service.IdmScriptService) AbstractBulkActionTest(eu.bcvsolutions.idm.test.api.AbstractBulkActionTest) HashMap(java.util.HashMap) IdmRoleCatalogueRole_(eu.bcvsolutions.idm.core.model.entity.IdmRoleCatalogueRole_) SysSystemDto(eu.bcvsolutions.idm.acc.dto.SysSystemDto) SysRoleSystemFilter(eu.bcvsolutions.idm.acc.dto.filter.SysRoleSystemFilter) SysSystemMappingService(eu.bcvsolutions.idm.acc.service.api.SysSystemMappingService) SynchronizationActionType(eu.bcvsolutions.idm.acc.domain.SynchronizationActionType) SystemEntityType(eu.bcvsolutions.idm.acc.domain.SystemEntityType) SynchronizationLinkedActionType(eu.bcvsolutions.idm.acc.domain.SynchronizationLinkedActionType) IdmRoleCatalogueRoleDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleCatalogueRoleDto) IdmIdentityContractDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityContractDto) IdmRoleCatalogueDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleCatalogueDto) Before(org.junit.Before) SysSystemMappingFilter(eu.bcvsolutions.idm.acc.dto.filter.SysSystemMappingFilter) SysRoleSystemAttributeService(eu.bcvsolutions.idm.acc.service.api.SysRoleSystemAttributeService) RoleProcessor(eu.bcvsolutions.idm.core.api.event.processor.RoleProcessor) IdmIdentityRoleService(eu.bcvsolutions.idm.core.api.service.IdmIdentityRoleService) IdmIdentityRoleFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmIdentityRoleFilter) SysSystemService(eu.bcvsolutions.idm.acc.service.api.SysSystemService) IdmIdentityDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto) IdmRoleService(eu.bcvsolutions.idm.core.api.service.IdmRoleService) SysSyncLogDto(eu.bcvsolutions.idm.acc.dto.SysSyncLogDto) IdmRoleCatalogueRoleService(eu.bcvsolutions.idm.core.api.service.IdmRoleCatalogueRoleService) Test(org.junit.Test) EntityManager(javax.persistence.EntityManager) AccRoleAccountService(eu.bcvsolutions.idm.acc.service.api.AccRoleAccountService) ApplicationContext(org.springframework.context.ApplicationContext) IdmScriptDto(eu.bcvsolutions.idm.core.api.dto.IdmScriptDto) SysRoleSystemAttributeDto(eu.bcvsolutions.idm.acc.dto.SysRoleSystemAttributeDto) AbstractScriptEvaluator(eu.bcvsolutions.idm.core.script.evaluator.AbstractScriptEvaluator) SysSchemaAttributeService(eu.bcvsolutions.idm.acc.service.api.SysSchemaAttributeService) SysSystemAttributeMappingFilter(eu.bcvsolutions.idm.acc.dto.filter.SysSystemAttributeMappingFilter) SysSyncRoleConfigDto(eu.bcvsolutions.idm.acc.dto.SysSyncRoleConfigDto) IdmBulkActionDto(eu.bcvsolutions.idm.core.api.bulk.action.dto.IdmBulkActionDto) IdmRoleDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleDto) SysSystemAttributeMappingDto(eu.bcvsolutions.idm.acc.dto.SysSystemAttributeMappingDto) SysSystemMappingDto(eu.bcvsolutions.idm.acc.dto.SysSystemMappingDto) TestRoleResource(eu.bcvsolutions.idm.acc.entity.TestRoleResource) SysSyncLogFilter(eu.bcvsolutions.idm.acc.dto.filter.SysSyncLogFilter) TestHelper(eu.bcvsolutions.idm.acc.TestHelper) Assert(org.junit.Assert) SysSystemAttributeMappingService(eu.bcvsolutions.idm.acc.service.api.SysSystemAttributeMappingService) Transactional(org.springframework.transaction.annotation.Transactional) IdmScriptFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmScriptFilter) SysSchemaAttributeDto(eu.bcvsolutions.idm.acc.dto.SysSchemaAttributeDto) SysSyncRoleConfigDto(eu.bcvsolutions.idm.acc.dto.SysSyncRoleConfigDto) AccRoleAccountDto(eu.bcvsolutions.idm.acc.dto.AccRoleAccountDto) SysSyncLogFilter(eu.bcvsolutions.idm.acc.dto.filter.SysSyncLogFilter) SysSchemaAttributeFilter(eu.bcvsolutions.idm.acc.dto.filter.SysSchemaAttributeFilter) UUID(java.util.UUID) SysSyncLogDto(eu.bcvsolutions.idm.acc.dto.SysSyncLogDto) IdmRoleCatalogueRoleFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmRoleCatalogueRoleFilter) IdmRoleCatalogueRoleDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleCatalogueRoleDto) SysSystemAttributeMappingDto(eu.bcvsolutions.idm.acc.dto.SysSystemAttributeMappingDto) AccRoleAccountFilter(eu.bcvsolutions.idm.acc.dto.filter.AccRoleAccountFilter) SysSystemMappingDto(eu.bcvsolutions.idm.acc.dto.SysSystemMappingDto) IdmRoleCatalogueDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleCatalogueDto) SysSystemDto(eu.bcvsolutions.idm.acc.dto.SysSystemDto) AbstractSysSyncConfigDto(eu.bcvsolutions.idm.acc.dto.AbstractSysSyncConfigDto) IdmScriptDto(eu.bcvsolutions.idm.core.api.dto.IdmScriptDto) SysSchemaObjectClassDto(eu.bcvsolutions.idm.acc.dto.SysSchemaObjectClassDto) AbstractBulkActionTest(eu.bcvsolutions.idm.test.api.AbstractBulkActionTest) Test(org.junit.Test)

Example 5 with IdmScriptFilter

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

the class IdmScriptController method toFilter.

@Override
protected IdmScriptFilter toFilter(MultiValueMap<String, Object> parameters) {
    IdmScriptFilter filter = new IdmScriptFilter(parameters);
    filter.setDescription(getParameterConverter().toString(parameters, "description"));
    filter.setCode(getParameterConverter().toString(parameters, "code"));
    filter.setUsedIn(getParameterConverter().toString(parameters, "usedIn"));
    filter.setCategory(getParameterConverter().toEnum(parameters, "category", IdmScriptCategory.class));
    filter.setInCategory(getParameterConverter().toEnums(parameters, "inCategory", IdmScriptCategory.class));
    // 
    return filter;
}
Also used : IdmScriptFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmScriptFilter) IdmScriptCategory(eu.bcvsolutions.idm.core.api.domain.IdmScriptCategory)

Aggregations

IdmScriptFilter (eu.bcvsolutions.idm.core.api.dto.filter.IdmScriptFilter)10 IdmScriptDto (eu.bcvsolutions.idm.core.api.dto.IdmScriptDto)9 AbstractBulkActionTest (eu.bcvsolutions.idm.test.api.AbstractBulkActionTest)8 Test (org.junit.Test)8 IdmBulkActionDto (eu.bcvsolutions.idm.core.api.bulk.action.dto.IdmBulkActionDto)6 UUID (java.util.UUID)6 AbstractSysSyncConfigDto (eu.bcvsolutions.idm.acc.dto.AbstractSysSyncConfigDto)3 AccRoleAccountDto (eu.bcvsolutions.idm.acc.dto.AccRoleAccountDto)3 SysSchemaAttributeDto (eu.bcvsolutions.idm.acc.dto.SysSchemaAttributeDto)3 SysSchemaObjectClassDto (eu.bcvsolutions.idm.acc.dto.SysSchemaObjectClassDto)3 SysSyncLogDto (eu.bcvsolutions.idm.acc.dto.SysSyncLogDto)3 SysSyncRoleConfigDto (eu.bcvsolutions.idm.acc.dto.SysSyncRoleConfigDto)3 SysSystemAttributeMappingDto (eu.bcvsolutions.idm.acc.dto.SysSystemAttributeMappingDto)3 SysSystemDto (eu.bcvsolutions.idm.acc.dto.SysSystemDto)3 SysSystemMappingDto (eu.bcvsolutions.idm.acc.dto.SysSystemMappingDto)3 AccRoleAccountFilter (eu.bcvsolutions.idm.acc.dto.filter.AccRoleAccountFilter)3 SysSchemaAttributeFilter (eu.bcvsolutions.idm.acc.dto.filter.SysSchemaAttributeFilter)3 SysSyncLogFilter (eu.bcvsolutions.idm.acc.dto.filter.SysSyncLogFilter)3 IdmIdentityDto (eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto)2 IdmRoleCatalogueDto (eu.bcvsolutions.idm.core.api.dto.IdmRoleCatalogueDto)2