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