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

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

public abstract class SearchingOperationContext
extends AbstractOperationContext

A context used for search related operations and used by all the Interceptors.

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

Field Summary
protected  boolean abandoned
          A flag if the search operation is abandoned
protected  org.apache.directory.shared.ldap.message.AliasDerefMode aliasDerefMode
          A flag describing the way alias should be handled
protected  boolean allOperationalAttributes
          A flag set if the returned attributes set contains '+'
protected  boolean allUserAttributes
          A flag set if the returned attributes set contains '*'
protected  boolean noAttributes
          A flag set if the returned attributes set contains '1.1'
protected  java.util.Set<org.apache.directory.shared.ldap.schema.AttributeTypeOptions> returningAttributes
          A set containing the returning attributeTypesOptions
protected  org.apache.directory.shared.ldap.filter.SearchScope scope
          The scope for this search : default to One Level
protected  long sizeLimit
          The sizeLimit for this search operation
protected  int timeLimit
          The timeLimit for this search operation
protected  boolean typesOnly
          A flag to tell if only the attribute names to be returned
 
Fields inherited from class org.apache.directory.server.core.interceptor.context.AbstractOperationContext
authorizedPrincipal, byPassed, dn, EMPTY_CONTROLS, entry, next, previous, requestControls, responseControls, session, throwReferral
 
Constructor Summary
SearchingOperationContext(CoreSession session)
          Creates a new instance of SearchingOperationContext.
SearchingOperationContext(CoreSession session, org.apache.directory.shared.ldap.name.DN dn)
          Creates a new instance of SearchingOperationContext.
SearchingOperationContext(CoreSession session, org.apache.directory.shared.ldap.name.DN dn, java.util.Set<org.apache.directory.shared.ldap.schema.AttributeTypeOptions> returningAttributes)
          Creates a new instance of a SearchingOperationContext using one level scope, with attributes to return.
 
Method Summary
 org.apache.directory.shared.ldap.message.AliasDerefMode getAliasDerefMode()
           
 java.util.Set<org.apache.directory.shared.ldap.schema.AttributeTypeOptions> getReturningAttributes()
           
 org.apache.directory.shared.ldap.filter.SearchScope getScope()
           
 javax.naming.directory.SearchControls getSearchControls()
          Creates a new SearchControls object populated with the parameters contained in this SearchOperationContext in normalized form.
 javax.naming.directory.SearchControls getSearchControls(boolean denormalized)
          Creates a new SearchControls object populated with the parameters contained in this SearchOperationContext.
 long getSizeLimit()
           
 int getTimeLimit()
           
 boolean isAbandoned()
           
 boolean isAllOperationalAttributes()
           
 boolean isAllUserAttributes()
           
 boolean isNoAttributes()
           
 boolean isTypesOnly()
           
 void setAbandoned(boolean abandoned)
           
 void setAliasDerefMode(org.apache.directory.shared.ldap.message.AliasDerefMode aliasDerefMode)
           
 void setAllOperationalAttributes(boolean allOperationalAttribute)
           
 void setAllUserAttributes(boolean allUserAttributes)
           
 void setNoAttributes(boolean noAttributes)
           
protected  void setReturningAttributes(java.util.Collection<java.lang.String> attributesIds)
           
 void setReturningAttributes(java.util.Set<org.apache.directory.shared.ldap.schema.AttributeTypeOptions> returningAttributes)
           
protected  void setReturningAttributes(java.lang.String[] attributesIds)
           
 void setScope(org.apache.directory.shared.ldap.filter.SearchScope scope)
           
 void setSizeLimit(long sizeLimit)
           
 void setTimeLimit(int timeLimit)
           
 void setTypesOnly(boolean typesOnly)
           
 java.lang.String toString()
           
 
Methods inherited from class org.apache.directory.server.core.interceptor.context.AbstractOperationContext
add, addRequestControl, addRequestControls, addResponseControl, delete, getByPassed, getDn, getEffectivePrincipal, getEntry, getFirstOperation, getLastOperation, getName, getNextOperation, getPreviousOperation, getRequestControl, getResponseControl, getResponseControlCount, getResponseControls, getSession, hasBypass, hasEntry, hasRequestControl, hasRequestControls, hasResponseControl, hasResponseControls, ignoreReferral, isBypassed, isFirstOperation, isReferralIgnored, isReferralThrown, lookup, lookup, modify, newLookupContext, setAuthorizedPrincipal, setByPassed, setDn, setEntry, setNextOperation, setPreviousOperation, setRequestControls, setSession, throwReferral
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

aliasDerefMode

protected org.apache.directory.shared.ldap.message.AliasDerefMode aliasDerefMode
A flag describing the way alias should be handled


sizeLimit

protected long sizeLimit
The sizeLimit for this search operation


timeLimit

protected int timeLimit
The timeLimit for this search operation


scope

protected org.apache.directory.shared.ldap.filter.SearchScope scope
The scope for this search : default to One Level


allOperationalAttributes

protected boolean allOperationalAttributes
A flag set if the returned attributes set contains '+'


allUserAttributes

protected boolean allUserAttributes
A flag set if the returned attributes set contains '*'


noAttributes

protected boolean noAttributes
A flag set if the returned attributes set contains '1.1'


returningAttributes

protected java.util.Set<org.apache.directory.shared.ldap.schema.AttributeTypeOptions> returningAttributes
A set containing the returning attributeTypesOptions


abandoned

protected boolean abandoned
A flag if the search operation is abandoned


typesOnly

protected boolean typesOnly
A flag to tell if only the attribute names to be returned

Constructor Detail

SearchingOperationContext

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


SearchingOperationContext

public SearchingOperationContext(CoreSession session,
                                 org.apache.directory.shared.ldap.name.DN dn)
Creates a new instance of SearchingOperationContext.

Parameters:
dn - The DN to get the suffix from

SearchingOperationContext

public SearchingOperationContext(CoreSession session,
                                 org.apache.directory.shared.ldap.name.DN dn,
                                 java.util.Set<org.apache.directory.shared.ldap.schema.AttributeTypeOptions> returningAttributes)
Creates a new instance of a SearchingOperationContext using one level scope, with attributes to return.

Parameters:
dn - The DN to get the suffix from
aliasDerefMode - the alias dereferencing mode to use
Throws:
javax.naming.NamingException
Method Detail

setReturningAttributes

protected void setReturningAttributes(java.util.Collection<java.lang.String> attributesIds)
                               throws java.lang.Exception
Throws:
java.lang.Exception

setReturningAttributes

protected void setReturningAttributes(java.lang.String[] attributesIds)
                               throws java.lang.Exception
Throws:
java.lang.Exception

toString

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

getAliasDerefMode

public org.apache.directory.shared.ldap.message.AliasDerefMode getAliasDerefMode()

setAliasDerefMode

public void setAliasDerefMode(org.apache.directory.shared.ldap.message.AliasDerefMode aliasDerefMode)

setSizeLimit

public void setSizeLimit(long sizeLimit)
Parameters:
sizeLimit - the sizeLimit to set

getSizeLimit

public long getSizeLimit()
Returns:
the sizeLimit

setTimeLimit

public void setTimeLimit(int timeLimit)
Parameters:
timeLimit - the timeLimit to set

getTimeLimit

public int getTimeLimit()
Returns:
the timeLimit

setScope

public void setScope(org.apache.directory.shared.ldap.filter.SearchScope scope)
Parameters:
scope - the scope to set

getScope

public org.apache.directory.shared.ldap.filter.SearchScope getScope()
Returns:
the scope

setAllOperationalAttributes

public void setAllOperationalAttributes(boolean allOperationalAttribute)
Parameters:
allOperationalAttributes - the allOperationalAttributes to set

isAllOperationalAttributes

public boolean isAllOperationalAttributes()
Returns:
the allOperationalAttributes

setAllUserAttributes

public void setAllUserAttributes(boolean allUserAttributes)
Parameters:
allUserAttributes - the allUserAttributes to set

isAllUserAttributes

public boolean isAllUserAttributes()
Returns:
the allUserAttributes

setNoAttributes

public void setNoAttributes(boolean noAttributes)
Parameters:
noAttributes - the noAttributes to set

isNoAttributes

public boolean isNoAttributes()
Returns:
the noAttributes

isTypesOnly

public boolean isTypesOnly()
Returns:
true, if attribute descriptions alone need to be returned

setTypesOnly

public void setTypesOnly(boolean typesOnly)

setReturningAttributes

public void setReturningAttributes(java.util.Set<org.apache.directory.shared.ldap.schema.AttributeTypeOptions> returningAttributes)
Parameters:
returningAttributes - the returningAttributes to set

getReturningAttributes

public java.util.Set<org.apache.directory.shared.ldap.schema.AttributeTypeOptions> getReturningAttributes()
Returns:
the returningAttributes

getSearchControls

public javax.naming.directory.SearchControls getSearchControls()
Creates a new SearchControls object populated with the parameters contained in this SearchOperationContext in normalized form.

Returns:
a new SearchControls object

getSearchControls

public javax.naming.directory.SearchControls getSearchControls(boolean denormalized)
Creates a new SearchControls object populated with the parameters contained in this SearchOperationContext.

Parameters:
denormalized - true if attribute values are not normalized
Returns:
a new SearchControls object

setAbandoned

public void setAbandoned(boolean abandoned)
Parameters:
abandoned - the abandoned to set

isAbandoned

public boolean isAbandoned()
Returns:
the abandoned


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