From 1157e1957a5b8d8d2b04a54b0b7d50271dec77c6 Mon Sep 17 00:00:00 2001
From: david_page <david_page@localhost>
Date: Tue, 02 Oct 2007 21:15:52 +0000
Subject: [PATCH] issue 466 (partial) secret key re-wrapping (extended operation support)

---
 opendj-sdk/opends/src/server/org/opends/server/schema/BinarySyntax.java |   26 +++++++++++++++++++++-----
 1 files changed, 21 insertions(+), 5 deletions(-)

diff --git a/opendj-sdk/opends/src/server/org/opends/server/schema/BinarySyntax.java b/opendj-sdk/opends/src/server/org/opends/server/schema/BinarySyntax.java
index 1e6e101..a823d3fe 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/schema/BinarySyntax.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/schema/BinarySyntax.java
@@ -29,14 +29,12 @@
 
 
 import org.opends.server.admin.std.server.AttributeSyntaxCfg;
-import org.opends.server.api.ApproximateMatchingRule;
-import org.opends.server.api.AttributeSyntax;
-import org.opends.server.api.EqualityMatchingRule;
-import org.opends.server.api.OrderingMatchingRule;
-import org.opends.server.api.SubstringMatchingRule;
+import org.opends.server.api.*;
 import org.opends.server.config.ConfigException;
 import org.opends.server.core.DirectoryServer;
 import org.opends.server.types.ByteString;
+import org.opends.server.types.AttributeValue;
+import org.opends.server.types.DirectoryException;
 
 import static org.opends.server.loggers.ErrorLogger.*;
 import static org.opends.messages.SchemaMessages.*;
@@ -65,6 +63,24 @@
 
 
   /**
+   * A {@code byte[]} attribute value decoder for this syntax.
+   */
+  public static final AttributeValueDecoder<byte[]> DECODER =
+    new AttributeValueDecoder<byte[]>()
+  {
+    /**
+     * {@inheritDoc}
+     */
+    public byte[] decode(AttributeValue value) throws DirectoryException {
+      // Make sure that the value is valid.
+      value.getNormalizedValue();
+      return value.getValueBytes();
+    }
+  };
+
+
+
+  /**
    * Creates a new instance of this syntax.  Note that the only thing that
    * should be done here is to invoke the default constructor for the
    * superclass.  All initialization should be performed in the

--
Gitblit v1.10.0