Package org.opends.server.extensions
Class IsMemberOfVirtualAttributeProvider
java.lang.Object
org.opends.server.api.VirtualAttributeProvider<IsMemberOfVirtualAttributeCfg>
org.opends.server.extensions.IsMemberOfVirtualAttributeProvider
public final 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 -
Method Summary
Modifier and TypeMethodDescriptiongetAttribute(Entry entry, AttributeDescription attributeDescription) Generates an unmodifiable attribute with the values for the provided entry.booleanIndicates whether this virtual attribute provider may generate multiple values.booleantryProcessSearch(AttributeDescription attributeDescription, RequestContext context, SearchRequest request, Predicate<SearchResultEntry> out) Attempts to process the provided search operation using this virtual attribute, returntrueif it was successful.Methods inherited from class org.opends.server.api.VirtualAttributeProvider
finalizeVirtualAttributeProvider, getServerContext, initializeVirtualAttributeProvider, initializeVirtualAttributeProvider, isConfigurationAcceptable
-
Constructor Details
-
IsMemberOfVirtualAttributeProvider
public IsMemberOfVirtualAttributeProvider()
-
-
Method Details
-
isMultiValued
public boolean isMultiValued()Description copied from class:VirtualAttributeProviderIndicates whether this virtual attribute provider may generate multiple values.- Specified by:
isMultiValuedin classVirtualAttributeProvider<IsMemberOfVirtualAttributeCfg>- Returns:
trueif this virtual attribute provider may generate multiple values, orfalseif not.
-
getAttribute
Description copied from class:VirtualAttributeProviderGenerates an unmodifiable attribute with the values for the provided entry.- Specified by:
getAttributein 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.
-
tryProcessSearch
public boolean tryProcessSearch(AttributeDescription attributeDescription, RequestContext context, SearchRequest request, Predicate<SearchResultEntry> out) Attempts to process the provided search operation using this virtual attribute, returntrueif it was successful.. 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:
tryProcessSearchin classVirtualAttributeProvider<IsMemberOfVirtualAttributeCfg>- Parameters:
attributeDescription- the attribute description corresponding to this virtual attributecontext- The request contextrequest- The search requestout- A consumer to which search result entries should be published. The predicate should returnfalseif no more results should be computed.- Returns:
trueif this attribute may be included in search filters, orfalseif not.
-