You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2011/12/03 09:18:34 UTC
svn commit: r1209850 - in /directory/apacheds/trunk:
core-api/src/main/java/org/apache/directory/server/core/api/interceptor/
core-api/src/main/java/org/apache/directory/server/core/api/partition/
core-api/src/main/java/org/apache/directory/server/core...
Author: elecharny
Date: Sat Dec 3 08:18:34 2011
New Revision: 1209850
URL: http://svn.apache.org/viewvc?rev=1209850&view=rev
Log:
Removed the Bind operation from the Partition interface
Modified:
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/BaseInterceptor.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/partition/Partition.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/schema/SchemaPartition.java
directory/apacheds/trunk/core-shared/src/main/java/org/apache/directory/server/core/shared/partition/DefaultPartitionNexus.java
directory/apacheds/trunk/service/src/main/java/org/apache/directory/server/ApacheDsService.java
directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java
Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/BaseInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/BaseInterceptor.java?rev=1209850&r1=1209849&r2=1209850&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/BaseInterceptor.java (original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/BaseInterceptor.java Sat Dec 3 08:18:34 2011
@@ -157,7 +157,7 @@ public abstract class BaseInterceptor im
*/
public void bind( BindOperationContext bindContext ) throws LdapException
{
- nexus.bind( bindContext );
+ // Do nothing here : there is no support for the Bind operation in Partition
}
Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/partition/Partition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/partition/Partition.java?rev=1209850&r1=1209849&r2=1209850&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/partition/Partition.java (original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/partition/Partition.java Sat Dec 3 08:18:34 2011
@@ -6,16 +6,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
- * under the License.
- *
+ * under the License.
+ *
*/
package org.apache.directory.server.core.api.partition;
@@ -26,7 +26,6 @@ import java.io.OutputStream;
import org.apache.directory.server.core.api.entry.ServerSearchResult;
import org.apache.directory.server.core.api.filtering.EntryFilteringCursor;
import org.apache.directory.server.core.api.interceptor.context.AddOperationContext;
-import org.apache.directory.server.core.api.interceptor.context.BindOperationContext;
import org.apache.directory.server.core.api.interceptor.context.DeleteOperationContext;
import org.apache.directory.server.core.api.interceptor.context.HasEntryOperationContext;
import org.apache.directory.server.core.api.interceptor.context.ListOperationContext;
@@ -45,7 +44,7 @@ import org.apache.directory.shared.ldap.
/**
- * Interface for entry stores containing a part of the DIB (Directory
+ * Interface for entry stores containing a part of the DIB (Directory
* Information Base). Partitions are associated with a specific suffix, and
* all entries contained in the them have the same Dn suffix in common.
*
@@ -144,7 +143,7 @@ public interface Partition
/**
- * Deletes a leaf entry from this ContextPartition: non-leaf entries cannot be
+ * Deletes a leaf entry from this ContextPartition: non-leaf entries cannot be
* deleted until this operation has been applied to their children.
*
* @param deleteContext the context of the entry to
@@ -166,8 +165,8 @@ public interface Partition
/**
* Modifies an entry by adding, removing or replacing a set of attributes.
*
- * @param modifyContext The context containing the modification operation
- * to perform on the entry which is one of constants specified by the
+ * @param modifyContext The context containing the modification operation
+ * to perform on the entry which is one of constants specified by the
* DirContext interface:
* <code>ADD_ATTRIBUTE, REMOVE_ATTRIBUTE, REPLACE_ATTRIBUTE</code>.
*
@@ -181,9 +180,9 @@ public interface Partition
/**
- * A specialized form of one level search used to return a minimal set of
+ * A specialized form of one level search used to return a minimal set of
* information regarding child entries under a base. Convenience method
- * used to optimize operations rather than conducting a full search with
+ * used to optimize operations rather than conducting a full search with
* retrieval.
*
* @param listContext the context containing the distinguished/absolute name for the search/listing
@@ -203,7 +202,7 @@ public interface Partition
*
* @param searchContext The context containing the information used by the operation
* @throws Exception if there are any problems
- * @return a NamingEnumeration containing objects of type
+ * @return a NamingEnumeration containing objects of type
*/
EntryFilteringCursor search( SearchOperationContext searchContext ) throws LdapException;
@@ -271,17 +270,6 @@ public interface Partition
/**
- * Represents a bind operation issued to authenticate a client. Partitions
- * need not support this operation. This operation is here to enable those
- * interested in implementing virtual directories with ApacheDS.
- *
- * @param bindContext the bind context, containing all the needed informations to bind
- * @throws LdapException if something goes wrong
- */
- void bind( BindOperationContext bindContext ) throws LdapException;
-
-
- /**
* Represents an unbind operation issued by an authenticated client. Partitions
* need not support this operation. This operation is here to enable those
* interested in implementing virtual directories with ApacheDS.
Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/schema/SchemaPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/schema/SchemaPartition.java?rev=1209850&r1=1209849&r2=1209850&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/schema/SchemaPartition.java (original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/schema/SchemaPartition.java Sat Dec 3 08:18:34 2011
@@ -27,7 +27,6 @@ import org.apache.directory.server.const
import org.apache.directory.server.core.api.CoreSession;
import org.apache.directory.server.core.api.filtering.EntryFilteringCursor;
import org.apache.directory.server.core.api.interceptor.context.AddOperationContext;
-import org.apache.directory.server.core.api.interceptor.context.BindOperationContext;
import org.apache.directory.server.core.api.interceptor.context.DeleteOperationContext;
import org.apache.directory.server.core.api.interceptor.context.HasEntryOperationContext;
import org.apache.directory.server.core.api.interceptor.context.ListOperationContext;
@@ -126,11 +125,10 @@ public final class SchemaPartition exten
/** A static Dn for the ou=schema partition */
private static Dn SCHEMA_DN;
-
+
/** The ObjectClass AttributeType */
private static AttributeType OBJECT_CLASS_AT;
-
public SchemaPartition( SchemaManager schemaManager )
{
try
@@ -284,12 +282,6 @@ public final class SchemaPartition exten
}
- public void bind( BindOperationContext bindContext ) throws LdapException
- {
- wrapped.bind( bindContext );
- }
-
-
/**
* {@inheritDoc}
*/
@@ -321,6 +313,7 @@ public final class SchemaPartition exten
}
catch ( Exception e )
{
+ e.printStackTrace();
return 0;
}
}
Modified: directory/apacheds/trunk/core-shared/src/main/java/org/apache/directory/server/core/shared/partition/DefaultPartitionNexus.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-shared/src/main/java/org/apache/directory/server/core/shared/partition/DefaultPartitionNexus.java?rev=1209850&r1=1209849&r2=1209850&view=diff
==============================================================================
--- directory/apacheds/trunk/core-shared/src/main/java/org/apache/directory/server/core/shared/partition/DefaultPartitionNexus.java (original)
+++ directory/apacheds/trunk/core-shared/src/main/java/org/apache/directory/server/core/shared/partition/DefaultPartitionNexus.java Sat Dec 3 08:18:34 2011
@@ -459,16 +459,6 @@ public class DefaultPartitionNexus exten
/**
* {@inheritDoc}
*/
- public void bind( BindOperationContext bindContext ) throws LdapException
- {
- Partition partition = getPartition( bindContext.getDn() );
- partition.bind( bindContext );
- }
-
-
- /**
- * {@inheritDoc}
- */
public boolean compare( CompareOperationContext compareContext ) throws LdapException
{
Attribute attr = compareContext.getOriginalEntry().get( compareContext.getAttributeType() );
Modified: directory/apacheds/trunk/service/src/main/java/org/apache/directory/server/ApacheDsService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/service/src/main/java/org/apache/directory/server/ApacheDsService.java?rev=1209850&r1=1209849&r2=1209850&view=diff
==============================================================================
--- directory/apacheds/trunk/service/src/main/java/org/apache/directory/server/ApacheDsService.java (original)
+++ directory/apacheds/trunk/service/src/main/java/org/apache/directory/server/ApacheDsService.java Sat Dec 3 08:18:34 2011
@@ -6,16 +6,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
- * under the License.
- *
+ * under the License.
+ *
*/
package org.apache.directory.server;
@@ -139,7 +139,7 @@ public class ApacheDsService
/**
- * starts various services configured according to the
+ * starts various services configured according to the
* configuration present in the given instance's layout
*
* @param instanceLayout the on disk location's layout of the intance to be started
@@ -152,6 +152,7 @@ public class ApacheDsService
if ( !partitionsDir.exists() )
{
LOG.info( "partition directory doesn't exist, creating {}", partitionsDir.getAbsolutePath() );
+
if ( !partitionsDir.mkdirs() )
{
throw new IOException(I18n.err( I18n.ERR_112_COULD_NOT_CREATE_DIRECORY, partitionsDir ) );
@@ -223,7 +224,7 @@ public class ApacheDsService
schemaManager = new DefaultSchemaManager( loader );
// We have to load the schema now, otherwise we won't be able
- // to initialize the Partitions, as we won't be able to parse
+ // to initialize the Partitions, as we won't be able to parse
// and normalize their suffix Dn
schemaManager.loadAllEnabled();
@@ -432,10 +433,10 @@ public class ApacheDsService
// LOG.info( "Cannot find any reference to the DNS Server in the configuration : the server won't be started" );
// return;
// }
- //
+ //
// System.out.println( "Starting the DNS server" );
// LOG.info( "Starting the DNS server" );
- //
+ //
// printBanner( BANNER_DNS );
// long startTime = System.currentTimeMillis();
//
@@ -610,7 +611,7 @@ public class ApacheDsService
// + " /_/ \\_\\ .__/ \\__,_|\\___|_| |_|\\___|____/|_|\\__|____/ \n"
// + " |_| \n";
//
- //
+ //
// private static final String BANNER_DHCP =
// " _ _ ____ _ _ ___ ____ \n"
// + " / \\ _ __ ___ ___| |__ ___| _ \\| | | |/ __| _ \\ \n"
@@ -641,11 +642,11 @@ public class ApacheDsService
* adds mandatory operational attributes {@link #MANDATORY_ENTRY_ATOP_MAP} and updates all the LDIF files.
* WARN: this method is only called for the first time when schema and config files are bootstrapped
* afterwards it is the responsibility of the user to ensure correctness of LDIF files if modified
- * by hand
+ * by hand
*
* Note: we do these modifications explicitly cause we have no idea if each entry's LDIF file has the
* correct values for all these mandatory attributes
- *
+ *
* @param partition instance of the partition Note: should only be those which are loaded before starting the DirectoryService
* @param dirService the DirectoryService instance
* @throws Exception
Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java?rev=1209850&r1=1209849&r2=1209850&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java Sat Dec 3 08:18:34 2011
@@ -39,7 +39,6 @@ import org.apache.directory.server.core.
import org.apache.directory.server.core.api.filtering.BaseEntryFilteringCursor;
import org.apache.directory.server.core.api.filtering.EntryFilteringCursor;
import org.apache.directory.server.core.api.interceptor.context.AddOperationContext;
-import org.apache.directory.server.core.api.interceptor.context.BindOperationContext;
import org.apache.directory.server.core.api.interceptor.context.DeleteOperationContext;
import org.apache.directory.server.core.api.interceptor.context.HasEntryOperationContext;
import org.apache.directory.server.core.api.interceptor.context.ListOperationContext;
@@ -71,7 +70,6 @@ import org.apache.directory.shared.ldap.
import org.apache.directory.shared.ldap.model.entry.Value;
import org.apache.directory.shared.ldap.model.exception.LdapAliasDereferencingException;
import org.apache.directory.shared.ldap.model.exception.LdapAliasException;
-import org.apache.directory.shared.ldap.model.exception.LdapAuthenticationNotSupportedException;
import org.apache.directory.shared.ldap.model.exception.LdapContextNotEmptyException;
import org.apache.directory.shared.ldap.model.exception.LdapEntryAlreadyExistsException;
import org.apache.directory.shared.ldap.model.exception.LdapException;
@@ -690,20 +688,6 @@ public abstract class AbstractBTreeParti
//---------------------------------------------------------------------------------------------
- // The Bind operation
- //---------------------------------------------------------------------------------------------
- /**
- * {@inheritDoc}
- */
- public final void bind( BindOperationContext bindContext ) throws LdapException
- {
- // does nothing
- throw new LdapAuthenticationNotSupportedException( ResultCodeEnum.AUTH_METHOD_NOT_SUPPORTED, I18n
- .err( I18n.ERR_702 ) );
- }
-
-
- //---------------------------------------------------------------------------------------------
// The Delete operation
//---------------------------------------------------------------------------------------------
/**