@PublicAPI(stability=VOLATILE, mayInstantiate=false, mayExtend=false, mayInvoke=true) public final class VirtualAttribute extends AbstractAttribute
| Constructor and Description |
|---|
VirtualAttribute(AttributeType attributeType,
Entry entry,
VirtualAttributeRule rule)
Creates a new virtual attribute with the provided information.
|
| Modifier and Type | Method and Description |
|---|---|
org.forgerock.opendj.ldap.ConditionResult |
approximatelyEqualTo(org.forgerock.opendj.ldap.ByteString assertionValue)
Indicates whether this attribute has any value(s) that are
approximately equal to the provided value.
|
boolean |
contains(org.forgerock.opendj.ldap.ByteString value)
Indicates whether this attribute contains the specified value.
|
boolean |
containsAll(Collection<org.forgerock.opendj.ldap.ByteString> values)
Indicates whether this attribute contains all the values in the
collection.
|
AttributeType |
getAttributeType()
Retrieves the attribute type for this attribute.
|
String |
getNameWithOptions()
Retrieves the user-provided name of this attribute, along with
any options that might have been provided.
|
Set<String> |
getOptions()
Retrieves the unmodifiable set of attribute options for this
attribute.
|
VirtualAttributeRule |
getVirtualAttributeRule()
Retrieves the virtual attribute rule that governs the behavior of
this virtual attribute.
|
org.forgerock.opendj.ldap.ConditionResult |
greaterThanOrEqualTo(org.forgerock.opendj.ldap.ByteString assertionValue)
Indicates whether this attribute has any value(s) that are
greater than or equal to the provided value.
|
boolean |
hasAllOptions(Collection<String> options)
Indicates whether this attribute has all of the options in the
provided collection.
|
boolean |
hasOption(String option)
Indicates whether this attribute has the specified option.
|
boolean |
hasOptions()
Indicates whether this attribute has any options at all.
|
boolean |
isEmpty()
Returns
true if this attribute contains no
attribute values. |
boolean |
isVirtual()
Indicates whether this is a virtual attribute (dynamically computed) rather than a real
attribute (persisted).
|
Iterator<org.forgerock.opendj.ldap.ByteString> |
iterator()
Returns an iterator over the attribute values in this attribute.
|
org.forgerock.opendj.ldap.ConditionResult |
lessThanOrEqualTo(org.forgerock.opendj.ldap.ByteString assertionValue)
Indicates whether this attribute has any value(s) that are less
than or equal to the provided value.
|
org.forgerock.opendj.ldap.ConditionResult |
matchesEqualityAssertion(org.forgerock.opendj.ldap.ByteString assertionValue)
Indicates whether this attribute matches the specified assertion value.
|
org.forgerock.opendj.ldap.ConditionResult |
matchesSubstring(org.forgerock.opendj.ldap.ByteString subInitial,
List<org.forgerock.opendj.ldap.ByteString> subAny,
org.forgerock.opendj.ldap.ByteString subFinal)
Indicates whether this attribute has any value(s) that match the
provided substring.
|
boolean |
optionsEqual(Set<String> options)
Indicates whether this attribute has exactly the specified set of
options.
|
int |
size()
Returns the number of attribute values in this attribute.
|
void |
toString(StringBuilder buffer)
Appends a one-line string representation of this attribute to the
provided buffer.
|
public VirtualAttribute(AttributeType attributeType, Entry entry, VirtualAttributeRule rule)
attributeType - The attribute type for this virtual attribute.entry - The entry in which this virtual attribute exists.rule - The virtual attribute rule that governs the behavior of
this virtual attribute.public org.forgerock.opendj.ldap.ConditionResult approximatelyEqualTo(org.forgerock.opendj.ldap.ByteString assertionValue)
AttributeassertionValue - The assertion value for which to make the determination.UNDEFINED if this attribute does not have
an approximate matching rule, TRUE if at
least one value is approximately equal to the provided
value, or false otherwise.public boolean contains(org.forgerock.opendj.ldap.ByteString value)
Attributevalue - The value for which to make the determination.true if this attribute has the specified
value, or false if not.public boolean containsAll(Collection<org.forgerock.opendj.ldap.ByteString> values)
AbstractAttribute
This implementation iterates through each attribute value in the
provided collection, checking to see if this attribute contains
the value using Attribute.contains(ByteString).
containsAll in interface AttributecontainsAll in class AbstractAttributevalues - The set of values for which to make the determination.true if this attribute contains all the
values in the provided collection, or false
if it does not contain at least one of them.public org.forgerock.opendj.ldap.ConditionResult matchesEqualityAssertion(org.forgerock.opendj.ldap.ByteString assertionValue)
AttributeassertionValue - The assertion value for which to make the determination.true if this attribute matches the specified assertion
value, or false if not.public AttributeType getAttributeType()
Attributepublic String getNameWithOptions()
AbstractAttributeThis implementation returns this attribute's name if there are no attribute options, otherwise it constructs a string comprising of this attribute's name followed by a semi-colon and a semi-colon separated list of its attribute options.
getNameWithOptions in interface AttributegetNameWithOptions in class AbstractAttributepublic Set<String> getOptions()
Attributepublic VirtualAttributeRule getVirtualAttributeRule()
public org.forgerock.opendj.ldap.ConditionResult greaterThanOrEqualTo(org.forgerock.opendj.ldap.ByteString assertionValue)
AttributeassertionValue - The assertion value for which to make the determination.UNDEFINED if this attribute does not have
an ordering matching rule, TRUE if at
least one value is greater than or equal to the provided
assertion value, or false otherwise.public boolean hasAllOptions(Collection<String> options)
AbstractAttribute
This implementation returns true if the provided
collection of options is null or empty. If the
collection is non-empty and this attribute does not have any
options then it returns false. Otherwise, each
option in the provided collection is checked using
AbstractAttribute.hasOption(String) and true is
returned if all the provided options are present.
hasAllOptions in interface AttributehasAllOptions in class AbstractAttributeoptions - The collection of options for which to make the
determination (may be null).true if this attribute has all of the
specified options, or false if it does not
have at least one of them.public boolean hasOption(String option)
AbstractAttribute
This implementation calls Attribute.getOptions() to
retrieve this attribute's set of options and then compares them
one at a time against the provided option. All comparisons are
case insensitive (this is why we iterate through the set of
options, rather than doing a simpler set membership test).
hasOption in interface AttributehasOption in class AbstractAttributeoption - The option for which to make the determination.true if this attribute has the specified
option, or false if not.public boolean hasOptions()
AbstractAttributeThis implementation retrieves the set of options associated with this attribute and tests to see if it is empty.
hasOptions in interface AttributehasOptions in class AbstractAttributetrue if this attribute has at least one
option, or false if not.public boolean isEmpty()
AbstractAttributetrue if this attribute contains no
attribute values.
This implementation returns true if the
Attribute.size() of this attribute is zero.
isEmpty in interface AttributeisEmpty in class AbstractAttributetrue if this attribute contains no
attribute values.public boolean isVirtual()
Attributetrue if this is a virtual attribute.public Iterator<org.forgerock.opendj.ldap.ByteString> iterator()
Attributeremove method.public org.forgerock.opendj.ldap.ConditionResult lessThanOrEqualTo(org.forgerock.opendj.ldap.ByteString assertionValue)
AttributeassertionValue - The assertion value for which to make the determination.UNDEFINED if this attribute does not have
an ordering matching rule, TRUE if at
least one value is less than or equal to the provided
assertion value, or false otherwise.public org.forgerock.opendj.ldap.ConditionResult matchesSubstring(org.forgerock.opendj.ldap.ByteString subInitial, List<org.forgerock.opendj.ldap.ByteString> subAny, org.forgerock.opendj.ldap.ByteString subFinal)
AttributesubInitial - 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 boolean optionsEqual(Set<String> options)
AbstractAttribute
This implementation returns !AbstractAttribute.hasOptions() if the
provided set of options is null. Otherwise it
checks that the size of the provided set of options is equal to
the size of this attribute's options, return false
if the sizes differ. If the sizes are the same then each option
in the provided set is checked using
AbstractAttribute.hasOption(String) and true is
returned if all the provided options are present.
optionsEqual in interface AttributeoptionsEqual in class AbstractAttributeoptions - The set of options for which to make the determination
(may be null).true if this attribute has exactly the
specified set of options.public int size()
Attributepublic void toString(StringBuilder buffer)
Attributebuffer - The buffer to which the information should be appended.Copyright © 2010-2015 ForgeRock AS. All Rights Reserved.