directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1149637 - in /directory/studio/trunk/plugins/apacheds.configuration.v2: ./ src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/
Date Fri, 22 Jul 2011 15:45:15 GMT
Author: pamarcelot
Date: Fri Jul 22 15:45:14 2011
New Revision: 1149637

URL: http://svn.apache.org/viewvc?rev=1149637&view=rev
Log:
Updated partition subclasses due to recent refactoring of the Partition hierarchy.

Modified:
    directory/studio/trunk/plugins/apacheds.configuration.v2/pom.xml
    directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/EntryBasedConfigurationPartition.java
    directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/PartitionsDiffComputer.java

Modified: directory/studio/trunk/plugins/apacheds.configuration.v2/pom.xml
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/apacheds.configuration.v2/pom.xml?rev=1149637&r1=1149636&r2=1149637&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration.v2/pom.xml (original)
+++ directory/studio/trunk/plugins/apacheds.configuration.v2/pom.xml Fri Jul 22 15:45:14 2011
@@ -128,7 +128,8 @@
  org.eclipse.ui,
  org.eclipse.ui.editors,
  org.eclipse.ui.forms,
- org.eclipse.ui.ide</Require-Bundle>
+ org.eclipse.ui.ide,
+ org.slf4j.api;bundle-version="${org.slf4j.version}"</Require-Bundle>
             <Export-Package>org.apache.directory.studio.apacheds.configuration.v2*</Export-Package>
             <Import-Package>!</Import-Package>
             <Private-Package>!</Private-Package>

Modified: directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/EntryBasedConfigurationPartition.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/EntryBasedConfigurationPartition.java?rev=1149637&r1=1149636&r2=1149637&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/EntryBasedConfigurationPartition.java
(original)
+++ directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/EntryBasedConfigurationPartition.java
Fri Jul 22 15:45:14 2011
@@ -25,17 +25,10 @@ import java.util.UUID;
 import javax.naming.InvalidNameException;
 
 import org.apache.directory.server.core.interceptor.context.AddOperationContext;
-import org.apache.directory.server.core.interceptor.context.BindOperationContext;
-import org.apache.directory.server.core.interceptor.context.ModifyOperationContext;
-import org.apache.directory.server.core.interceptor.context.MoveAndRenameOperationContext;
-import org.apache.directory.server.core.interceptor.context.MoveOperationContext;
-import org.apache.directory.server.core.interceptor.context.RenameOperationContext;
-import org.apache.directory.server.core.partition.impl.avl.AvlPartition;
 import org.apache.directory.server.core.partition.ldif.AbstractLdifPartition;
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.apache.directory.shared.ldap.model.exception.LdapException;
-import org.apache.directory.shared.ldap.model.name.Dn;
 import org.apache.directory.shared.ldap.model.schema.SchemaManager;
 
 
@@ -56,7 +49,7 @@ public class EntryBasedConfigurationPart
      */
     public EntryBasedConfigurationPartition( SchemaManager schemaManager )
     {
-        setSchemaManager( schemaManager );
+        super( schemaManager );
     }
 
 
@@ -65,15 +58,7 @@ public class EntryBasedConfigurationPart
      */
     protected void doInit() throws InvalidNameException, Exception
     {
-        // Initializing the wrapped partition
-        setWrappedPartition( new AvlPartition() );
         setId( "config" );
-        setSuffix( new Dn( "ou=config" ) );
-        wrappedPartition.setSchemaManager( schemaManager );
-        wrappedPartition.initialize();
-
-        // Getting the search engine
-        searchEngine = wrappedPartition.getSearchEngine();
     }
 
 
@@ -90,7 +75,7 @@ public class EntryBasedConfigurationPart
         addMandatoryOpAt( entry );
 
         // Storing the entry
-        wrappedPartition.getStore().add( entry );
+        add( new AddOperationContext( null, entry ) );
     }
 
 
@@ -112,67 +97,4 @@ public class EntryBasedConfigurationPart
             entry.add( SchemaConstants.ENTRY_UUID_AT, uuid );
         }
     }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public void bind( BindOperationContext bindOperationContext ) throws LdapException
-    {
-        wrappedPartition.bind( bindOperationContext );
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public void add( AddOperationContext addOperationContext ) throws LdapException
-    {
-        wrappedPartition.add( addOperationContext );
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public void delete( Long id ) throws LdapException
-    {
-        wrappedPartition.delete( id );
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public void modify( ModifyOperationContext modifyOperationContext ) throws LdapException
-    {
-        wrappedPartition.modify( modifyOperationContext );
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public void move( MoveOperationContext moveOperationContext ) throws LdapException
-    {
-        wrappedPartition.move( moveOperationContext );
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public void moveAndRename( MoveAndRenameOperationContext moveAndRenameOperationContext
) throws LdapException
-    {
-        wrappedPartition.moveAndRename( moveAndRenameOperationContext );
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public void rename( RenameOperationContext renameOperationContext ) throws LdapException
-    {
-        wrappedPartition.rename( renameOperationContext );
-    }
 }

Modified: directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/PartitionsDiffComputer.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/PartitionsDiffComputer.java?rev=1149637&r1=1149636&r2=1149637&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/PartitionsDiffComputer.java
(original)
+++ directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/PartitionsDiffComputer.java
Fri Jul 22 15:45:14 2011
@@ -78,14 +78,14 @@ public class PartitionsDiffComputer
     {
         // Using the original partition suffix as base 
         // '*' for all user attributes, '+' for all operational attributes
-        return computeModifications( originalPartition.getSuffix(), new String[]
+        return computeModifications( originalPartition.getSuffixDn(), new String[]
             { "*", "+" } );
     }
 
 
     public List<LdifEntry> computeModifications( String[] attributeIds ) throws Exception
     {
-        return computeModifications( originalPartition.getSuffix(), attributeIds );
+        return computeModifications( originalPartition.getSuffixDn(), attributeIds );
     }
 
 
@@ -94,7 +94,7 @@ public class PartitionsDiffComputer
         // Checking partitions
         checkPartitions();
 
-        return comparePartitions(baseDn, attributeIds );
+        return comparePartitions( baseDn, attributeIds );
     }
 
 
@@ -116,7 +116,7 @@ public class PartitionsDiffComputer
             {
                 throw new PartitionsDiffException( "The original partition must be intialized."
);
             }
-            else if ( originalPartition.getSuffix() == null )
+            else if ( originalPartition.getSuffixDn() == null )
             {
                 throw new PartitionsDiffException( "The original suffix is null." );
             }
@@ -133,7 +133,7 @@ public class PartitionsDiffComputer
             {
                 throw new PartitionsDiffException( "The destination partition must be intialized."
);
             }
-            else if ( destinationPartition.getSuffix() == null )
+            else if ( destinationPartition.getSuffixDn() == null )
             {
                 throw new PartitionsDiffException( "The destination suffix is null." );
             }
@@ -219,15 +219,15 @@ public class PartitionsDiffComputer
                 setReturningAttributes( originalPartition.getSchemaManager(), attributeIds,
soc );
                 soc.setDn( originalEntry.getDn() );
                 soc.setScope( SearchScope.ONELEVEL );
-                soc.setFilter( FilterParser.parse(originalPartition.getSchemaManager(), "(objectClass=*)")
);
+                soc.setFilter( FilterParser.parse( originalPartition.getSchemaManager(),
"(objectClass=*)" ) );
                 soc.setAliasDerefMode( AliasDerefMode.DEREF_ALWAYS );
 
                 // Looking for the children of the current entry
                 EntryFilteringCursor cursor = originalPartition.search( soc );
-                
+
                 while ( cursor.next() )
                 {
-                    originalEntries.add( ((ClonedServerEntry)cursor.get()).getClonedEntry()
);
+                    originalEntries.add( ( ( ClonedServerEntry ) cursor.get() ).getClonedEntry()
);
                 }
             }
         }
@@ -359,7 +359,7 @@ public class PartitionsDiffComputer
                     modification.setOperation( ModificationOperation.ADD_ATTRIBUTE );
                     Attribute attribute = new DefaultAttribute( destinationAttributeType
);
                     modification.setAttribute( attribute );
-                    
+
                     for ( Value<?> value : destinationAttribute )
                     {
                         try
@@ -406,7 +406,7 @@ public class PartitionsDiffComputer
                 modification.setOperation( ModificationOperation.REMOVE_ATTRIBUTE );
                 Attribute attribute = new DefaultAttribute( originalAttribute.getAttributeType()
);
                 modification.setAttribute( attribute );
-                
+
                 try
                 {
                     attribute.add( originalValue );
@@ -432,9 +432,9 @@ public class PartitionsDiffComputer
                 modification.setOperation( ModificationOperation.ADD_ATTRIBUTE );
                 Attribute attribute = new DefaultAttribute( originalAttribute.getAttributeType()
);
                 modification.setAttribute( attribute );
-                
+
                 try
-                { 
+                {
                     attribute.add( destinationValue );
                 }
                 catch ( LdapInvalidAttributeValueException liave )



Mime
View raw message