/** * {@inheritDoc} */ @Override public boolean accept( SearchOperationContext searchOperationContext, Entry entry ) throws LdapException { // Add the nbChildren/nbSubordinates attributes if required processSubordinates( searchOperationContext, searchOperationContext.getReturningAttributes(), searchOperationContext.isAllOperationalAttributes(), entry ); return true; }
/** * {@inheritDoc} */ @Override public boolean accept( SearchOperationContext operation, Entry entry ) throws LdapException { if ( operation.getReturningAttributesString() == null ) { return true; } // Add the SubschemaSubentry AttributeType if it's requested SchemaManager schemaManager = operation.getSession().getDirectoryService().getSchemaManager(); if ( operation.isAllOperationalAttributes() || operation.getReturningAttributes().contains( new AttributeTypeOptions( schemaManager.getAttributeType( SchemaConstants.SUBSCHEMA_SUBENTRY_AT ) ) ) ) { AttributeType subschemaSubentryAt = schemaManager.getAttributeType( SchemaConstants.SUBSCHEMA_SUBENTRY_AT ); entry.add( new DefaultAttribute( subschemaSubentryAt, directoryService.getPartitionNexus().getRootDseValue( subschemaSubentryAt ) ) ); } return true; }
/** * {@inheritDoc} */ @Override public EntryFilteringCursor search( SearchOperationContext searchContext ) throws LdapException { EntryFilteringCursor cursor = next( searchContext ); if ( searchContext.isAllOperationalAttributes() || ( ( searchContext.getReturningAttributes() != null ) && !searchContext.getReturningAttributes().isEmpty() ) ) { if ( directoryService.isDenormalizeOpAttrsEnabled() ) { cursor.addEntryFilter( denormalizingSearchFilter ); } cursor.addEntryFilter( operationalAttributeSearchFilter ); cursor.addEntryFilter( subordinatesSearchFilter ); return cursor; } return cursor; }
private EntryFilteringCursor searchRootDse( SearchOperationContext searchContext ) throws LdapException Set<AttributeTypeOptions> ids = searchContext.getReturningAttributes();