Package org.opends.server.extensions
Class EntryDNVirtualAttributeProvider
- java.lang.Object
-
- org.opends.server.api.VirtualAttributeProvider<EntryDNVirtualAttributeCfg>
-
- org.opends.server.extensions.EntryDNVirtualAttributeProvider
-
public class EntryDNVirtualAttributeProvider extends VirtualAttributeProvider<EntryDNVirtualAttributeCfg>
This class implements a virtual attribute provider that is meant to serve the entryDN operational attribute as described in draft-zeilenga-ldap-entrydn.
-
-
Constructor Summary
Constructors Constructor Description EntryDNVirtualAttributeProvider()Creates a new instance of this entryDN virtual attribute provider.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConditionResultapproximatelyEqualTo(Entry entry, VirtualAttributeRule rule, ByteString value)Indicates whether this virtual attribute provider will generate any value for the provided entry that is approximately equal to the given value.AttributegetValues(Entry entry, VirtualAttributeRule rule)Generates an unmodifiable attribute with the values for the provided entry.ConditionResultgreaterThanOrEqualTo(Entry entry, VirtualAttributeRule rule, ByteString value)Indicates whether this virtual attribute provider will generate any value for the provided entry that is greater than or equal to the given value.booleanhasValue(Entry entry, VirtualAttributeRule rule)Indicates whether this virtual attribute provider will generate at least one value for the provided entry.booleanhasValue(Entry entry, VirtualAttributeRule rule, ByteString value)Indicates whether this virtual attribute provider will generate the provided value.booleanisMultiValued()Indicates whether this virtual attribute provider may generate multiple values.booleanisSearchable(VirtualAttributeRule rule, SearchOperation searchOperation, boolean isPreIndexed)Indicates whether this attribute may be included in search filters as part of the criteria for locating entries.ConditionResultlessThanOrEqualTo(Entry entry, VirtualAttributeRule rule, ByteString value)Indicates whether this virtual attribute provider will generate any value for the provided entry that is less than or equal to the given value.ConditionResultmatchesSubstring(Entry entry, VirtualAttributeRule rule, ByteString subInitial, List<ByteString> subAny, ByteString subFinal)Indicates whether this virtual attribute provider will generate any value which matches the provided substring.voidprocessSearch(VirtualAttributeRule rule, SearchOperation searchOperation)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, hasAllValues, initializeVirtualAttributeProvider, isConfigurationAcceptable, matchesEqualityAssertion
-
-
-
-
Method Detail
-
isMultiValued
public boolean isMultiValued()
Description copied from class:VirtualAttributeProviderIndicates whether this virtual attribute provider may generate multiple values.- Specified by:
isMultiValuedin classVirtualAttributeProvider<EntryDNVirtualAttributeCfg>- Returns:
trueif this virtual attribute provider may generate multiple values, orfalseif not.
-
getValues
public Attribute getValues(Entry entry, VirtualAttributeRule rule)
Description copied from class:VirtualAttributeProviderGenerates an unmodifiable attribute with the values for the provided entry.- Specified by:
getValuesin classVirtualAttributeProvider<EntryDNVirtualAttributeCfg>- Parameters:
entry- The entry for which the values are to be generated.rule- The virtual attribute rule which defines the constraints for the virtual attribute.- Returns:
- The unmodifiable attribute with the values generated for the
provided entry. It may be empty, but it must not be
null.
-
hasValue
public boolean hasValue(Entry entry, VirtualAttributeRule rule)
Description copied from class:VirtualAttributeProviderIndicates whether this virtual attribute provider will generate at least one value for the provided entry.- Overrides:
hasValuein classVirtualAttributeProvider<EntryDNVirtualAttributeCfg>- Parameters:
entry- The entry for which to make the determination.rule- The virtual attribute rule which defines the constraints for the virtual attribute.- Returns:
trueif this virtual attribute provider will generate at least one value for the provided entry, orfalseif not.
-
hasValue
public boolean hasValue(Entry entry, VirtualAttributeRule rule, ByteString value)
Description copied from class:VirtualAttributeProviderIndicates whether this virtual attribute provider will generate the provided value.- Overrides:
hasValuein classVirtualAttributeProvider<EntryDNVirtualAttributeCfg>- Parameters:
entry- The entry for which to make the determination.rule- The virtual attribute rule which defines the constraints for the virtual attribute.value- The value for which to make the determination.- Returns:
trueif this virtual attribute provider will generate the specified value for the provided entry, orfalseif not.
-
matchesSubstring
public ConditionResult matchesSubstring(Entry entry, VirtualAttributeRule rule, ByteString subInitial, List<ByteString> subAny, ByteString subFinal)
Description copied from class:VirtualAttributeProviderIndicates whether this virtual attribute provider will generate any value which matches the provided substring.- Overrides:
matchesSubstringin classVirtualAttributeProvider<EntryDNVirtualAttributeCfg>- Parameters:
entry- The entry for which to make the determination.rule- The virtual attribute rule which defines the constraints for the virtual attribute.subInitial- The subInitial component to use in the determination.subAny- The subAny components to use in the determination.subFinal- The subFinal component to use in the determination.- Returns:
UNDEFINEDif this attribute does not have a substring matching rule,TRUEif at least one value matches the provided substring, orFALSEotherwise.
-
greaterThanOrEqualTo
public ConditionResult greaterThanOrEqualTo(Entry entry, VirtualAttributeRule rule, ByteString value)
Description copied from class:VirtualAttributeProviderIndicates whether this virtual attribute provider will generate any value for the provided entry that is greater than or equal to the given value.- Overrides:
greaterThanOrEqualToin classVirtualAttributeProvider<EntryDNVirtualAttributeCfg>- Parameters:
entry- The entry for which to make the determination.rule- The virtual attribute rule which defines the constraints for the virtual attribute.value- The assertion value for which to make the determination.- Returns:
UNDEFINEDif the associated attribute type does not have an ordering matching rule,TRUEif at least one of the generated values will be greater than or equal to the specified assertion value, orFALSEif none of the generated values will be greater than or equal to the specified value.
-
lessThanOrEqualTo
public ConditionResult lessThanOrEqualTo(Entry entry, VirtualAttributeRule rule, ByteString value)
Description copied from class:VirtualAttributeProviderIndicates whether this virtual attribute provider will generate any value for the provided entry that is less than or equal to the given value.- Overrides:
lessThanOrEqualToin classVirtualAttributeProvider<EntryDNVirtualAttributeCfg>- Parameters:
entry- The entry for which to make the determination.rule- The virtual attribute rule which defines the constraints for the virtual attribute.value- The assertion value for which to make the determination.- Returns:
UNDEFINEDif the associated attribute type does not have an ordering matching rule,TRUEif at least one of the generated values will be less than or equal to the specified assertion value, orFALSEif none of the generated values will be greater than or equal to the specified value.
-
approximatelyEqualTo
public ConditionResult approximatelyEqualTo(Entry entry, VirtualAttributeRule rule, ByteString value)
Description copied from class:VirtualAttributeProviderIndicates whether this virtual attribute provider will generate any value for the provided entry that is approximately equal to the given value.- Overrides:
approximatelyEqualToin classVirtualAttributeProvider<EntryDNVirtualAttributeCfg>- Parameters:
entry- The entry for which to make the determination.rule- The virtual attribute rule which defines the constraints for the virtual attribute.value- The assertion value for which to make the determination.- Returns:
UNDEFINEDif the associated attribute type does not have an approximate matching rule,TRUEif at least one of the generated values will be approximately equal to the specified value, orFALSEif none of the generated values will be approximately equal to the specified assertion value.
-
isSearchable
public boolean isSearchable(VirtualAttributeRule rule, SearchOperation searchOperation, boolean isPreIndexed)
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.
- It is an OR filter in which all of the components are equality filters targeting the associated attribute type.
- Specified by:
isSearchablein classVirtualAttributeProvider<EntryDNVirtualAttributeCfg>- Parameters:
rule- The virtual attribute rule which defines the constraints for the virtual attribute.searchOperation- The search operation for which to make the determination.isPreIndexed- Indicates if we expect the search on the virtual attribute to be faster than an index search.- Returns:
trueif this attribute may be included in search filters, orfalseif not.
-
processSearch
public void processSearch(VirtualAttributeRule rule, SearchOperation searchOperation)
Description copied from class:VirtualAttributeProviderProcesses the provided search operation in which the search criteria includes an operation targeted at this virtual attribute. This method should only be called ifisSearchablereturns true and it is not possible to construct a manageable candidate list by processing other elements of the search criteria.- Specified by:
processSearchin classVirtualAttributeProvider<EntryDNVirtualAttributeCfg>- Parameters:
rule- The virtual attribute rule which defines the constraints for the virtual attribute.searchOperation- The search operation to be processed.
-
-