directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r1074875 - in /directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config: ConfigPartitionReader.java beans/AdsBaseBean.java
Date Sat, 26 Feb 2011 16:53:57 GMT
Author: kayyagari
Date: Sat Feb 26 16:53:57 2011
New Revision: 1074875

URL: http://svn.apache.org/viewvc?rev=1074875&view=rev
Log:
o adding DN property to link the bean to the corresponding entry
  (this is helpful while exporting the config data right after reading using config reader,
in this case we need not compute DN using ConfigWriter.getDn())

Modified:
    directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java
    directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/beans/AdsBaseBean.java

Modified: directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java?rev=1074875&r1=1074874&r2=1074875&view=diff
==============================================================================
--- directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java
(original)
+++ directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java
Sat Feb 26 16:53:57 2011
@@ -775,6 +775,8 @@ public class ConfigPartitionReader
                 Set<AttributeType> musts = getAllMusts( objectClass );
                 LOG.debug( "Fetching the following MAY attributes : {}", dumpATs( musts )
);
                 readFields( bean, entry, musts, MANDATORY );
+                
+                bean.setDn( entry.getDn() );
 
                 // Done, we can add the bean into the list
                 beans.add( bean );

Modified: directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/beans/AdsBaseBean.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/beans/AdsBaseBean.java?rev=1074875&r1=1074874&r2=1074875&view=diff
==============================================================================
--- directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/beans/AdsBaseBean.java
(original)
+++ directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/beans/AdsBaseBean.java
Sat Feb 26 16:53:57 2011
@@ -40,7 +40,10 @@ public abstract class AdsBaseBean
     @ConfigurationElement(attributeType = "description")
     private String description;
 
+    /** the DN of the entry with which this bean is associated */
+    private Dn dn;
 
+    
     /**
      * Create a new BaseBean instance
      */
@@ -177,6 +180,11 @@ public abstract class AdsBaseBean
         {
             sb.append( tabs ).append( "description : '" ).append( description ).append( "'\n"
);
         }
+        
+        if ( dn != null )
+        {
+            sb.append( tabs ).append( "DN: " ).append( dn ).append( "'\n" );
+        }
 
         return sb.toString();
     }
@@ -185,6 +193,24 @@ public abstract class AdsBaseBean
     /**
      * {@inheritDoc}
      */
+    public void setDn( Dn dn )
+    {
+        this.dn = dn;
+    }
+
+
+     /**
+      * {@inheritDoc}
+      */
+    public Dn getDn()
+    {
+        return dn;
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
     public String toString()
     {
         return toString( "" );



Mime
View raw message