/** * {@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; }
PartitionTxn partitionTxn = partition.beginReadTransaction(); HasEntryOperationContext hasEntryContext = new HasEntryOperationContext( searchContext.getSession(), contextDn ); hasEntryContext.setPartition( partition ); hasEntryContext.setTransaction( partitionTxn ); Dn contextDn = partition.getSuffixDn(); HasEntryOperationContext hasEntryContext = new HasEntryOperationContext( searchContext.getSession(), contextDn ); hasEntryContext.setPartition( partition ); hasEntryContext.setTransaction( partitionTxn );
GetRootDseOperationContext getRootDseContext = new GetRootDseOperationContext( searchContext.getSession() ); getRootDseContext.setPartition( searchContext.getPartition() ); getRootDseContext.setTransaction( searchContext.getTransaction() );