Search in sources :

Example 1 with IcCanSearch

use of eu.bcvsolutions.idm.ic.api.operation.IcCanSearch in project CzechIdMng by bcvsolutions.

the class CzechIdMIcConnectorService method search.

@Override
public void search(IcConnectorInstance connectorInstance, IcConnectorConfiguration connectorConfiguration, IcObjectClass objectClass, IcFilter filter, IcResultsHandler handler) {
    Assert.notNull(connectorInstance);
    Assert.notNull(connectorInstance.getConnectorKey());
    Assert.notNull(connectorConfiguration);
    Assert.notNull(objectClass);
    Assert.notNull(handler);
    String key = connectorInstance.getConnectorKey().toString();
    LOG.debug("Start search for connector {} and objectClass {} and filter {} - CzechIdM", key, objectClass.getDisplayName(), filter);
    IcConnector connector = this.getConnectorInstance(connectorInstance, connectorConfiguration);
    if (!(connector instanceof IcCanSearch)) {
        throw new IcException(MessageFormat.format("Connector [{0}] not supports search operation!", key));
    }
    ((IcCanSearch) connector).search(objectClass, filter, handler);
}
Also used : IcConnector(eu.bcvsolutions.idm.ic.api.IcConnector) IcException(eu.bcvsolutions.idm.ic.exception.IcException) GuardedString(eu.bcvsolutions.idm.core.security.api.domain.GuardedString) IcCanSearch(eu.bcvsolutions.idm.ic.api.operation.IcCanSearch)

Aggregations

GuardedString (eu.bcvsolutions.idm.core.security.api.domain.GuardedString)1 IcConnector (eu.bcvsolutions.idm.ic.api.IcConnector)1 IcCanSearch (eu.bcvsolutions.idm.ic.api.operation.IcCanSearch)1 IcException (eu.bcvsolutions.idm.ic.exception.IcException)1