org.apache.directory.server.core.interceptor.context
Class SearchOperationContext

java.lang.Object
  extended by org.apache.directory.server.core.interceptor.context.AbstractOperationContext
      extended by org.apache.directory.server.core.interceptor.context.SearchingOperationContext
          extended by org.apache.directory.server.core.interceptor.context.SearchOperationContext
All Implemented Interfaces:
OperationContext

public class SearchOperationContext
extends SearchingOperationContext

A Search context used for Interceptors. It contains all the informations needed for the search operation, and used by all the interceptors

Version:
$Rev$, $Date$
Author:
Apache Directory Project

Field Summary
 
Fields inherited from class org.apache.directory.server.core.interceptor.context.SearchingOperationContext
abandoned, aliasDerefMode, allOperationalAttributes, allUserAttributes, noAttributes, returningAttributes, scope, sizeLimit, timeLimit
 
Fields inherited from class org.apache.directory.server.core.interceptor.context.AbstractOperationContext
authorizedPrincipal, byPassed, dn, EMPTY_CONTROLS, entry, next, previous, requestControls, responseControls, session
 
Constructor Summary
SearchOperationContext(CoreSession session)
          Creates a new instance of SearchOperationContext.
SearchOperationContext(CoreSession session, org.apache.directory.shared.ldap.name.LdapDN dn, org.apache.directory.shared.ldap.message.AliasDerefMode aliasDerefMode, org.apache.directory.shared.ldap.filter.ExprNode filter, javax.naming.directory.SearchControls searchControls)
          Creates a new instance of SearchOperationContext.
SearchOperationContext(CoreSession session, org.apache.directory.shared.ldap.name.LdapDN dn, org.apache.directory.shared.ldap.filter.SearchScope scope, org.apache.directory.shared.ldap.filter.ExprNode filter, org.apache.directory.shared.ldap.message.AliasDerefMode aliasDerefMode, java.util.Set<org.apache.directory.shared.ldap.schema.AttributeTypeOptions> returningAttributes)
          Creates a new instance of SearchOperationContext.
SearchOperationContext(CoreSession session, org.apache.directory.shared.ldap.message.SearchRequest searchRequest)
          Creates a new instance of SearchOperationContext.
 
Method Summary
 org.apache.directory.shared.ldap.filter.ExprNode getFilter()
           
 java.lang.String getName()
           
 boolean hasManageDsaItControl()
          Checks whether or not the ManageDsaITControl is present.
 void setFilter(org.apache.directory.shared.ldap.filter.ExprNode filter)
          Set the filter into the context.
 java.lang.String toString()
           
 
Methods inherited from class org.apache.directory.server.core.interceptor.context.SearchingOperationContext
getAliasDerefMode, getReturningAttributes, getScope, getSearchControls, getSearchControls, getSizeLimit, getTimeLimit, isAbandoned, isAllOperationalAttributes, isAllUserAttributes, isNoAttributes, setAbandoned, setAllOperationalAttributes, setAllUserAttributes, setNoAttributes, setReturningAttributes, setReturningAttributes, setReturningAttributes, setScope, setSizeLimit, setTimeLimit
 
Methods inherited from class org.apache.directory.server.core.interceptor.context.AbstractOperationContext
add, addRequestControl, addRequestControls, addResponseControl, delete, getByPassed, getDn, getEffectivePrincipal, getEntry, getFirstOperation, getLastOperation, getNextOperation, getPreviousOperation, getRequestControl, getResponseControl, getResponseControlCount, getResponseControls, getSession, hasBypass, hasEntry, hasRequestControl, hasRequestControls, hasResponseControl, hasResponseControls, isBypassed, isFirstOperation, lookup, lookup, modify, newLookupContext, setAuthorizedPrincipal, setByPassed, setDn, setEntry, setNextOperation, setPreviousOperation, setRequestControls, setSession
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SearchOperationContext

public SearchOperationContext(CoreSession session)
Creates a new instance of SearchOperationContext.


SearchOperationContext

public SearchOperationContext(CoreSession session,
                              org.apache.directory.shared.ldap.message.SearchRequest searchRequest)
                       throws java.lang.Exception
Creates a new instance of SearchOperationContext.

Throws:
java.lang.Exception

SearchOperationContext

public SearchOperationContext(CoreSession session,
                              org.apache.directory.shared.ldap.name.LdapDN dn,
                              org.apache.directory.shared.ldap.message.AliasDerefMode aliasDerefMode,
                              org.apache.directory.shared.ldap.filter.ExprNode filter,
                              javax.naming.directory.SearchControls searchControls)
                       throws java.lang.Exception
Creates a new instance of SearchOperationContext.

Parameters:
aliasDerefMode - the alias dereferencing mode
dn - the dn of the search base
filter - the filter AST to use for the search
searchControls - the search controls
Throws:
java.lang.Exception

SearchOperationContext

public SearchOperationContext(CoreSession session,
                              org.apache.directory.shared.ldap.name.LdapDN dn,
                              org.apache.directory.shared.ldap.filter.SearchScope scope,
                              org.apache.directory.shared.ldap.filter.ExprNode filter,
                              org.apache.directory.shared.ldap.message.AliasDerefMode aliasDerefMode,
                              java.util.Set<org.apache.directory.shared.ldap.schema.AttributeTypeOptions> returningAttributes)
Creates a new instance of SearchOperationContext.

Parameters:
session - the session this operation is associated with
dn - the search base
scope - the search scope
filter - the filter AST to use for the search
aliasDerefMode - the alias dereferencing mode
returningAttributes - the attributes to return
Method Detail

hasManageDsaItControl

public boolean hasManageDsaItControl()
Checks whether or not the ManageDsaITControl is present. If not present then the filter is modified to force the return of all referral entries regardless of whether or not the filter matches the referral entry.


getFilter

public org.apache.directory.shared.ldap.filter.ExprNode getFilter()
Returns:
The filter

setFilter

public void setFilter(org.apache.directory.shared.ldap.filter.ExprNode filter)
Set the filter into the context.

Parameters:
filter - The filter to set

toString

public java.lang.String toString()
Overrides:
toString in class SearchingOperationContext
See Also:
Object.toString()

getName

public java.lang.String getName()
Specified by:
getName in interface OperationContext
Specified by:
getName in class AbstractOperationContext
Returns:
the operation name


Copyright © 2003-2009 Apache Software Foundation. All Rights Reserved.