public abstract class FilteringOperationContext extends AbstractOperationContext
| Modifier and Type | Field and Description |
|---|---|
private boolean |
allOperationalAttributes
A flag set to true if the user has requested all the operational attributes ( "+" )
|
private boolean |
allUserAttributes
A flag set to true if the user has requested all the user attributes ( "*" )
|
protected static org.slf4j.Logger |
LOG
The LoggerFactory used by this Interceptor
|
private boolean |
noAttributes
A flag set to true if the user has requested no attribute to be returned (1.1)
|
protected java.util.Set<org.apache.directory.api.ldap.model.schema.AttributeTypeOptions> |
returningAttributes
A set containing the returning attributeTypesOptions
|
protected java.lang.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,
java.lang.String... returningAttributes)
Creates a new instance of LookupOperationContext.
|
FilteringOperationContext(CoreSession session,
java.lang.String... returningAttributes)
Creates a new instance of LookupOperationContext.
|
| Modifier and Type | Method and Description |
|---|---|
private java.util.Set<org.apache.directory.api.ldap.model.schema.AttributeTypeOptions> |
collectAttributeTypes(java.lang.String... attributesIds) |
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,
java.lang.String attribute)
Tells if an attribute is present in the list of attribute to return
|
java.util.Set<org.apache.directory.api.ldap.model.schema.AttributeTypeOptions> |
getReturningAttributes()
Add an attribute ID to the current list, creating the list if necessary
|
java.lang.String[] |
getReturningAttributesString() |
boolean |
isAllOperationalAttributes() |
boolean |
isAllUserAttributes() |
boolean |
isNoAttributes() |
boolean |
isTypesOnly() |
void |
setAllOperationalAttributes(boolean allOperationalAttribute) |
void |
setAllUserAttributes(boolean allUserAttributes) |
void |
setNoAttributes(boolean noAttributes) |
void |
setReturningAttributes(java.lang.String... attributeIds) |
void |
setTypesOnly(boolean typesOnly) |
java.lang.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, throwReferralprotected static final org.slf4j.Logger LOG
protected java.util.Set<org.apache.directory.api.ldap.model.schema.AttributeTypeOptions> returningAttributes
protected java.lang.String[] returningAttributesString
private boolean allOperationalAttributes
private boolean allUserAttributes
private boolean noAttributes
protected boolean typesOnly
public FilteringOperationContext(CoreSession session)
public FilteringOperationContext(CoreSession session, org.apache.directory.api.ldap.model.name.Dn dn)
public FilteringOperationContext(CoreSession session, java.lang.String... returningAttributes)
public FilteringOperationContext(CoreSession session, org.apache.directory.api.ldap.model.name.Dn dn, java.lang.String... returningAttributes)
public java.util.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 java.lang.String[] getReturningAttributesString()
public boolean contains(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager,
java.lang.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(java.lang.String... attributeIds)
private java.util.Set<org.apache.directory.api.ldap.model.schema.AttributeTypeOptions> collectAttributeTypes(java.lang.String... attributesIds)
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 java.lang.String toString()
toString in class java.lang.ObjectObject.toString()