public final class AttributeFilter extends Object
AttributeFilter
is useful for performing fine-grained access control,
selecting attributes based on search request criteria, and selecting
attributes based on post- and pre- read request control criteria.
In cases where methods accept a string based list of attribute descriptions, the following special attribute descriptions are permitted:
Constructor and Description |
---|
AttributeFilter()
Creates a new attribute filter which will include all user attributes but
no operational attributes.
|
AttributeFilter(Collection<String> attributeDescriptions)
Creates a new attribute filter which will include the attributes
identified by the provided search request attribute list.
|
AttributeFilter(Collection<String> attributeDescriptions,
Schema schema)
Creates a new attribute filter which will include the attributes
identified by the provided search request attribute list.
|
AttributeFilter(String... attributeDescriptions)
Creates a new attribute filter which will include the attributes
identified by the provided search request attribute list.
|
Modifier and Type | Method and Description |
---|---|
Entry |
filteredCopyOf(Entry entry)
Returns a modifiable filtered copy of the provided entry.
|
Entry |
filteredViewOf(Entry entry)
Returns an unmodifiable filtered view of the provided entry.
|
AttributeFilter |
includeAllOperationalAttributes(boolean include)
Specifies whether all operational attributes should be included in
filtered entries.
|
AttributeFilter |
includeAllUserAttributes(boolean include)
Specifies whether all user attributes should be included in
filtered entries.
|
AttributeFilter |
includeAttribute(AttributeDescription attributeDescription)
Specifies that the named attribute should be included in filtered
entries.
|
AttributeFilter |
includeAttribute(String attributeDescription)
Specifies that the named attribute should be included in filtered
entries.
|
AttributeFilter |
includeAttribute(String attributeDescription,
Schema schema)
Specifies that the named attribute should be included in filtered
entries.
|
String |
toString() |
AttributeFilter |
typesOnly(boolean typesOnly)
Specifies whether filtered attributes are to contain both
attribute descriptions and values, or just attribute descriptions.
|
public AttributeFilter()
public AttributeFilter(Collection<String> attributeDescriptions)
attributeDescriptions
- The names of the attributes to be included with each entry.public AttributeFilter(Collection<String> attributeDescriptions, Schema schema)
attributeDescriptions
- The names of the attributes to be included with each entry.schema
- The schema The schema to use when parsing attribute
descriptions and object class names.public AttributeFilter(String... attributeDescriptions)
attributeDescriptions
- The names of the attributes to be included with each entry.public Entry filteredCopyOf(Entry entry)
entry
- The entry to be filtered and copied.public Entry filteredViewOf(Entry entry)
entry
- The entry to be filtered.public AttributeFilter includeAllOperationalAttributes(boolean include)
include
- true
if operational attributes should be included in
filtered entries.public AttributeFilter includeAllUserAttributes(boolean include)
include
- true
if user attributes should be included in filtered
entries.public AttributeFilter includeAttribute(AttributeDescription attributeDescription)
attributeDescription
- The name of the attribute to be included in filtered entries.public AttributeFilter includeAttribute(String attributeDescription)
attributeDescription
- The name of the attribute to be included in filtered entries.public AttributeFilter includeAttribute(String attributeDescription, Schema schema)
attributeDescription
- The name of the attribute to be included in filtered entries.schema
- The schema The schema to use when parsing attribute
descriptions and object class names.public AttributeFilter typesOnly(boolean typesOnly)
typesOnly
- true
if only attribute descriptions (and not values)
are to be included, or false
(the default) if both
attribute descriptions and values are to be included.Copyright 2010-2017 ForgeRock AS.