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 2007/09/19 18:58:47 UTC
svn commit: r577371 -
/directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/interceptor/MockInterceptor.java
Author: elecharny
Date: Wed Sep 19 09:58:47 2007
New Revision: 577371
URL: http://svn.apache.org/viewvc?rev=577371&view=rev
Log:
Removed the ^M
Modified:
directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/interceptor/MockInterceptor.java
Modified: directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/interceptor/MockInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/interceptor/MockInterceptor.java?rev=577371&r1=577370&r2=577371&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/interceptor/MockInterceptor.java (original)
+++ directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/interceptor/MockInterceptor.java Wed Sep 19 09:58:47 2007
@@ -1,231 +1,231 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * 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.
- *
- */
-package org.apache.directory.server.core.interceptor;
-
-
-import java.util.Iterator;
-
-import javax.naming.NamingEnumeration;
-import javax.naming.NamingException;
-import javax.naming.directory.Attributes;
-import javax.naming.directory.SearchResult;
-
-import org.apache.directory.server.core.DirectoryServiceConfiguration;
-import org.apache.directory.server.core.configuration.InterceptorConfiguration;
-import org.apache.directory.server.core.interceptor.context.AddContextPartitionOperationContext;
-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.CompareOperationContext;
-import org.apache.directory.server.core.interceptor.context.DeleteOperationContext;
-import org.apache.directory.server.core.interceptor.context.EntryOperationContext;
-import org.apache.directory.server.core.interceptor.context.GetMatchedNameOperationContext;
-import org.apache.directory.server.core.interceptor.context.GetRootDSEOperationContext;
-import org.apache.directory.server.core.interceptor.context.GetSuffixOperationContext;
-import org.apache.directory.server.core.interceptor.context.ListOperationContext;
-import org.apache.directory.server.core.interceptor.context.ListSuffixOperationContext;
-import org.apache.directory.server.core.interceptor.context.LookupOperationContext;
-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.RemoveContextPartitionOperationContext;
-import org.apache.directory.server.core.interceptor.context.RenameOperationContext;
-import org.apache.directory.server.core.interceptor.context.SearchOperationContext;
-import org.apache.directory.server.core.interceptor.context.UnbindOperationContext;
-import org.apache.directory.shared.ldap.name.LdapDN;
-
-
-public class MockInterceptor implements Interceptor
-{
- InterceptorChainTest test;
- String name;
-
-
- public void setName( String name )
- {
- this.name = name;
- }
-
-
- public void setTest( InterceptorChainTest test )
- {
- this.test = test;
- }
-
-
- public String getName()
- {
- return this.name;
- }
-
-
- public void init( DirectoryServiceConfiguration factoryCfg, InterceptorConfiguration cfg )
- throws NamingException
- {
- }
-
-
- public void destroy()
- {
- }
-
-
- public Attributes getRootDSE( NextInterceptor next, GetRootDSEOperationContext opContext ) throws NamingException
- {
- test.interceptors.add( this );
- return next.getRootDSE( opContext );
- }
-
-
- public LdapDN getMatchedName ( NextInterceptor next, GetMatchedNameOperationContext opContext ) throws NamingException
- {
- test.interceptors.add( this );
- return next.getMatchedName( opContext );
- }
-
-
- public LdapDN getSuffix ( NextInterceptor next, GetSuffixOperationContext opContext ) throws NamingException
- {
- test.interceptors.add( this );
- return next.getSuffix( opContext );
- }
-
-
- public Iterator listSuffixes ( NextInterceptor next, ListSuffixOperationContext opContext ) throws NamingException
- {
- test.interceptors.add( this );
- return next.listSuffixes( opContext );
- }
-
-
- public void addContextPartition( NextInterceptor next, AddContextPartitionOperationContext opContext )
- throws NamingException
- {
- test.interceptors.add( this );
- next.addContextPartition( opContext );
- }
-
-
- public void removeContextPartition( NextInterceptor next, RemoveContextPartitionOperationContext opContext ) throws NamingException
- {
- test.interceptors.add( this );
- next.removeContextPartition( opContext );
- }
-
-
- public boolean compare( NextInterceptor next, CompareOperationContext opContext ) throws NamingException
- {
- test.interceptors.add( this );
- return next.compare( opContext );
- }
-
-
- public void delete( NextInterceptor next, DeleteOperationContext opContext ) throws NamingException
- {
- test.interceptors.add( this );
- next.delete( opContext );
- }
-
-
- public void add( NextInterceptor next, AddOperationContext opContext )
- throws NamingException
- {
- test.interceptors.add( this );
- next.add( opContext );
- }
-
-
- public void modify( NextInterceptor next, ModifyOperationContext opContext ) throws NamingException
- {
- test.interceptors.add( this );
- next.modify( opContext );
- }
-
-
- public NamingEnumeration list( NextInterceptor next, ListOperationContext opContext ) throws NamingException
- {
- test.interceptors.add( this );
- return next.list( opContext );
- }
-
-
- public NamingEnumeration<SearchResult> search( NextInterceptor next, SearchOperationContext opContext ) throws NamingException
- {
- test.interceptors.add( this );
- return next.search( opContext );
- }
-
-
- public Attributes lookup( NextInterceptor next, LookupOperationContext opContext ) throws NamingException
- {
- test.interceptors.add( this );
- return next.lookup( opContext );
- }
-
-
- public boolean hasEntry( NextInterceptor next, EntryOperationContext opContext ) throws NamingException
- {
- test.interceptors.add( this );
- return next.hasEntry( opContext );
- }
-
-
- public void rename( NextInterceptor next, RenameOperationContext opContext )
- throws NamingException
- {
- test.interceptors.add( this );
- next.rename( opContext );
- }
-
-
- public void move( NextInterceptor next, MoveOperationContext opContext ) throws NamingException
- {
- test.interceptors.add( this );
- next.move( opContext );
- }
-
-
- public void moveAndRename( NextInterceptor next, MoveAndRenameOperationContext opContext )
- throws NamingException
- {
- test.interceptors.add( this );
- next.moveAndRename( opContext );
- }
-
-
- public void bind( NextInterceptor next, BindOperationContext opContext )
- throws NamingException
- {
- test.interceptors.add( this );
- next.bind( opContext );
- }
-
-
- public void unbind( NextInterceptor next, UnbindOperationContext opContext ) throws NamingException
- {
- test.interceptors.add( this );
- next.unbind( opContext );
- }
-
-
- public String toString()
- {
- return name;
- }
-}
\ No newline at end of file
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * 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.
+ *
+ */
+package org.apache.directory.server.core.interceptor;
+
+
+import java.util.Iterator;
+
+import javax.naming.NamingEnumeration;
+import javax.naming.NamingException;
+import javax.naming.directory.Attributes;
+import javax.naming.directory.SearchResult;
+
+import org.apache.directory.server.core.DirectoryServiceConfiguration;
+import org.apache.directory.server.core.configuration.InterceptorConfiguration;
+import org.apache.directory.server.core.interceptor.context.AddContextPartitionOperationContext;
+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.CompareOperationContext;
+import org.apache.directory.server.core.interceptor.context.DeleteOperationContext;
+import org.apache.directory.server.core.interceptor.context.EntryOperationContext;
+import org.apache.directory.server.core.interceptor.context.GetMatchedNameOperationContext;
+import org.apache.directory.server.core.interceptor.context.GetRootDSEOperationContext;
+import org.apache.directory.server.core.interceptor.context.GetSuffixOperationContext;
+import org.apache.directory.server.core.interceptor.context.ListOperationContext;
+import org.apache.directory.server.core.interceptor.context.ListSuffixOperationContext;
+import org.apache.directory.server.core.interceptor.context.LookupOperationContext;
+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.RemoveContextPartitionOperationContext;
+import org.apache.directory.server.core.interceptor.context.RenameOperationContext;
+import org.apache.directory.server.core.interceptor.context.SearchOperationContext;
+import org.apache.directory.server.core.interceptor.context.UnbindOperationContext;
+import org.apache.directory.shared.ldap.name.LdapDN;
+
+
+public class MockInterceptor implements Interceptor
+{
+ InterceptorChainTest test;
+ String name;
+
+
+ public void setName( String name )
+ {
+ this.name = name;
+ }
+
+
+ public void setTest( InterceptorChainTest test )
+ {
+ this.test = test;
+ }
+
+
+ public String getName()
+ {
+ return this.name;
+ }
+
+
+ public void init( DirectoryServiceConfiguration factoryCfg, InterceptorConfiguration cfg )
+ throws NamingException
+ {
+ }
+
+
+ public void destroy()
+ {
+ }
+
+
+ public Attributes getRootDSE( NextInterceptor next, GetRootDSEOperationContext opContext ) throws NamingException
+ {
+ test.interceptors.add( this );
+ return next.getRootDSE( opContext );
+ }
+
+
+ public LdapDN getMatchedName ( NextInterceptor next, GetMatchedNameOperationContext opContext ) throws NamingException
+ {
+ test.interceptors.add( this );
+ return next.getMatchedName( opContext );
+ }
+
+
+ public LdapDN getSuffix ( NextInterceptor next, GetSuffixOperationContext opContext ) throws NamingException
+ {
+ test.interceptors.add( this );
+ return next.getSuffix( opContext );
+ }
+
+
+ public Iterator listSuffixes ( NextInterceptor next, ListSuffixOperationContext opContext ) throws NamingException
+ {
+ test.interceptors.add( this );
+ return next.listSuffixes( opContext );
+ }
+
+
+ public void addContextPartition( NextInterceptor next, AddContextPartitionOperationContext opContext )
+ throws NamingException
+ {
+ test.interceptors.add( this );
+ next.addContextPartition( opContext );
+ }
+
+
+ public void removeContextPartition( NextInterceptor next, RemoveContextPartitionOperationContext opContext ) throws NamingException
+ {
+ test.interceptors.add( this );
+ next.removeContextPartition( opContext );
+ }
+
+
+ public boolean compare( NextInterceptor next, CompareOperationContext opContext ) throws NamingException
+ {
+ test.interceptors.add( this );
+ return next.compare( opContext );
+ }
+
+
+ public void delete( NextInterceptor next, DeleteOperationContext opContext ) throws NamingException
+ {
+ test.interceptors.add( this );
+ next.delete( opContext );
+ }
+
+
+ public void add( NextInterceptor next, AddOperationContext opContext )
+ throws NamingException
+ {
+ test.interceptors.add( this );
+ next.add( opContext );
+ }
+
+
+ public void modify( NextInterceptor next, ModifyOperationContext opContext ) throws NamingException
+ {
+ test.interceptors.add( this );
+ next.modify( opContext );
+ }
+
+
+ public NamingEnumeration list( NextInterceptor next, ListOperationContext opContext ) throws NamingException
+ {
+ test.interceptors.add( this );
+ return next.list( opContext );
+ }
+
+
+ public NamingEnumeration<SearchResult> search( NextInterceptor next, SearchOperationContext opContext ) throws NamingException
+ {
+ test.interceptors.add( this );
+ return next.search( opContext );
+ }
+
+
+ public Attributes lookup( NextInterceptor next, LookupOperationContext opContext ) throws NamingException
+ {
+ test.interceptors.add( this );
+ return next.lookup( opContext );
+ }
+
+
+ public boolean hasEntry( NextInterceptor next, EntryOperationContext opContext ) throws NamingException
+ {
+ test.interceptors.add( this );
+ return next.hasEntry( opContext );
+ }
+
+
+ public void rename( NextInterceptor next, RenameOperationContext opContext )
+ throws NamingException
+ {
+ test.interceptors.add( this );
+ next.rename( opContext );
+ }
+
+
+ public void move( NextInterceptor next, MoveOperationContext opContext ) throws NamingException
+ {
+ test.interceptors.add( this );
+ next.move( opContext );
+ }
+
+
+ public void moveAndRename( NextInterceptor next, MoveAndRenameOperationContext opContext )
+ throws NamingException
+ {
+ test.interceptors.add( this );
+ next.moveAndRename( opContext );
+ }
+
+
+ public void bind( NextInterceptor next, BindOperationContext opContext )
+ throws NamingException
+ {
+ test.interceptors.add( this );
+ next.bind( opContext );
+ }
+
+
+ public void unbind( NextInterceptor next, UnbindOperationContext opContext ) throws NamingException
+ {
+ test.interceptors.add( this );
+ next.unbind( opContext );
+ }
+
+
+ public String toString()
+ {
+ return name;
+ }
+}