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;
}
Aggregations