SearchControls searchControls = call.getControls();
ExprNode filter = call.getFilter();
if ( searchControls.getSearchScope() == SearchControls.OBJECT_SCOPE &&
filter instanceof SimpleNode )
{
SimpleNode node = ( SimpleNode ) filter;
if ( node.getAttribute().equalsIgnoreCase( "objectClass" ) &&
node.getValue().equalsIgnoreCase( "subschema" ) &&
node.getAssertionType() == SimpleNode.EQUALITY
)
{
// call.setBypass( true );
Attributes attrs = getSubschemaEntry( searchControls.getReturningAttributes() );
SearchResult result = new SearchResult( call.getBaseName().toString(), null, attrs );
SingletonEnumeration e = new SingletonEnumeration( result );
call.setReturnValue( e );
bypass = true;
}
}
else if ( searchControls.getSearchScope() == SearchControls.OBJECT_SCOPE &&
filter instanceof PresenceNode )
{
PresenceNode node = ( PresenceNode ) filter;
if ( node.getAttribute().equalsIgnoreCase( "objectClass" ) )
{
// call.setBypass( true );
Attributes attrs = getSubschemaEntry( searchControls.getReturningAttributes() );
SearchResult result = new SearchResult( call.getBaseName().toString(), null, attrs );
SingletonEnumeration e = new SingletonEnumeration( result );