From 89debdc4f4f38e0d973c9f4f37e1c34002deeeb4 Mon Sep 17 00:00:00 2001
From: matthew_swift <matthew_swift@localhost>
Date: Tue, 22 May 2007 14:35:47 +0000
Subject: [PATCH] Various improvements and refactorings of the admin framework client API, including:
---
opendj-sdk/opends/src/server/org/opends/server/admin/client/ldap/LDAPNameBuilder.java | 37 ++++++++++++++++++++++++-------------
1 files changed, 24 insertions(+), 13 deletions(-)
diff --git a/opendj-sdk/opends/src/server/org/opends/server/admin/client/ldap/LDAPNameBuilder.java b/opendj-sdk/opends/src/server/org/opends/server/admin/client/ldap/LDAPNameBuilder.java
index 021b1ce..167b988 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/admin/client/ldap/LDAPNameBuilder.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/admin/client/ldap/LDAPNameBuilder.java
@@ -54,15 +54,19 @@
final class LDAPNameBuilder implements ManagedObjectPathSerializer {
/**
- * Creates a new LDAP name representing the specified managed object path.
+ * Creates a new LDAP name representing the specified managed object
+ * path.
*
* @param path
* The managed object path.
- * @return Returns a new LDAP name representing the specified managed object
- * path.
+ * @param profile
+ * The LDAP profile which should be used to construct LDAP
+ * names.
+ * @return Returns a new LDAP name representing the specified
+ * managed object path.
*/
- public static LdapName create(ManagedObjectPath path) {
- LDAPNameBuilder builder = new LDAPNameBuilder();
+ public static LdapName create(ManagedObjectPath path, LDAPProfile profile) {
+ LDAPNameBuilder builder = new LDAPNameBuilder(profile);
path.serialize(builder);
return builder.getInstance();
}
@@ -70,19 +74,22 @@
/**
- * Creates a new LDAP name representing the specified managed object path and
- * instantiable relation.
+ * Creates a new LDAP name representing the specified managed object
+ * path and instantiable relation.
*
* @param path
* The managed object path.
* @param relation
* The child instantiable relation.
- * @return Returns a new LDAP name representing the specified managed object
- * path and instantiable relation.
+ * @param profile
+ * The LDAP profile which should be used to construct LDAP
+ * names.
+ * @return Returns a new LDAP name representing the specified
+ * managed object path and instantiable relation.
*/
public static LdapName create(ManagedObjectPath path,
- InstantiableRelationDefinition<?, ?> relation) {
- LDAPNameBuilder builder = new LDAPNameBuilder();
+ InstantiableRelationDefinition<?, ?> relation, LDAPProfile profile) {
+ LDAPNameBuilder builder = new LDAPNameBuilder(profile);
path.serialize(builder);
builder.appendManagedObjectPathElement(relation);
return builder.getInstance();
@@ -98,10 +105,14 @@
/**
* Create a new JNDI LDAP name builder.
+ *
+ * @param profile
+ * The LDAP profile which should be used to construct LDAP
+ * names.
*/
- public LDAPNameBuilder() {
+ public LDAPNameBuilder(LDAPProfile profile) {
this.rdns = new LinkedList<Rdn>();
- this.profile = LDAPProfile.getInstance();
+ this.profile = profile;
}
--
Gitblit v1.10.0