Search in sources :

Example 61 with SystemEntityType

use of eu.bcvsolutions.idm.acc.domain.SystemEntityType in project CzechIdMng by bcvsolutions.

the class DefaultSysSystemAttributeMappingServiceTest method moreAttributesOnSchemaAttributeProvTest.

@Test(expected = ResultCodeException.class)
public void moreAttributesOnSchemaAttributeProvTest() {
    SystemEntityType entityType = SystemEntityType.IDENTITY;
    AttributeMappingStrategyType strategyType = AttributeMappingStrategyType.SET;
    SysSystemDto system = createSystem();
    SysSchemaObjectClassDto objectClass = createObjectClass(system);
    SysSystemMappingDto systemMapping = testHelper.createMappingSystem(entityType, objectClass);
    // For provisioning is NOT enabled more mapped attributes for one schema
    // attribute
    systemMapping.setOperationType(SystemOperationType.PROVISIONING);
    systemMapping = mappingService.save(systemMapping);
    SysSchemaAttributeDto schemaAttribute = createSchemaAttribute(objectClass);
    SysSystemAttributeMappingDto attributeMapping1 = createAttributeMappingSystem(systemMapping, strategyType, schemaAttribute.getId());
    attributeMapping1.setName("attributeOne");
    attributeMapping1 = attributeMappingService.save(attributeMapping1);
    SysSystemAttributeMappingDto attributeMapping2 = createAttributeMappingSystem(systemMapping, strategyType, schemaAttribute.getId());
    attributeMapping2.setName("attributeTwo");
    attributeMapping2 = attributeMappingService.save(attributeMapping2);
}
Also used : AttributeMappingStrategyType(eu.bcvsolutions.idm.acc.domain.AttributeMappingStrategyType) SysSchemaAttributeDto(eu.bcvsolutions.idm.acc.dto.SysSchemaAttributeDto) SysSystemAttributeMappingDto(eu.bcvsolutions.idm.acc.dto.SysSystemAttributeMappingDto) SystemEntityType(eu.bcvsolutions.idm.acc.domain.SystemEntityType) SysSystemMappingDto(eu.bcvsolutions.idm.acc.dto.SysSystemMappingDto) SysSchemaObjectClassDto(eu.bcvsolutions.idm.acc.dto.SysSchemaObjectClassDto) SysSystemDto(eu.bcvsolutions.idm.acc.dto.SysSystemDto) AbstractIntegrationTest(eu.bcvsolutions.idm.test.api.AbstractIntegrationTest) Test(org.junit.Test)

Example 62 with SystemEntityType

use of eu.bcvsolutions.idm.acc.domain.SystemEntityType in project CzechIdMng by bcvsolutions.

the class DefaultSysSystemAttributeMappingServiceTest method systemMappingIdFilterTest.

@Test
public void systemMappingIdFilterTest() {
    IdmBasePermission permission = IdmBasePermission.ADMIN;
    SystemEntityType entityType = SystemEntityType.IDENTITY;
    AttributeMappingStrategyType strategyType = AttributeMappingStrategyType.MERGE;
    SysSystemDto system = createSystem();
    SysSchemaObjectClassDto objectClass = createObjectClass(system);
    SysSystemMappingDto systemMapping1 = testHelper.createMappingSystem(entityType, objectClass);
    SysSystemMappingDto systemMapping2 = testHelper.createMappingSystem(entityType, objectClass);
    SysSchemaAttributeDto schemaAttribute = createSchemaAttribute(objectClass);
    SysSystemAttributeMappingDto attributeMapping1 = createAttributeMappingSystem(systemMapping1, strategyType, schemaAttribute.getId());
    SysSystemAttributeMappingDto attributeMapping2 = createAttributeMappingSystem(systemMapping2, strategyType, schemaAttribute.getId());
    SysSystemAttributeMappingFilter filter = new SysSystemAttributeMappingFilter();
    filter.setSystemMappingId(systemMapping1.getId());
    Page<SysSystemAttributeMappingDto> result = attributeMappingService.find(filter, null, permission);
    assertEquals(1, result.getTotalElements());
    assertTrue(result.getContent().contains(attributeMapping1));
    assertFalse(result.getContent().contains(attributeMapping2));
}
Also used : SysSystemAttributeMappingFilter(eu.bcvsolutions.idm.acc.dto.filter.SysSystemAttributeMappingFilter) AttributeMappingStrategyType(eu.bcvsolutions.idm.acc.domain.AttributeMappingStrategyType) SysSchemaAttributeDto(eu.bcvsolutions.idm.acc.dto.SysSchemaAttributeDto) SysSystemAttributeMappingDto(eu.bcvsolutions.idm.acc.dto.SysSystemAttributeMappingDto) IdmBasePermission(eu.bcvsolutions.idm.core.security.api.domain.IdmBasePermission) SystemEntityType(eu.bcvsolutions.idm.acc.domain.SystemEntityType) SysSystemMappingDto(eu.bcvsolutions.idm.acc.dto.SysSystemMappingDto) SysSchemaObjectClassDto(eu.bcvsolutions.idm.acc.dto.SysSchemaObjectClassDto) SysSystemDto(eu.bcvsolutions.idm.acc.dto.SysSystemDto) AbstractIntegrationTest(eu.bcvsolutions.idm.test.api.AbstractIntegrationTest) Test(org.junit.Test)

Example 63 with SystemEntityType

use of eu.bcvsolutions.idm.acc.domain.SystemEntityType in project CzechIdMng by bcvsolutions.

the class AbstractProvisioningExecutor method doInternalProvisioning.

@Override
public SysProvisioningOperationDto doInternalProvisioning(AccAccountDto account, DTO dto, boolean isDryRun) {
    Assert.notNull(account, "Account is required.");
    Assert.notNull(dto, "DTO is required.");
    // 
    ProvisioningOperationType operationType;
    SysSystemDto system = DtoUtils.getEmbedded(account, AccAccount_.system);
    SysSystemEntityDto systemEntity = getSystemEntity(account);
    SystemEntityType entityType = SystemEntityType.getByClass(dto.getClass());
    String uid = account.getUid();
    // 
    if (systemEntity == null) {
        // prepare system entity - uid could be changed by provisioning, but
        // we need to link her with account
        // First we try find system entity with same uid.
        systemEntity = systemEntityService.getBySystemAndEntityTypeAndUid(system, entityType, uid);
        if (systemEntity == null) {
            systemEntity = new SysSystemEntityDto();
            systemEntity.setEntityType(entityType);
            systemEntity.setSystem(system.getId());
            systemEntity.setUid(uid);
            systemEntity.setWish(true);
            systemEntity = systemEntityService.save(systemEntity);
        }
        account.setSystemEntity(systemEntity.getId());
        account = accountService.save(account);
        // we wont create account, but after target system call can be
        // switched to UPDATE
        operationType = ProvisioningOperationType.CREATE;
    } else {
        // we wont update account, but after target system call can be
        // switched to CREATE
        operationType = ProvisioningOperationType.UPDATE;
    }
    List<AttributeMapping> finalAttributes = resolveMappedAttributes(account, dto, system, systemEntity.getEntityType());
    if (CollectionUtils.isEmpty(finalAttributes)) {
        // nothing to do - mapping is empty
        return null;
    }
    return doProvisioning(systemEntity, dto, dto.getId(), operationType, finalAttributes, isDryRun);
}
Also used : ProvisioningOperationType(eu.bcvsolutions.idm.acc.domain.ProvisioningOperationType) SysSystemAttributeMapping(eu.bcvsolutions.idm.acc.entity.SysSystemAttributeMapping) AttributeMapping(eu.bcvsolutions.idm.acc.domain.AttributeMapping) SystemEntityType(eu.bcvsolutions.idm.acc.domain.SystemEntityType) GuardedString(eu.bcvsolutions.idm.core.security.api.domain.GuardedString) SysSystemEntityDto(eu.bcvsolutions.idm.acc.dto.SysSystemEntityDto) SysSystemDto(eu.bcvsolutions.idm.acc.dto.SysSystemDto)

Example 64 with SystemEntityType

use of eu.bcvsolutions.idm.acc.domain.SystemEntityType in project CzechIdMng by bcvsolutions.

the class DefaultSysSystemAttributeMappingService method getControlledAttributeValues.

@Override
public List<Serializable> getControlledAttributeValues(UUID systemId, SystemEntityType entityType, String schemaAttributeName) {
    Assert.notNull(systemId, "System ID is mandatory for get controlled values!");
    Assert.notNull(entityType, "Entity type is mandatory for get controlled values!");
    Assert.notNull(schemaAttributeName, "Schema attribute name is mandatory for get controlled values!");
    SysSystemMappingDto mapping = systemMappingService.findProvisioningMapping(systemId, entityType);
    Assert.notNull(mapping, "System provisioning mapping is mandatory for search controlled attribute values!");
    List<Serializable> results = Lists.newArrayList();
    // Obtains controlled values from role-attributes
    SysRoleSystemAttributeFilter roleSystemAttributeFilter = new SysRoleSystemAttributeFilter();
    roleSystemAttributeFilter.setSystemMappingId(mapping.getId());
    roleSystemAttributeFilter.setSchemaAttributeName(schemaAttributeName);
    List<SysRoleSystemAttributeDto> roleSystemAttributes = roleSystemAttributeService.find(roleSystemAttributeFilter, null).getContent();
    // We need values for merge and enabled attributes only
    roleSystemAttributes.stream().filter(roleSystemAttr -> // 
    AttributeMappingStrategyType.MERGE == roleSystemAttr.getStrategyType() && // 
    !roleSystemAttr.isDisabledAttribute()).forEach(roleSystemAttr -> {
        // 
        Serializable value = getControlledValue(roleSystemAttr, systemId, schemaAttributeName);
        if (value != null && !results.contains(value)) {
            results.add(value);
        }
    });
    return results;
}
Also used : SysRoleSystemAttributeFilter(eu.bcvsolutions.idm.acc.dto.filter.SysRoleSystemAttributeFilter) IdmScriptCategory(eu.bcvsolutions.idm.core.api.domain.IdmScriptCategory) DtoUtils(eu.bcvsolutions.idm.core.api.utils.DtoUtils) IdmFormAttributeDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormAttributeDto) PluginRegistry(org.springframework.plugin.core.PluginRegistry) Autowired(org.springframework.beans.factory.annotation.Autowired) FormService(eu.bcvsolutions.idm.core.eav.api.service.FormService) SysSystemAttributeMapping_(eu.bcvsolutions.idm.acc.entity.SysSystemAttributeMapping_) GroovyScriptService(eu.bcvsolutions.idm.core.api.service.GroovyScriptService) SysSchemaAttribute(eu.bcvsolutions.idm.acc.entity.SysSchemaAttribute) Predicate(javax.persistence.criteria.Predicate) Map(java.util.Map) CriteriaBuilder(javax.persistence.criteria.CriteriaBuilder) AbstractSysSyncConfigDto(eu.bcvsolutions.idm.acc.dto.AbstractSysSyncConfigDto) SysSystemAttributeMapping(eu.bcvsolutions.idm.acc.entity.SysSystemAttributeMapping) CriteriaQuery(javax.persistence.criteria.CriteriaQuery) AbstractEntity_(eu.bcvsolutions.idm.core.api.entity.AbstractEntity_) SystemOperationType(eu.bcvsolutions.idm.acc.domain.SystemOperationType) IntrospectionException(java.beans.IntrospectionException) Serializable(java.io.Serializable) InvocationTargetException(java.lang.reflect.InvocationTargetException) IOUtils(org.apache.commons.io.IOUtils) AttributeMapping(eu.bcvsolutions.idm.acc.domain.AttributeMapping) SysSyncConfigRepository(eu.bcvsolutions.idm.acc.repository.SysSyncConfigRepository) SysRoleSystemAttributeFilter(eu.bcvsolutions.idm.acc.dto.filter.SysRoleSystemAttributeFilter) GuardedString(eu.bcvsolutions.idm.core.security.api.domain.GuardedString) AccResultCode(eu.bcvsolutions.idm.acc.domain.AccResultCode) MappingContext(eu.bcvsolutions.idm.acc.domain.MappingContext) IcConnectorFacade(eu.bcvsolutions.idm.ic.service.api.IcConnectorFacade) SysSystemMapping_(eu.bcvsolutions.idm.acc.entity.SysSystemMapping_) SysSystemGroupSystemFilter(eu.bcvsolutions.idm.acc.dto.filter.SysSystemGroupSystemFilter) IdmAttachmentDto(eu.bcvsolutions.idm.core.ecm.api.dto.IdmAttachmentDto) SysAttributeControlledValueDto(eu.bcvsolutions.idm.acc.dto.SysAttributeControlledValueDto) BooleanUtils(org.apache.commons.lang3.BooleanUtils) SysAttributeControlledValueFilter(eu.bcvsolutions.idm.acc.dto.filter.SysAttributeControlledValueFilter) ArrayList(java.util.ArrayList) LinkedHashMap(java.util.LinkedHashMap) AbstractDto(eu.bcvsolutions.idm.core.api.dto.AbstractDto) Lists(com.google.common.collect.Lists) Service(org.springframework.stereotype.Service) Root(javax.persistence.criteria.Root) SysRoleSystemAttributeService(eu.bcvsolutions.idm.acc.service.api.SysRoleSystemAttributeService) SysSchemaObjectClass_(eu.bcvsolutions.idm.acc.entity.SysSchemaObjectClass_) CoreException(eu.bcvsolutions.idm.core.api.exception.CoreException) Throwables(com.google.common.base.Throwables) IOException(java.io.IOException) IcAttribute(eu.bcvsolutions.idm.ic.api.IcAttribute) AbstractScriptEvaluator(eu.bcvsolutions.idm.core.script.evaluator.AbstractScriptEvaluator) IdmRoleDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleDto) CoreResultCode(eu.bcvsolutions.idm.core.api.domain.CoreResultCode) SysSystemAttributeMappingDto(eu.bcvsolutions.idm.acc.dto.SysSystemAttributeMappingDto) Subquery(javax.persistence.criteria.Subquery) AuthorizableType(eu.bcvsolutions.idm.core.security.api.dto.AuthorizableType) SysSystemAttributeMappingRepository(eu.bcvsolutions.idm.acc.repository.SysSystemAttributeMappingRepository) FormPropertyManager(eu.bcvsolutions.idm.acc.service.api.FormPropertyManager) SysSchemaAttributeDto(eu.bcvsolutions.idm.acc.dto.SysSchemaAttributeDto) ProvisioningException(eu.bcvsolutions.idm.acc.exception.ProvisioningException) IdmFormValueDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormValueDto) SysSchemaAttribute_(eu.bcvsolutions.idm.acc.entity.SysSchemaAttribute_) ResultCodeException(eu.bcvsolutions.idm.core.api.exception.ResultCodeException) BasePermission(eu.bcvsolutions.idm.core.security.api.domain.BasePermission) SysSchemaObjectClass(eu.bcvsolutions.idm.acc.entity.SysSchemaObjectClass) IdmFormAttributeService(eu.bcvsolutions.idm.core.eav.api.service.IdmFormAttributeService) SysSyncConfigService(eu.bcvsolutions.idm.acc.service.api.SysSyncConfigService) ImmutableMap(com.google.common.collect.ImmutableMap) SysSchemaObjectClassDto(eu.bcvsolutions.idm.acc.dto.SysSchemaObjectClassDto) UUID(java.util.UUID) Collectors(java.util.stream.Collectors) List(java.util.List) SysRoleSystemAttributeRepository(eu.bcvsolutions.idm.acc.repository.SysRoleSystemAttributeRepository) ExceptionUtils(eu.bcvsolutions.idm.core.api.utils.ExceptionUtils) Optional(java.util.Optional) Identifiable(eu.bcvsolutions.idm.core.api.domain.Identifiable) SysRoleSystemDto(eu.bcvsolutions.idm.acc.dto.SysRoleSystemDto) SysSchemaObjectClassService(eu.bcvsolutions.idm.acc.service.api.SysSchemaObjectClassService) OrderAwarePluginRegistry(org.springframework.plugin.core.OrderAwarePluginRegistry) AttributeMappingStrategyType(eu.bcvsolutions.idm.acc.domain.AttributeMappingStrategyType) SysRoleSystem_(eu.bcvsolutions.idm.acc.entity.SysRoleSystem_) IcPasswordAttributeImpl(eu.bcvsolutions.idm.ic.impl.IcPasswordAttributeImpl) HashMap(java.util.HashMap) SysSystemDto(eu.bcvsolutions.idm.acc.dto.SysSystemDto) SysRoleSystemAttribute_(eu.bcvsolutions.idm.acc.entity.SysRoleSystemAttribute_) IdmAttachmentWithDataDto(eu.bcvsolutions.idm.acc.domain.IdmAttachmentWithDataDto) MessageFormat(java.text.MessageFormat) PersistentType(eu.bcvsolutions.idm.core.eav.api.domain.PersistentType) SysSystemMappingService(eu.bcvsolutions.idm.acc.service.api.SysSystemMappingService) ConfidentialStorage(eu.bcvsolutions.idm.core.api.service.ConfidentialStorage) SystemEntityType(eu.bcvsolutions.idm.acc.domain.SystemEntityType) EntityUtils(eu.bcvsolutions.idm.core.api.utils.EntityUtils) SysSystemMapping(eu.bcvsolutions.idm.acc.entity.SysSystemMapping) AbstractReadWriteDtoService(eu.bcvsolutions.idm.core.api.service.AbstractReadWriteDtoService) IdmExportImportDto(eu.bcvsolutions.idm.core.api.dto.IdmExportImportDto) IcAttributeImpl(eu.bcvsolutions.idm.ic.impl.IcAttributeImpl) SysSystemGroupSystemService(eu.bcvsolutions.idm.acc.service.api.SysSystemGroupSystemService) AttachmentManager(eu.bcvsolutions.idm.core.ecm.api.service.AttachmentManager) SysAttributeControlledValueService(eu.bcvsolutions.idm.acc.service.api.SysAttributeControlledValueService) SysSyncRoleConfig_(eu.bcvsolutions.idm.acc.entity.SysSyncRoleConfig_) SysRoleSystemAttributeDto(eu.bcvsolutions.idm.acc.dto.SysRoleSystemAttributeDto) SysSchemaAttributeService(eu.bcvsolutions.idm.acc.service.api.SysSchemaAttributeService) SysSystemAttributeMappingFilter(eu.bcvsolutions.idm.acc.dto.filter.SysSystemAttributeMappingFilter) IdmFormDefinitionService(eu.bcvsolutions.idm.core.eav.api.service.IdmFormDefinitionService) SysSystemMappingDto(eu.bcvsolutions.idm.acc.dto.SysSystemMappingDto) SysSystemAttributeMappingService(eu.bcvsolutions.idm.acc.service.api.SysSystemAttributeMappingService) InputStream(java.io.InputStream) Transactional(org.springframework.transaction.annotation.Transactional) Assert(org.springframework.util.Assert) StringUtils(org.springframework.util.StringUtils) Serializable(java.io.Serializable) SysSystemMappingDto(eu.bcvsolutions.idm.acc.dto.SysSystemMappingDto) SysRoleSystemAttributeDto(eu.bcvsolutions.idm.acc.dto.SysRoleSystemAttributeDto)

Example 65 with SystemEntityType

use of eu.bcvsolutions.idm.acc.domain.SystemEntityType in project CzechIdMng by bcvsolutions.

the class DefaultSysProvisioningArchiveService method toPredicates.

@Override
protected List<Predicate> toPredicates(Root<SysProvisioningArchive> root, CriteriaQuery<?> query, CriteriaBuilder builder, SysProvisioningOperationFilter filter) {
    List<Predicate> predicates = super.toPredicates(root, query, builder, filter);
    // quick - "fulltext"
    if (StringUtils.isNotEmpty(filter.getText())) {
        throw new ResultCodeException(CoreResultCode.BAD_FILTER, "Filter by text is not supported.");
    }
    // System Id
    UUID systemId = filter.getSystemId();
    if (systemId != null) {
        predicates.add(builder.equal(root.get(SysProvisioningArchive_.system).get(SysSystem_.id), systemId));
    }
    // From
    ZonedDateTime from = filter.getFrom();
    if (from != null) {
        predicates.add(builder.greaterThanOrEqualTo(root.get(SysProvisioningArchive_.created), from));
    }
    // Till
    ZonedDateTime till = filter.getTill();
    if (till != null) {
        predicates.add(builder.lessThanOrEqualTo(root.get(SysProvisioningArchive_.created), till));
    }
    // Operation type
    ProvisioningEventType operationType = filter.getOperationType();
    if (operationType != null) {
        predicates.add(builder.equal(root.get(SysProvisioningArchive_.operationType), operationType));
    }
    // Entity type
    SystemEntityType entityType = filter.getEntityType();
    if (entityType != null) {
        predicates.add(builder.equal(root.get(SysProvisioningArchive_.entityType), entityType));
    }
    // Entity identifier
    UUID entityIdentifier = filter.getEntityIdentifier();
    if (entityIdentifier != null) {
        predicates.add(builder.equal(root.get(SysProvisioningArchive_.entityIdentifier), entityIdentifier));
    }
    // System entity
    if (filter.getSystemEntity() != null) {
        throw new ResultCodeException(CoreResultCode.BAD_FILTER, "Filter by system entity identifier is not supported. Use system entity uid filter.");
    }
    // System entity UID
    String systemEntityUid = filter.getSystemEntityUid();
    if (StringUtils.isNotEmpty(systemEntityUid)) {
        predicates.add(builder.equal(root.get(SysProvisioningArchive_.systemEntityUid), systemEntityUid));
    }
    // Operation result and his state
    OperationState resultState = filter.getResultState();
    if (resultState != null) {
        predicates.add(builder.equal(root.get(SysProvisioningArchive_.result).get(OperationResultDto.PROPERTY_STATE), resultState));
    }
    // Batch id
    if (filter.getBatchId() != null) {
        throw new UnsupportedOperationException("Filter by batch identifier is not supported in archive.");
    }
    // Role-request ID
    UUID roleRequestId = filter.getRoleRequestId();
    if (roleRequestId != null) {
        predicates.add(builder.equal(root.get(SysProvisioningArchive_.roleRequestId), roleRequestId));
    }
    // updated attributes
    List<String> attributeUpdated = filter.getAttributeUpdated();
    if (!CollectionUtils.isEmpty(attributeUpdated)) {
        Subquery<SysProvisioningAttribute> subquery = query.subquery(SysProvisioningAttribute.class);
        Root<SysProvisioningAttribute> subRoot = subquery.from(SysProvisioningAttribute.class);
        subquery.select(subRoot);
        subquery.where(builder.and(// correlation attr
        builder.equal(subRoot.get(SysProvisioningAttribute_.provisioningId), root.get(SysProvisioningArchive_.id)), subRoot.get(SysProvisioningAttribute_.name).in(attributeUpdated), builder.isFalse(subRoot.get(SysProvisioningAttribute_.removed))));
        predicates.add(builder.exists(subquery));
    }
    // removed attributes
    List<String> attributeRemoved = filter.getAttributeRemoved();
    if (!CollectionUtils.isEmpty(attributeRemoved)) {
        Subquery<SysProvisioningAttribute> subquery = query.subquery(SysProvisioningAttribute.class);
        Root<SysProvisioningAttribute> subRoot = subquery.from(SysProvisioningAttribute.class);
        subquery.select(subRoot);
        subquery.where(builder.and(// correlation attr
        builder.equal(subRoot.get(SysProvisioningAttribute_.provisioningId), root.get(SysProvisioningArchive_.id)), subRoot.get(SysProvisioningAttribute_.name).in(attributeRemoved), builder.isTrue(subRoot.get(SysProvisioningAttribute_.removed))));
        predicates.add(builder.exists(subquery));
    }
    // empty provisioning
    Boolean emptyProvisioning = filter.getEmptyProvisioning();
    if (emptyProvisioning != null) {
        Subquery<SysProvisioningAttribute> subquery = query.subquery(SysProvisioningAttribute.class);
        Root<SysProvisioningAttribute> subRoot = subquery.from(SysProvisioningAttribute.class);
        subquery.select(subRoot);
        subquery.where(// correlation attr)
        builder.and(builder.equal(subRoot.get(SysProvisioningAttribute_.provisioningId), root.get(SysProvisioningArchive_.id))));
        // 
        // has attributes
        Predicate provisioningPredicate = builder.exists(subquery);
        if (emptyProvisioning) {
            provisioningPredicate = builder.and(// empty
            builder.not(provisioningPredicate), // delete operations are not considered as empty
            builder.notEqual(root.get(SysProvisioningArchive_.operationType), ProvisioningEventType.DELETE));
        } else {
            // delete operations are not considered as empty or filled => show all time
            provisioningPredicate = builder.or(provisioningPredicate, builder.equal(root.get(SysProvisioningArchive_.operationType), ProvisioningEventType.DELETE));
        }
        predicates.add(provisioningPredicate);
    }
    if (filter.getEmptyProvisioningType() != null) {
        throw new UnsupportedOperationException("Filter by empty provisioning type is not supported in archive. Use 'emptyProvisioning' parameter instead.");
    }
    // 
    return predicates;
}
Also used : ProvisioningEventType(eu.bcvsolutions.idm.acc.domain.ProvisioningEventType) ResultCodeException(eu.bcvsolutions.idm.core.api.exception.ResultCodeException) SystemEntityType(eu.bcvsolutions.idm.acc.domain.SystemEntityType) Predicate(javax.persistence.criteria.Predicate) SysProvisioningAttribute(eu.bcvsolutions.idm.acc.entity.SysProvisioningAttribute) ZonedDateTime(java.time.ZonedDateTime) UUID(java.util.UUID) OperationState(eu.bcvsolutions.idm.core.api.domain.OperationState)

Aggregations

SystemEntityType (eu.bcvsolutions.idm.acc.domain.SystemEntityType)71 SysSystemDto (eu.bcvsolutions.idm.acc.dto.SysSystemDto)51 AbstractIntegrationTest (eu.bcvsolutions.idm.test.api.AbstractIntegrationTest)36 Test (org.junit.Test)36 SysSystemMappingDto (eu.bcvsolutions.idm.acc.dto.SysSystemMappingDto)28 IdmBasePermission (eu.bcvsolutions.idm.core.security.api.domain.IdmBasePermission)28 SysSchemaObjectClassDto (eu.bcvsolutions.idm.acc.dto.SysSchemaObjectClassDto)26 SysSystemAttributeMappingDto (eu.bcvsolutions.idm.acc.dto.SysSystemAttributeMappingDto)21 SysProvisioningOperationFilter (eu.bcvsolutions.idm.acc.dto.filter.SysProvisioningOperationFilter)17 UUID (java.util.UUID)17 AccAccountDto (eu.bcvsolutions.idm.acc.dto.AccAccountDto)15 SysSyncActionLogDto (eu.bcvsolutions.idm.acc.dto.SysSyncActionLogDto)15 SysSyncLogDto (eu.bcvsolutions.idm.acc.dto.SysSyncLogDto)15 GuardedString (eu.bcvsolutions.idm.core.security.api.domain.GuardedString)15 SysSyncItemLogDto (eu.bcvsolutions.idm.acc.dto.SysSyncItemLogDto)13 AbstractSysSyncConfigDto (eu.bcvsolutions.idm.acc.dto.AbstractSysSyncConfigDto)11 SysSchemaAttributeDto (eu.bcvsolutions.idm.acc.dto.SysSchemaAttributeDto)11 ProvisioningException (eu.bcvsolutions.idm.acc.exception.ProvisioningException)11 AttributeMappingStrategyType (eu.bcvsolutions.idm.acc.domain.AttributeMappingStrategyType)10 SysProvisioningArchiveDto (eu.bcvsolutions.idm.acc.dto.SysProvisioningArchiveDto)10