{
this.rootDSE = new RootDSE( this );
this.cacheEntry( this.rootDSE );
// First get ALL attributes
ISearch search = new Search( null, this, new DN(), ISearch.FILTER_TRUE, null, ISearch.SCOPE_OBJECT, 0, 0,
IConnection.DEREFERENCE_ALIASES_NEVER, IConnection.HANDLE_REFERRALS_IGNORE, false, false, null );
this.search( search, monitor );
// Second get well-known root DSE attributes
search = new Search( null, this, new DN(), ISearch.FILTER_TRUE, ROOT_DSE_ATTRIBUTES, ISearch.SCOPE_OBJECT, 0,
0, IConnection.DEREFERENCE_ALIASES_NEVER, IConnection.HANDLE_REFERRALS_IGNORE, false, false, null );
this.search( search, monitor );
// Set base DNs from root DSE
if ( this.rootDSE != null )
{
try
{
List baseDnEntryList = new ArrayList();
String[] baseDnAttributeNames = new String[]
{ IRootDSE.ROOTDSE_ATTRIBUTE_NAMINGCONTEXTS };
for ( int x = 0; x < baseDnAttributeNames.length; x++ )
{
IAttribute attribute = this.rootDSE.getAttribute( baseDnAttributeNames[x] );
if ( attribute != null )
{
String[] values = attribute.getStringValues();
for ( int i = 0; i < values.length; i++ )
{
if ( !"".equals( values[i] ) ) { //$NON-NLS-1$
baseDnEntryList.add( values[i] );
}
}
}
}
this.baseDNEntries = new BaseDNEntry[baseDnEntryList.size()];
for ( int i = 0; i < this.baseDNEntries.length; i++ )
{
this.baseDNEntries[i] = new BaseDNEntry( new DN( ( String ) baseDnEntryList.get( i ) ), this );
this.cacheEntry( this.baseDNEntries[i] );
}
// this.loadDirectoryMetadataEntries();
}