Package org.opends.server.extensions
Class IsMemberOfVirtualAttributeProvider
- java.lang.Object
-
- org.opends.server.api.VirtualAttributeProvider<IsMemberOfVirtualAttributeCfg>
-
- org.opends.server.extensions.IsMemberOfVirtualAttributeProvider
-
public class IsMemberOfVirtualAttributeProvider extends VirtualAttributeProvider<IsMemberOfVirtualAttributeCfg>
This class implements a virtual attribute provider that is meant to serve the isMemberOf operational attribute. This attribute will be used to provide a list of all groups in which the specified user is a member.
-
-
Constructor Summary
Constructors Constructor Description IsMemberOfVirtualAttributeProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Attribute
getAttribute(Entry entry, AttributeDescription attributeDescription)
Generates an unmodifiable attribute with the values for the provided entry.boolean
isMultiValued()
Indicates whether this virtual attribute provider may generate multiple values.boolean
isSearchable(AttributeDescription attributeDescription, SearchOperation searchOperation)
Indicates whether this attribute may be included in search filters as part of the criteria for locating entries.void
processSearch(AttributeDescription attrDesc, SearchOperation searchOp)
Processes the provided search operation in which the search criteria includes an operation targeted at this virtual attribute.-
Methods inherited from class org.opends.server.api.VirtualAttributeProvider
finalizeVirtualAttributeProvider, getServerContext, initializeVirtualAttributeProvider, initializeVirtualAttributeProvider, isConfigurationAcceptable
-
-
-
-
Method Detail
-
isMultiValued
public boolean isMultiValued()
Description copied from class:VirtualAttributeProvider
Indicates whether this virtual attribute provider may generate multiple values.- Specified by:
isMultiValued
in classVirtualAttributeProvider<IsMemberOfVirtualAttributeCfg>
- Returns:
true
if this virtual attribute provider may generate multiple values, orfalse
if not.
-
getAttribute
public Attribute getAttribute(Entry entry, AttributeDescription attributeDescription)
Description copied from class:VirtualAttributeProvider
Generates an unmodifiable attribute with the values for the provided entry.- Specified by:
getAttribute
in classVirtualAttributeProvider<IsMemberOfVirtualAttributeCfg>
- Parameters:
entry
- The entry for which the values are to be generated.attributeDescription
- the attribute description corresponding to this virtual attribute- Returns:
- The unmodifiable attribute with the values generated for the provided entry. It may be empty, but it must
not be
null
.
-
isSearchable
public boolean isSearchable(AttributeDescription attributeDescription, SearchOperation searchOperation)
Indicates whether this attribute may be included in search filters as part of the criteria for locating entries.. This virtual attribute will support search operations only if one of the following is true about the search filter:- It is an equality filter targeting the associated attribute type.
- It is an AND filter in which at least one of the components is an equality filter targeting the associated attribute type.
- Overrides:
isSearchable
in classVirtualAttributeProvider<IsMemberOfVirtualAttributeCfg>
- Parameters:
attributeDescription
- the attribute description corresponding to this virtual attributesearchOperation
- The search operation for which to make the determination.- Returns:
true
if this attribute may be included in search filters, orfalse
if not.
-
processSearch
public void processSearch(AttributeDescription attrDesc, SearchOperation searchOp)
Description copied from class:VirtualAttributeProvider
Processes the provided search operation in which the search criteria includes an operation targeted at this virtual attribute. This method should only be called ifisSearchable
returns true and it is not possible to construct a manageable candidate list by processing other elements of the search criteria.- Overrides:
processSearch
in classVirtualAttributeProvider<IsMemberOfVirtualAttributeCfg>
- Parameters:
attrDesc
- the attribute description corresponding to this virtual attributesearchOp
- The search operation to be processed.
-
-