public abstract class FilteringOperationContext extends AbstractOperationContext
Modifier and Type | Field and Description |
---|---|
protected static org.slf4j.Logger |
LOG
The LoggerFactory used by this Interceptor
|
protected Set<org.apache.directory.api.ldap.model.schema.AttributeTypeOptions> |
returningAttributes
A set containing the returning attributeTypesOptions
|
protected String[] |
returningAttributesString
The set of attributes to return as String
|
protected boolean |
typesOnly
A flag to tell if only the attribute names to be returned.
|
authorizedPrincipal, byPassed, currentInterceptor, dn, EMPTY_CONTROLS, entry, interceptors, originalEntry, requestControls, responseControls, session, throwReferral
Constructor and Description |
---|
FilteringOperationContext(CoreSession session)
Creates a new instance of LookupOperationContext.
|
FilteringOperationContext(CoreSession session,
org.apache.directory.api.ldap.model.name.Dn dn)
Creates a new instance of LookupOperationContext.
|
FilteringOperationContext(CoreSession session,
org.apache.directory.api.ldap.model.name.Dn dn,
String... returningAttributes)
Creates a new instance of LookupOperationContext.
|
FilteringOperationContext(CoreSession session,
String... returningAttributes)
Creates a new instance of LookupOperationContext.
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager,
org.apache.directory.api.ldap.model.schema.AttributeType attributeType)
Tells if an attribute is present in the list of attribute to return
|
boolean |
contains(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager,
String attribute)
Tells if an attribute is present in the list of attribute to return
|
Set<org.apache.directory.api.ldap.model.schema.AttributeTypeOptions> |
getReturningAttributes()
Add an attribute ID to the current list, creating the list if necessary
|
String[] |
getReturningAttributesString() |
boolean |
isAllOperationalAttributes() |
boolean |
isAllUserAttributes() |
boolean |
isNoAttributes() |
boolean |
isTypesOnly() |
void |
setAllOperationalAttributes(boolean allOperationalAttribute) |
void |
setAllUserAttributes(boolean allUserAttributes) |
void |
setNoAttributes(boolean noAttributes) |
void |
setReturningAttributes(String... attributeIds) |
void |
setTypesOnly(boolean typesOnly) |
String |
toString() |
addRequestControl, addRequestControls, addResponseControl, delete, getCurrentInterceptor, getDn, getEffectivePrincipal, getEntry, getName, getNextInterceptor, getOriginalEntry, getRequestControl, getResponseControl, getResponseControlCount, getResponseControls, getSession, hasRequestControl, hasRequestControls, hasResponseControl, hasResponseControls, ignoreReferral, isReferralIgnored, isReferralThrown, lookup, newLookupContext, setAuthorizedPrincipal, setCurrentInterceptor, setDn, setEntry, setInterceptors, setOriginalEntry, setRequestControls, setSession, throwReferral
protected static final org.slf4j.Logger LOG
protected Set<org.apache.directory.api.ldap.model.schema.AttributeTypeOptions> returningAttributes
protected String[] returningAttributesString
protected boolean typesOnly
public FilteringOperationContext(CoreSession session)
public FilteringOperationContext(CoreSession session, org.apache.directory.api.ldap.model.name.Dn dn)
public FilteringOperationContext(CoreSession session, String... returningAttributes)
public FilteringOperationContext(CoreSession session, org.apache.directory.api.ldap.model.name.Dn dn, String... returningAttributes)
public Set<org.apache.directory.api.ldap.model.schema.AttributeTypeOptions> getReturningAttributes()
attrId
- the Id to add
public void addAttrsId( String attrId )
{
if ( noAttributes == null )
{
if ( attrId.equals( SchemaConstants.NO_ATTRIBUTE ) )
{
noAttributes = true;
if ( attrsId != null )
{
attrsId.clear();
}
return;
}
if ( attrId.equals( SchemaConstants.ALL_USER_ATTRIBUTES ) )
{
allUserAttributes = true;
return;
}
if ( attrId.equals( SchemaConstants.ALL_OPERATIONAL_ATTRIBUTES ) )
{
allOperationalAttributes = true;
return;
}
if ( attrsId == null )
{
attrsId = new ArrayListpublic String[] getReturningAttributesString()
public boolean contains(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager, String attribute)
attribute
- The attribute we are looking forpublic boolean contains(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager, org.apache.directory.api.ldap.model.schema.AttributeType attributeType)
attributeType
- The attributeType we are looking forpublic void setReturningAttributes(String... attributeIds)
public void setAllOperationalAttributes(boolean allOperationalAttribute)
allOperationalAttributes
- the allOperationalAttributes to setpublic boolean isAllUserAttributes()
public void setAllUserAttributes(boolean allUserAttributes)
allUserAttributes
- the allUserAttributes to setpublic boolean isAllOperationalAttributes()
public boolean isNoAttributes()
public void setNoAttributes(boolean noAttributes)
noAttributes
- the noAttributes to setpublic boolean isTypesOnly()
public void setTypesOnly(boolean typesOnly)
typesOnly
- true If we want to get back the attributeType onlypublic String toString()
toString
in class Object
Object.toString()
Copyright © 2018. All rights reserved.