T
- The type of configuration handled by this virtual attribute provider.@PublicAPI(stability=VOLATILE, mayInstantiate=false, mayExtend=true, mayInvoke=false) public abstract class VirtualAttributeProvider<T extends VirtualAttributeCfg> extends Object
Constructor and Description |
---|
VirtualAttributeProvider() |
Modifier and Type | Method and Description |
---|---|
ConditionResult |
approximatelyEqualTo(Entry entry,
VirtualAttributeRule rule,
ByteString assertionValue)
Indicates whether this virtual attribute provider will generate any value for the provided entry that is
approximately equal to the given value.
|
void |
finalizeVirtualAttributeProvider()
Performs any finalization that may be necessary whenever this virtual attribute provider is taken out of service.
|
abstract Attribute |
getValues(Entry entry,
VirtualAttributeRule rule)
Generates an unmodifiable attribute with the values for the provided entry.
|
ConditionResult |
greaterThanOrEqualTo(Entry entry,
VirtualAttributeRule rule,
ByteString assertionValue)
Indicates whether this virtual attribute provider will generate any value for the provided entry that is greater
than or equal to the given value.
|
boolean |
hasAllValues(Entry entry,
VirtualAttributeRule rule,
Collection<?> values)
Indicates whether this virtual attribute provider will generate all of the values in the provided collection.
|
boolean |
hasValue(Entry entry,
VirtualAttributeRule rule)
Indicates whether this virtual attribute provider will generate at least one value for the provided entry.
|
boolean |
hasValue(Entry entry,
VirtualAttributeRule rule,
ByteString value)
Indicates whether this virtual attribute provider will generate the provided value.
|
void |
initializeVirtualAttributeProvider(T configuration)
Initializes this virtual attribute based on the information in the provided configuration entry.
|
boolean |
isConfigurationAcceptable(T configuration,
List<LocalizableMessage> unacceptableReasons)
Indicates whether the provided configuration is acceptable for this virtual attribute provider.
|
abstract boolean |
isMultiValued()
Indicates whether this virtual attribute provider may generate multiple values.
|
abstract 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.
|
ConditionResult |
lessThanOrEqualTo(Entry entry,
VirtualAttributeRule rule,
ByteString assertionValue)
Indicates whether this virtual attribute provider will generate any value for the provided entry that is less
than or equal to the given value.
|
ConditionResult |
matchesEqualityAssertion(Entry entry,
VirtualAttributeRule rule,
ByteString assertionValue)
Indicates whether this virtual attribute provider matches the assertion value.
|
ConditionResult |
matchesSubstring(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.
|
abstract void |
processSearch(VirtualAttributeRule rule,
SearchOperation searchOperation)
Processes the provided search operation in which the search criteria includes an operation targeted at this
virtual attribute.
|
public void initializeVirtualAttributeProvider(T configuration) throws ConfigException, InitializationException
configuration
- The configuration to use to initialize this virtual attribute provider.ConfigException
- If an unrecoverable problem arises in the process of performing the initialization.InitializationException
- If a problem occurs during initialization that is not related to the server configuration.public boolean isConfigurationAcceptable(T configuration, List<LocalizableMessage> unacceptableReasons)
configuration
- The virtual attribute provider configuration for which to make the determination.unacceptableReasons
- A list that may be used to hold the reasons that the provided configuration is not acceptable.true
if the provided configuration is acceptable for this virtual attribute provider, or
false
if not.public void finalizeVirtualAttributeProvider()
public abstract boolean isMultiValued()
true
if this virtual attribute provider may generate multiple values, or false
if not.public abstract Attribute getValues(Entry entry, VirtualAttributeRule rule)
entry
- The entry for which the values are to be generated.rule
- The virtual attribute rule which defines the constraints for the virtual attribute.null
.public boolean hasValue(Entry entry, VirtualAttributeRule rule)
entry
- The entry for which to make the determination.rule
- The virtual attribute rule which defines the constraints for the virtual attribute.true
if this virtual attribute provider will generate at least one value for the provided entry,
or false
if not.public boolean hasValue(Entry entry, VirtualAttributeRule rule, ByteString value)
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.true
if this virtual attribute provider will generate the specified value for the provided entry,
or false
if not.public ConditionResult matchesEqualityAssertion(Entry entry, VirtualAttributeRule rule, ByteString assertionValue)
entry
- The entry for which to make the determination.rule
- The virtual attribute rule which defines the constraints for the virtual attribute.assertionValue
- The assertion value for which to make the determination.true
if this virtual attribute provider matches the specified assertion value for the provided
entry, or false
if not.public boolean hasAllValues(Entry entry, VirtualAttributeRule rule, Collection<?> values)
entry
- The entry for which to make the determination.rule
- The virtual attribute rule which defines the constraints for the virtual attribute.values
- The set of values for which to make the determination.true
if this attribute provider will generate all of the values in the provided collection, or
false
if it will not generate at least one of them.public ConditionResult matchesSubstring(Entry entry, VirtualAttributeRule rule, ByteString subInitial, List<ByteString> subAny, ByteString subFinal)
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.UNDEFINED
if this attribute does not have a substring matching rule, TRUE
if at least one
value matches the provided substring, or FALSE
otherwise.public ConditionResult greaterThanOrEqualTo(Entry entry, VirtualAttributeRule rule, ByteString assertionValue)
entry
- The entry for which to make the determination.rule
- The virtual attribute rule which defines the constraints for the virtual attribute.assertionValue
- The assertion value for which to make the determination.UNDEFINED
if the associated attribute type does not have an ordering matching rule, TRUE
if at least one of the generated values will be greater than or equal to the specified assertion value,
or FALSE
if none of the generated values will be greater than or equal to the specified value.public ConditionResult lessThanOrEqualTo(Entry entry, VirtualAttributeRule rule, ByteString assertionValue)
entry
- The entry for which to make the determination.rule
- The virtual attribute rule which defines the constraints for the virtual attribute.assertionValue
- The assertion value for which to make the determination.UNDEFINED
if the associated attribute type does not have an ordering matching rule, TRUE
if at least one of the generated values will be less than or equal to the specified assertion value, or
FALSE
if none of the generated values will be greater than or equal to the specified value.public ConditionResult approximatelyEqualTo(Entry entry, VirtualAttributeRule rule, ByteString assertionValue)
entry
- The entry for which to make the determination.rule
- The virtual attribute rule which defines the constraints for the virtual attribute.assertionValue
- The assertion value for which to make the determination.UNDEFINED
if the associated attribute type does not have an approximate matching rule,
TRUE
if at least one of the generated values will be approximately equal to the specified value,
or FALSE
if none of the generated values will be approximately equal to the specified assertion
value.public abstract boolean isSearchable(VirtualAttributeRule rule, SearchOperation searchOperation, boolean isPreIndexed)
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.true
if this attribute may be included in search filters, or false
if not.public abstract void processSearch(VirtualAttributeRule rule, SearchOperation searchOperation)
isSearchable
returns true and it is not possible
to construct a manageable candidate list by processing other elements of the search criteria.rule
- The virtual attribute rule which defines the constraints for the virtual attribute.searchOperation
- The search operation to be processed.Copyright 2010-2020 ForgeRock AS.