Search in sources :

Example 1 with IcObjectPoolConfigurationImpl

use of eu.bcvsolutions.idm.ic.impl.IcObjectPoolConfigurationImpl in project CzechIdMng by bcvsolutions.

the class ConnIdIcConvertUtil method convertConnIdPoolConfiguration.

public static IcObjectPoolConfiguration convertConnIdPoolConfiguration(ObjectPoolConfiguration pool) {
    if (pool == null) {
        return null;
    }
    IcObjectPoolConfigurationImpl dto = new IcObjectPoolConfigurationImpl();
    dto.setMaxIdle(pool.getMaxIdle());
    dto.setMaxObjects(pool.getMaxObjects());
    dto.setMaxWait(pool.getMaxWait());
    dto.setMinEvictableIdleTimeMillis(pool.getMinEvictableIdleTimeMillis());
    dto.setMinIdle(pool.getMinIdle());
    return dto;
}
Also used : IcObjectPoolConfigurationImpl(eu.bcvsolutions.idm.ic.impl.IcObjectPoolConfigurationImpl)

Example 2 with IcObjectPoolConfigurationImpl

use of eu.bcvsolutions.idm.ic.impl.IcObjectPoolConfigurationImpl in project CzechIdMng by bcvsolutions.

the class ConnIdIcConvertUtil method convertConnIdConnectorConfiguration.

public static IcConnectorConfiguration convertConnIdConnectorConfiguration(APIConfiguration conf) {
    if (conf == null) {
        return null;
    }
    IcConnectorConfigurationImpl dto = new IcConnectorConfigurationImpl();
    dto.setConnectorPoolingSupported(conf.isConnectorPoolingSupported());
    dto.setProducerBufferSize(conf.getProducerBufferSize());
    ConfigurationProperties properties = conf.getConfigurationProperties();
    IcConfigurationPropertiesImpl propertiesDto = new IcConfigurationPropertiesImpl();
    if (properties != null && properties.getPropertyNames() != null) {
        List<String> propertyNames = properties.getPropertyNames();
        for (String name : propertyNames) {
            ConfigurationProperty property = properties.getProperty(name);
            IcConfigurationPropertyImpl propertyDto = (IcConfigurationPropertyImpl) convertConnIdConfigurationProperty(property);
            if (propertiesDto != null) {
                propertiesDto.getProperties().add(propertyDto);
            }
        }
    }
    dto.setConfigurationProperties(propertiesDto);
    IcObjectPoolConfigurationImpl connectorPoolConfiguration = (IcObjectPoolConfigurationImpl) convertConnIdPoolConfiguration(conf.getConnectorPoolConfiguration());
    dto.setConnectorPoolConfiguration(connectorPoolConfiguration);
    return dto;
}
Also used : ConfigurationProperty(org.identityconnectors.framework.api.ConfigurationProperty) IcConfigurationProperty(eu.bcvsolutions.idm.ic.api.IcConfigurationProperty) IcConnectorConfigurationImpl(eu.bcvsolutions.idm.ic.impl.IcConnectorConfigurationImpl) IcObjectPoolConfigurationImpl(eu.bcvsolutions.idm.ic.impl.IcObjectPoolConfigurationImpl) ConfigurationProperties(org.identityconnectors.framework.api.ConfigurationProperties) IcConfigurationProperties(eu.bcvsolutions.idm.ic.api.IcConfigurationProperties) GuardedString(org.identityconnectors.common.security.GuardedString) IcConfigurationPropertiesImpl(eu.bcvsolutions.idm.ic.impl.IcConfigurationPropertiesImpl) IcConfigurationPropertyImpl(eu.bcvsolutions.idm.ic.impl.IcConfigurationPropertyImpl)

Aggregations

IcObjectPoolConfigurationImpl (eu.bcvsolutions.idm.ic.impl.IcObjectPoolConfigurationImpl)2 IcConfigurationProperties (eu.bcvsolutions.idm.ic.api.IcConfigurationProperties)1 IcConfigurationProperty (eu.bcvsolutions.idm.ic.api.IcConfigurationProperty)1 IcConfigurationPropertiesImpl (eu.bcvsolutions.idm.ic.impl.IcConfigurationPropertiesImpl)1 IcConfigurationPropertyImpl (eu.bcvsolutions.idm.ic.impl.IcConfigurationPropertyImpl)1 IcConnectorConfigurationImpl (eu.bcvsolutions.idm.ic.impl.IcConnectorConfigurationImpl)1 GuardedString (org.identityconnectors.common.security.GuardedString)1 ConfigurationProperties (org.identityconnectors.framework.api.ConfigurationProperties)1 ConfigurationProperty (org.identityconnectors.framework.api.ConfigurationProperty)1