use of eu.bcvsolutions.idm.ic.impl.IcConnectorInfoImpl in project CzechIdMng by bcvsolutions.
the class ConnIdIcConfigurationService method getAvailableLocalConnectors.
/**
* Return available local connectors for this IC implementation
*
* @return
*/
@Override
public Set<IcConnectorInfo> getAvailableLocalConnectors() {
LOG.info("Get Available local connectors - ConnId");
Set<IcConnectorInfo> localConnectorInfos = new HashSet<>();
List<ConnectorInfoManager> managers = findAllLocalConnectorManagers();
for (ConnectorInfoManager manager : managers) {
List<ConnectorInfo> infos = manager.getConnectorInfos();
if (infos == null) {
continue;
}
for (ConnectorInfo info : infos) {
ConnectorKey key = info.getConnectorKey();
if (key == null) {
continue;
}
IcConnectorKeyImpl keyDto = new IcConnectorKeyImpl(getFramework(), key.getBundleName(), key.getBundleVersion(), key.getConnectorName());
IcConnectorInfoImpl infoDto = new IcConnectorInfoImpl(info.getConnectorDisplayName(), info.getConnectorCategory(), keyDto);
localConnectorInfos.add(infoDto);
}
}
return localConnectorInfos;
}
use of eu.bcvsolutions.idm.ic.impl.IcConnectorInfoImpl in project CzechIdMng by bcvsolutions.
the class ConnIdIcConfigurationService method getAvailableRemoteConnectors.
@Override
public Set<IcConnectorInfo> getAvailableRemoteConnectors(IcConnectorServer server) {
Assert.notNull(server);
//
Set<IcConnectorInfo> result = new HashSet<>();
//
List<ConnectorInfo> infos = getAllRemoteConnectors(server);
for (ConnectorInfo info : infos) {
ConnectorKey key = info.getConnectorKey();
if (key == null) {
continue;
}
// transform
IcConnectorKeyImpl keyDto = new IcConnectorKeyImpl(getFramework(), key.getBundleName(), key.getBundleVersion(), key.getConnectorName());
IcConnectorInfoImpl infoDto = new IcConnectorInfoImpl(info.getConnectorDisplayName(), info.getConnectorCategory(), keyDto);
result.add(infoDto);
}
return result;
}
use of eu.bcvsolutions.idm.ic.impl.IcConnectorInfoImpl in project CzechIdMng by bcvsolutions.
the class CzechIdMIcConvertUtil method convertConnectorClass.
public static IcConnectorInfo convertConnectorClass(IcConnectorClass connectorAnnotation, Class<? extends IcConnector> clazz) {
IcConnectorKey key = new IcConnectorKeyImpl(connectorAnnotation.framework(), clazz.getName(), connectorAnnotation.version(), connectorAnnotation.name());
IcConnectorInfo info = new IcConnectorInfoImpl(MessageFormat.format("{0} {1}", connectorAnnotation.displayName(), connectorAnnotation.version()), connectorAnnotation.framework(), key);
return info;
}
Aggregations