From 046430396dd40a63d6f574bf53c4d3ad2977a130 Mon Sep 17 00:00:00 2001
From: Matthew Swift <matthew.swift@forgerock.com>
Date: Mon, 07 May 2012 16:48:34 +0000
Subject: [PATCH] Initial implementation for OPENDJ-355: Add fluent API for decoding attributes

---
 opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldap/Entry.java |   28 ++++++++++++++++++++++++++++
 1 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldap/Entry.java b/opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldap/Entry.java
index 0873122..3c1c382 100644
--- a/opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldap/Entry.java
+++ b/opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldap/Entry.java
@@ -323,6 +323,34 @@
     int hashCode();
 
     /**
+     * Returns a parser for the named attribute contained in this entry.
+     *
+     * @param attributeDescription
+     *            The name of the attribute to be parsed.
+     * @return A parser for the named attribute.
+     * @throws NullPointerException
+     *             If {@code attributeDescription} was {@code null}.
+     */
+    AttributeParser parseAttribute(AttributeDescription attributeDescription);
+
+    /**
+     * Returns a parser for the named attribute contained in this entry.
+     * <p>
+     * The attribute description will be decoded using the schema associated
+     * with this entry (usually the default schema).
+     *
+     * @param attributeDescription
+     *            The name of the attribute to be parsed.
+     * @return A parser for the named attribute.
+     * @throws LocalizedIllegalArgumentException
+     *             If {@code attributeDescription} could not be decoded using
+     *             the schema associated with this entry.
+     * @throws NullPointerException
+     *             If {@code attributeDescription} was {@code null}.
+     */
+    AttributeParser parseAttribute(String attributeDescription);
+
+    /**
      * Removes all of the attribute values contained in {@code attribute} from
      * this entry if it is present (optional operation). If {@code attribute} is
      * empty then the entire attribute will be removed if it is present.

--
Gitblit v1.10.0