Search in sources :

Example 1 with APIConfigurationImpl

use of org.identityconnectors.framework.impl.api.APIConfigurationImpl in project CzechIdMng by bcvsolutions.

the class ConnIdIcConvertUtil method convertIcConnectorConfiguration.

public static APIConfiguration convertIcConnectorConfiguration(IcConnectorConfiguration icConf, APIConfiguration defaultConnIdConf) {
    if (icConf == null) {
        return null;
    }
    ((APIConfigurationImpl) defaultConnIdConf).setConnectorPoolingSupported(icConf.isConnectorPoolingSupported());
    defaultConnIdConf.setProducerBufferSize(icConf.getProducerBufferSize());
    IcConfigurationProperties properties = icConf.getConfigurationProperties();
    ConfigurationProperties connIdProperties = defaultConnIdConf.getConfigurationProperties();
    if (properties != null && properties.getProperties() != null) {
        for (IcConfigurationProperty icProperty : properties.getProperties()) {
            if (connIdProperties != null) {
                connIdProperties.setPropertyValue(icProperty.getName(), icProperty.getValue());
            }
        }
    }
    ObjectPoolConfiguration connectorPoolConfiguration = convertIcPoolConfiguration(icConf.getConnectorPoolConfiguration());
    ((APIConfigurationImpl) defaultConnIdConf).setConnectorPoolConfiguration(connectorPoolConfiguration);
    // This option must be enabled for pagination purpose
    defaultConnIdConf.getResultsHandlerConfiguration().setFilteredResultsHandlerInValidationMode(true);
    return defaultConnIdConf;
}
Also used : IcObjectPoolConfiguration(eu.bcvsolutions.idm.ic.api.IcObjectPoolConfiguration) ObjectPoolConfiguration(org.identityconnectors.common.pooling.ObjectPoolConfiguration) APIConfigurationImpl(org.identityconnectors.framework.impl.api.APIConfigurationImpl) IcConfigurationProperty(eu.bcvsolutions.idm.ic.api.IcConfigurationProperty) ConfigurationProperties(org.identityconnectors.framework.api.ConfigurationProperties) IcConfigurationProperties(eu.bcvsolutions.idm.ic.api.IcConfigurationProperties) IcConfigurationProperties(eu.bcvsolutions.idm.ic.api.IcConfigurationProperties)

Aggregations

IcConfigurationProperties (eu.bcvsolutions.idm.ic.api.IcConfigurationProperties)1 IcConfigurationProperty (eu.bcvsolutions.idm.ic.api.IcConfigurationProperty)1 IcObjectPoolConfiguration (eu.bcvsolutions.idm.ic.api.IcObjectPoolConfiguration)1 ObjectPoolConfiguration (org.identityconnectors.common.pooling.ObjectPoolConfiguration)1 ConfigurationProperties (org.identityconnectors.framework.api.ConfigurationProperties)1 APIConfigurationImpl (org.identityconnectors.framework.impl.api.APIConfigurationImpl)1