private ReplicaEventLog convertEntryToReplica( Entry entry ) throws Exception
{
String id = entry.get( "ads-dsReplicaId" ).getString();
ReplicaEventLog replica = new ReplicaEventLog( Integer.parseInt( id ) );
NotificationCriteria searchCriteria = new NotificationCriteria();
String aliasMode = entry.get( "ads-replAliasDerefMode" ).getString();
searchCriteria.setAliasDerefMode( AliasDerefMode.getDerefMode( aliasMode ) );
String baseDn = entry.get( "ads-searchBaseDN" ).getString();
searchCriteria.setBase( new Dn( schemaManager, baseDn ) );
Attribute lastSentCsnAt = entry.get( "ads-replLastSentCsn" );
if ( lastSentCsnAt != null )
{
replica.setLastSentCsn( lastSentCsnAt.getString() );
}
String scope = entry.get( "ads-replSearchScope" ).getString();
int scopeIntVal = SearchScope.getSearchScope( scope );
searchCriteria.setScope( SearchScope.getSearchScope( scopeIntVal ) );
String filter = entry.get( "ads-replSearchFilter" ).getString();
searchCriteria.setFilter( filter );
replica.setSearchFilter( filter );
replica.setRefreshNPersist( Boolean.parseBoolean( entry.get( "ads-replRefreshNPersist" ).getString() ) );
searchCriteria.setEventMask( EventType.ALL_EVENT_TYPES_MASK );
replica.setSearchCriteria( searchCriteria );
// explicitly mark the replica as not-dirty, cause we just loaded it from
// the store, this prevents updating the replica info immediately after loading
replica.setDirty( false );