From c430f8b3da724d0a117eadd172b92179b9a0b5a9 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Fri, 21 Mar 2014 11:59:48 +0000
Subject: [PATCH] OPENDJ-1368 (CR-3232) Remove AttributeValue

---
 opendj3-server-dev/src/server/org/opends/server/api/VirtualAttributeProvider.java |   39 ++++++++++++++++++++++++++++++---------
 1 files changed, 30 insertions(+), 9 deletions(-)

diff --git a/opendj3-server-dev/src/server/org/opends/server/api/VirtualAttributeProvider.java b/opendj3-server-dev/src/server/org/opends/server/api/VirtualAttributeProvider.java
index 8a33e70..1a83583 100644
--- a/opendj3-server-dev/src/server/org/opends/server/api/VirtualAttributeProvider.java
+++ b/opendj3-server-dev/src/server/org/opends/server/api/VirtualAttributeProvider.java
@@ -190,6 +190,26 @@
     return getValues(entry, rule).contains(value);
   }
 
+  /**
+   * Indicates whether this virtual attribute provider matches the assertion
+   * value.
+   *
+   * @param entry
+   *          The entry for which to make the determination.
+   * @param rule
+   *          The virtual attribute rule which defines the constraints for the
+   *          virtual attribute.
+   * @param assertionValue
+   *          The assertion value for which to make the determination.
+   * @return {@code true} if this virtual attribute provider matches the
+   *         specified assertion value for the provided entry, or {@code false}
+   *         if not.
+   */
+  public ConditionResult matchesEqualityAssertion(Entry entry,
+      VirtualAttributeRule rule, ByteString assertionValue)
+  {
+    return getValues(entry, rule).matchesEqualityAssertion(assertionValue);
+  }
 
 
   /**
@@ -359,12 +379,12 @@
    *          The virtual attribute rule which defines the constraints for the
    *          virtual attribute.
    * @param assertionValue
-   *          The value for which to make the determination.
+   *          The assertion value for which to make the determination.
    * @return {@code UNDEFINED} if the associated attribute type does not have an
    *         ordering matching rule, {@code TRUE} if at least one of the
    *         generated values will be greater than or equal to the specified
-   *         value, or {@code FALSE} if none of the generated values will be
-   *         greater than or equal to the specified value.
+   *         assertion value, or {@code FALSE} if none of the generated values
+   *         will be greater than or equal to the specified value.
    */
   public ConditionResult greaterThanOrEqualTo(Entry entry,
                               VirtualAttributeRule rule,
@@ -421,12 +441,12 @@
    *          The virtual attribute rule which defines the constraints for the
    *          virtual attribute.
    * @param assertionValue
-   *          The value for which to make the determination.
+   *          The assertion value for which to make the determination.
    * @return {@code UNDEFINED} if the associated attribute type does not have an
    *         ordering matching rule, {@code TRUE} if at least one of the
-   *         generated values will be less than or equal to the specified value,
-   *         or {@code FALSE} if none of the generated values will be greater
-   *         than or equal to the specified value.
+   *         generated values will be less than or equal to the specified
+   *         assertion value, or {@code FALSE} if none of the generated values
+   *         will be greater than or equal to the specified value.
    */
   public ConditionResult lessThanOrEqualTo(Entry entry,
                               VirtualAttributeRule rule,
@@ -482,14 +502,15 @@
    * @param  entry  The entry for which to make the determination.
    * @param  rule   The virtual attribute rule which defines the
    *                constraints for the virtual attribute.
-   * @param  assertionValue  The value for which to make the determination.
+   * @param  assertionValue
+   *          The assertion value for which to make the determination.
    *
    * @return  {@code UNDEFINED} if the associated attribute type does
    *          not have an approximate matching rule, {@code TRUE} if at
    *          least one of the generated values will be approximately
    *          equal to the specified value, or {@code FALSE} if none
    *          of the generated values will be approximately equal to
-   *          the specified value.
+   *          the specified assertion value.
    */
   public ConditionResult approximatelyEqualTo(Entry entry,
                               VirtualAttributeRule rule,

--
Gitblit v1.10.0