Search in sources :

Example 6 with VsVirtualConnector

use of eu.bcvsolutions.idm.vs.connector.api.VsVirtualConnector in project CzechIdMng by bcvsolutions.

the class SystemSaveProcessor method conditional.

@Override
public boolean conditional(EntityEvent<SysSystemDto> event) {
    // We want execute this processor only for virtual system
    SysSystemDto system = event.getContent();
    Assert.notNull(system, "System is required.");
    Assert.notNull(system.getId(), "System identifier is required.");
    if (system.getConnectorKey() == null) {
        return false;
    }
    String connectorKey = system.getConnectorKey().getFullName();
    IcConnectorInfo connectorInfo = vsSystemService.getConnectorInfo(connectorKey);
    if (connectorInfo == null) {
        return false;
    }
    IcConnector connectorInstance = vsSystemService.getConnectorInstance(system.getId(), connectorInfo);
    if (connectorInstance instanceof VsVirtualConnector) {
        return true;
    }
    return false;
}
Also used : IcConnectorInfo(eu.bcvsolutions.idm.ic.api.IcConnectorInfo) IcConnector(eu.bcvsolutions.idm.ic.api.IcConnector) VsVirtualConnector(eu.bcvsolutions.idm.vs.connector.api.VsVirtualConnector) SysSystemDto(eu.bcvsolutions.idm.acc.dto.SysSystemDto)

Aggregations

VsVirtualConnector (eu.bcvsolutions.idm.vs.connector.api.VsVirtualConnector)6 SysSystemDto (eu.bcvsolutions.idm.acc.dto.SysSystemDto)4 IcConnectorInfo (eu.bcvsolutions.idm.ic.api.IcConnectorInfo)4 IcConnector (eu.bcvsolutions.idm.ic.api.IcConnector)3 IcException (eu.bcvsolutions.idm.ic.exception.IcException)3 Transactional (org.springframework.transaction.annotation.Transactional)3 SysConnectorKeyDto (eu.bcvsolutions.idm.acc.dto.SysConnectorKeyDto)2 UUID (java.util.UUID)2 ImmutableMap (com.google.common.collect.ImmutableMap)1 SystemEntityType (eu.bcvsolutions.idm.acc.domain.SystemEntityType)1 AccAccountDto (eu.bcvsolutions.idm.acc.dto.AccAccountDto)1 SysAttributeDifferenceDto (eu.bcvsolutions.idm.acc.dto.SysAttributeDifferenceDto)1 SysSchemaObjectClassDto (eu.bcvsolutions.idm.acc.dto.SysSchemaObjectClassDto)1 SysSyncIdentityConfigDto (eu.bcvsolutions.idm.acc.dto.SysSyncIdentityConfigDto)1 SysSystemAttributeMappingDto (eu.bcvsolutions.idm.acc.dto.SysSystemAttributeMappingDto)1 SysSystemMappingDto (eu.bcvsolutions.idm.acc.dto.SysSystemMappingDto)1 SysSystem_ (eu.bcvsolutions.idm.acc.entity.SysSystem_)1 AccAccountService (eu.bcvsolutions.idm.acc.service.api.AccAccountService)1 SynchronizationEntityExecutor (eu.bcvsolutions.idm.acc.service.api.SynchronizationEntityExecutor)1 SysProvisioningArchiveService (eu.bcvsolutions.idm.acc.service.api.SysProvisioningArchiveService)1