Search in sources :

Example 1 with SynchronizationEntityExecutor

use of eu.bcvsolutions.idm.acc.service.api.SynchronizationEntityExecutor in project CzechIdMng by bcvsolutions.

the class DefaultSynchronizationService method process.

/**
 * Called from long running task
 */
@Override
public AbstractSysSyncConfigDto process() {
    AbstractSysSyncConfigDto config = synchronizationConfigService.get(synchronizationConfigId);
    // 
    if (config == null) {
        throw new ProvisioningException(AccResultCode.SYNCHRONIZATION_NOT_FOUND, ImmutableMap.of("id", synchronizationConfigId));
    }
    SysSystemMappingDto mapping = systemMappingService.get(config.getSystemMapping());
    Assert.notNull(mapping);
    SystemEntityType entityType = mapping.getEntityType();
    SynchronizationEntityExecutor executor = getSyncExecutor(entityType);
    executor.setLongRunningTaskExecutor(this);
    return executor.process(synchronizationConfigId);
}
Also used : SynchronizationEntityExecutor(eu.bcvsolutions.idm.acc.service.api.SynchronizationEntityExecutor) AbstractSysSyncConfigDto(eu.bcvsolutions.idm.acc.dto.AbstractSysSyncConfigDto) ProvisioningException(eu.bcvsolutions.idm.acc.exception.ProvisioningException) SystemEntityType(eu.bcvsolutions.idm.acc.domain.SystemEntityType) SysSystemMappingDto(eu.bcvsolutions.idm.acc.dto.SysSystemMappingDto)

Aggregations

SystemEntityType (eu.bcvsolutions.idm.acc.domain.SystemEntityType)1 AbstractSysSyncConfigDto (eu.bcvsolutions.idm.acc.dto.AbstractSysSyncConfigDto)1 SysSystemMappingDto (eu.bcvsolutions.idm.acc.dto.SysSystemMappingDto)1 ProvisioningException (eu.bcvsolutions.idm.acc.exception.ProvisioningException)1 SynchronizationEntityExecutor (eu.bcvsolutions.idm.acc.service.api.SynchronizationEntityExecutor)1