continue;
}
String className = replBean.getReplConsumerImpl();
ReplicationConsumer consumer = null;
Class<?> consumerClass = null;
SyncReplConfiguration config = null;
try
{
if ( className == null )
{
consumer = new ReplicationConsumerImpl();
}
else
{
consumerClass = Class.forName( className );
consumer = ( ReplicationConsumer ) consumerClass.newInstance();
}
// we don't support any other configuration impls atm, but this configuration should suffice for many needs
config = new SyncReplConfiguration();
config.setBaseDn( replBean.getSearchBaseDn() );
config.setRemoteHost( replBean.getReplProvHostName() );
config.setRemotePort( replBean.getReplProvPort() );
try
{
config.setAliasDerefMode( AliasDerefMode.getDerefMode( replBean.getReplAliasDerefMode() ) );
}
catch ( IllegalArgumentException iae )
{
LOG.error( iae.getMessage() + ", defaulted to 'never'" );
}
config.setAttributes( replBean.getReplAttributes().toArray( new String[0] ) );
config.setRefreshInterval( replBean.getReplRefreshInterval() );
config.setRefreshNPersist( replBean.isReplRefreshNPersist() );
int scope = SearchScope.getSearchScope( replBean.getReplSearchScope() );
config.setSearchScope( SearchScope.getSearchScope( scope ) );
config.setFilter( replBean.getReplSearchFilter() );
config.setSearchTimeout( replBean.getReplSearchTimeout() );
config.setReplUserDn( replBean.getReplUserDn() );
config.setReplUserPassword( replBean.getReplUserPassword() );
config.setSearchSizeLimit( replBean.getReplSearchSizeLimit() );
config.setUseTls( replBean.isReplUseTls() );
config.setStrictCertVerification( replBean.isReplStrictCertValidation() );
config.setConfigEntryDn( replBean.getDn() );
consumer.setConfig( config );
lst.add( consumer );
}
catch ( Exception e )
{