Search in sources :

Example 1 with IcConnectorInfoImpl

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;
}
Also used : IcConnectorKeyImpl(eu.bcvsolutions.idm.ic.impl.IcConnectorKeyImpl) IcConnectorInfoImpl(eu.bcvsolutions.idm.ic.impl.IcConnectorInfoImpl) ConnectorKey(org.identityconnectors.framework.api.ConnectorKey) IcConnectorInfo(eu.bcvsolutions.idm.ic.api.IcConnectorInfo) ConnectorInfo(org.identityconnectors.framework.api.ConnectorInfo) IcConnectorInfo(eu.bcvsolutions.idm.ic.api.IcConnectorInfo) ConnectorInfoManager(org.identityconnectors.framework.api.ConnectorInfoManager) HashSet(java.util.HashSet)

Example 2 with IcConnectorInfoImpl

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;
}
Also used : IcConnectorKeyImpl(eu.bcvsolutions.idm.ic.impl.IcConnectorKeyImpl) IcConnectorInfoImpl(eu.bcvsolutions.idm.ic.impl.IcConnectorInfoImpl) ConnectorKey(org.identityconnectors.framework.api.ConnectorKey) IcConnectorInfo(eu.bcvsolutions.idm.ic.api.IcConnectorInfo) ConnectorInfo(org.identityconnectors.framework.api.ConnectorInfo) IcConnectorInfo(eu.bcvsolutions.idm.ic.api.IcConnectorInfo) HashSet(java.util.HashSet)

Example 3 with IcConnectorInfoImpl

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;
}
Also used : IcConnectorKeyImpl(eu.bcvsolutions.idm.ic.impl.IcConnectorKeyImpl) IcConnectorInfoImpl(eu.bcvsolutions.idm.ic.impl.IcConnectorInfoImpl) IcConnectorInfo(eu.bcvsolutions.idm.ic.api.IcConnectorInfo) IcConnectorKey(eu.bcvsolutions.idm.ic.api.IcConnectorKey)

Aggregations

IcConnectorInfo (eu.bcvsolutions.idm.ic.api.IcConnectorInfo)3 IcConnectorInfoImpl (eu.bcvsolutions.idm.ic.impl.IcConnectorInfoImpl)3 IcConnectorKeyImpl (eu.bcvsolutions.idm.ic.impl.IcConnectorKeyImpl)3 HashSet (java.util.HashSet)2 ConnectorInfo (org.identityconnectors.framework.api.ConnectorInfo)2 ConnectorKey (org.identityconnectors.framework.api.ConnectorKey)2 IcConnectorKey (eu.bcvsolutions.idm.ic.api.IcConnectorKey)1 ConnectorInfoManager (org.identityconnectors.framework.api.ConnectorInfoManager)1