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 2009/08/05 19:55:16 UTC
svn commit: r801340 [6/13] - in /directory/apacheds/trunk:
core-entry/src/main/java/org/apache/directory/server/core/entry/
core-entry/src/test/java/org/apache/directory/server/core/entry/
core-integ/src/main/java/org/apache/directory/server/core/integ...
Modified: directory/apacheds/trunk/core-integ/src/main/java/org/apache/directory/server/core/integ/IntegrationUtils.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/main/java/org/apache/directory/server/core/integ/IntegrationUtils.java?rev=801340&r1=801339&r2=801340&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/main/java/org/apache/directory/server/core/integ/IntegrationUtils.java (original)
+++ directory/apacheds/trunk/core-integ/src/main/java/org/apache/directory/server/core/integ/IntegrationUtils.java Wed Aug 5 17:55:15 2009
@@ -1,344 +1,344 @@
-/*
- * 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.integ;
-
-
+/*
+ * 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.integ;
+
+
import java.io.File;
import java.io.IOException;
import java.util.List;
-import java.util.Map;
-
+import java.util.Map;
+
import javax.naming.InvalidNameException;
import javax.naming.NamingException;
-import javax.naming.directory.Attribute;
-import javax.naming.directory.BasicAttribute;
-import javax.naming.directory.DirContext;
-import javax.naming.directory.ModificationItem;
+import javax.naming.directory.Attribute;
+import javax.naming.directory.BasicAttribute;
+import javax.naming.directory.DirContext;
+import javax.naming.directory.ModificationItem;
import javax.naming.ldap.LdapContext;
import org.apache.commons.io.FileUtils;
import org.apache.directory.server.constants.ServerDNConstants;
import org.apache.directory.server.core.DirectoryService;
import org.apache.directory.server.core.authn.LdapPrincipal;
-import org.apache.directory.server.core.entry.DefaultServerEntry;
+import org.apache.directory.server.core.entry.DefaultServerEntry;
import org.apache.directory.shared.ldap.constants.AuthenticationLevel;
-import org.apache.directory.shared.ldap.entry.EntryAttribute;
-import org.apache.directory.shared.ldap.entry.client.DefaultClientAttribute;
+import org.apache.directory.shared.ldap.entry.EntryAttribute;
+import org.apache.directory.shared.ldap.entry.client.DefaultClientAttribute;
import org.apache.directory.shared.ldap.ldif.ChangeType;
import org.apache.directory.shared.ldap.ldif.LdifEntry;
import org.apache.directory.shared.ldap.ldif.LdifReader;
import org.apache.directory.shared.ldap.name.LdapDN;
-import org.apache.directory.shared.ldap.name.Rdn;
+import org.apache.directory.shared.ldap.name.Rdn;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.apache.directory.server.core.CoreSession;
-import org.apache.directory.server.core.jndi.ServerLdapContext;
-import org.apache.directory.server.schema.bootstrap.Schema;
-
-
-/**
- * Integration test utility methods.
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- * @version $Rev$, $Date$
- */
-public class IntegrationUtils
+import org.apache.directory.server.core.CoreSession;
+import org.apache.directory.server.core.jndi.ServerLdapContext;
+import org.apache.directory.server.schema.bootstrap.Schema;
+
+
+/**
+ * Integration test utility methods.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class IntegrationUtils
{
- /** The class logger */
- private static final Logger LOG = LoggerFactory.getLogger( IntegrationUtils.class );
-
-
- /**
- * Deletes the working directory.
- *
- * @param wkdir the working directory to delete
- * @throws IOException if the working directory cannot be deleted
- */
- public static void doDelete( File wkdir ) throws IOException
- {
- if ( wkdir.exists() )
- {
- try
- {
- FileUtils.deleteDirectory( wkdir );
- }
- catch ( IOException e )
- {
- LOG.error( "Failed to delete the working directory.", e );
- }
- }
- if ( wkdir.exists() )
- {
- throw new IOException( "Failed to delete: " + wkdir );
- }
- }
-
-
- /**
- * Inject an ldif String into the server. DN must be relative to the
- * root.
- *
- * @param service the directory service to use
- * @param ldif the ldif containing entries to add to the server.
- * @throws NamingException if there is a problem adding the entries from the LDIF
- */
- public static void injectEntries( DirectoryService service, String ldif ) throws Exception
- {
- LdifReader reader = new LdifReader();
- List<LdifEntry> entries = reader.parseLdif( ldif );
-
- for ( LdifEntry entry : entries )
- {
- if ( entry.isChangeAdd() )
- {
- service.getAdminSession().add(
- new DefaultServerEntry( service.getRegistries(), entry.getEntry() ) );
- }
- else if ( entry.isChangeModify() )
- {
- service.getAdminSession().modify(
- entry.getDn(), entry.getModificationItems() );
- }
- else
- {
- String message = "Unsupported changetype found in LDIF: " +
- entry.getChangeType();
- LOG.error( message );
- throw new NamingException( message );
- }
- }
- }
-
-
- public static LdifEntry getUserAddLdif() throws InvalidNameException, NamingException
- {
- return getUserAddLdif( "uid=akarasulu,ou=users,ou=system", "test".getBytes(), "Alex Karasulu", "Karasulu" );
- }
-
-
- public static LdapContext getContext( String principalDn, DirectoryService service, String dn )
- throws Exception
- {
- if ( principalDn == null )
- {
- principalDn = "";
- }
-
- LdapDN userDn = new LdapDN( principalDn );
- userDn.normalize( service.getRegistries().getAttributeTypeRegistry().getNormalizerMapping() );
- LdapPrincipal principal = new LdapPrincipal( userDn, AuthenticationLevel.SIMPLE );
-
- if ( dn == null )
- {
- dn = "";
- }
-
- CoreSession session = service.getSession( principal );
- LdapContext ctx = new ServerLdapContext( service, session, new LdapDN( dn ) );
- return ctx;
- }
-
-
- public static CoreSession getCoreSession( String principalDn, DirectoryService service, String dn )
- throws Exception
- {
- if ( principalDn == null )
- {
- principalDn = "";
- }
-
- LdapDN userDn = new LdapDN( principalDn );
- userDn.normalize( service.getRegistries().getAttributeTypeRegistry().getNormalizerMapping() );
- LdapPrincipal principal = new LdapPrincipal( userDn, AuthenticationLevel.SIMPLE );
-
- if ( dn == null )
- {
- dn = "";
- }
-
- CoreSession session = service.getSession( principal );
- return session;
- }
-
-
- public static LdapContext getSystemContext( DirectoryService service ) throws Exception
- {
- return getContext( ServerDNConstants.ADMIN_SYSTEM_DN, service, ServerDNConstants.SYSTEM_DN );
- }
-
-
- public static LdapContext getSchemaContext( DirectoryService service ) throws Exception
- {
- return getContext( ServerDNConstants.ADMIN_SYSTEM_DN, service, ServerDNConstants.OU_SCHEMA_DN );
- }
-
-
- public static LdapContext getRootContext( DirectoryService service ) throws Exception
- {
- return getContext( ServerDNConstants.ADMIN_SYSTEM_DN, service, "" );
- }
-
-
- public static void apply( DirectoryService service, LdifEntry entry ) throws Exception
- {
- LdapDN dn = new LdapDN( entry.getDn() );
- CoreSession session = service.getAdminSession();
-
- switch( entry.getChangeType().getChangeType() )
- {
- case( ChangeType.ADD_ORDINAL ):
- session.add(
- new DefaultServerEntry( service.getRegistries(), entry.getEntry() ) );
+ /** The class logger */
+ private static final Logger LOG = LoggerFactory.getLogger( IntegrationUtils.class );
+
+
+ /**
+ * Deletes the working directory.
+ *
+ * @param wkdir the working directory to delete
+ * @throws IOException if the working directory cannot be deleted
+ */
+ public static void doDelete( File wkdir ) throws IOException
+ {
+ if ( wkdir.exists() )
+ {
+ try
+ {
+ FileUtils.deleteDirectory( wkdir );
+ }
+ catch ( IOException e )
+ {
+ LOG.error( "Failed to delete the working directory.", e );
+ }
+ }
+ if ( wkdir.exists() )
+ {
+ throw new IOException( "Failed to delete: " + wkdir );
+ }
+ }
+
+
+ /**
+ * Inject an ldif String into the server. DN must be relative to the
+ * root.
+ *
+ * @param service the directory service to use
+ * @param ldif the ldif containing entries to add to the server.
+ * @throws NamingException if there is a problem adding the entries from the LDIF
+ */
+ public static void injectEntries( DirectoryService service, String ldif ) throws Exception
+ {
+ LdifReader reader = new LdifReader();
+ List<LdifEntry> entries = reader.parseLdif( ldif );
+
+ for ( LdifEntry entry : entries )
+ {
+ if ( entry.isChangeAdd() )
+ {
+ service.getAdminSession().add(
+ new DefaultServerEntry( service.getRegistries(), entry.getEntry() ) );
+ }
+ else if ( entry.isChangeModify() )
+ {
+ service.getAdminSession().modify(
+ entry.getDn(), entry.getModificationItems() );
+ }
+ else
+ {
+ String message = "Unsupported changetype found in LDIF: " +
+ entry.getChangeType();
+ LOG.error( message );
+ throw new NamingException( message );
+ }
+ }
+ }
+
+
+ public static LdifEntry getUserAddLdif() throws InvalidNameException, NamingException
+ {
+ return getUserAddLdif( "uid=akarasulu,ou=users,ou=system", "test".getBytes(), "Alex Karasulu", "Karasulu" );
+ }
+
+
+ public static LdapContext getContext( String principalDn, DirectoryService service, String dn )
+ throws Exception
+ {
+ if ( principalDn == null )
+ {
+ principalDn = "";
+ }
+
+ LdapDN userDn = new LdapDN( principalDn );
+ userDn.normalize( service.getRegistries().getAttributeTypeRegistry().getNormalizerMapping() );
+ LdapPrincipal principal = new LdapPrincipal( userDn, AuthenticationLevel.SIMPLE );
+
+ if ( dn == null )
+ {
+ dn = "";
+ }
+
+ CoreSession session = service.getSession( principal );
+ LdapContext ctx = new ServerLdapContext( service, session, new LdapDN( dn ) );
+ return ctx;
+ }
+
+
+ public static CoreSession getCoreSession( String principalDn, DirectoryService service, String dn )
+ throws Exception
+ {
+ if ( principalDn == null )
+ {
+ principalDn = "";
+ }
+
+ LdapDN userDn = new LdapDN( principalDn );
+ userDn.normalize( service.getRegistries().getAttributeTypeRegistry().getNormalizerMapping() );
+ LdapPrincipal principal = new LdapPrincipal( userDn, AuthenticationLevel.SIMPLE );
+
+ if ( dn == null )
+ {
+ dn = "";
+ }
+
+ CoreSession session = service.getSession( principal );
+ return session;
+ }
+
+
+ public static LdapContext getSystemContext( DirectoryService service ) throws Exception
+ {
+ return getContext( ServerDNConstants.ADMIN_SYSTEM_DN, service, ServerDNConstants.SYSTEM_DN );
+ }
+
+
+ public static LdapContext getSchemaContext( DirectoryService service ) throws Exception
+ {
+ return getContext( ServerDNConstants.ADMIN_SYSTEM_DN, service, ServerDNConstants.OU_SCHEMA_DN );
+ }
+
+
+ public static LdapContext getRootContext( DirectoryService service ) throws Exception
+ {
+ return getContext( ServerDNConstants.ADMIN_SYSTEM_DN, service, "" );
+ }
+
+
+ public static void apply( DirectoryService service, LdifEntry entry ) throws Exception
+ {
+ LdapDN dn = new LdapDN( entry.getDn() );
+ CoreSession session = service.getAdminSession();
+
+ switch( entry.getChangeType().getChangeType() )
+ {
+ case( ChangeType.ADD_ORDINAL ):
+ session.add(
+ new DefaultServerEntry( service.getRegistries(), entry.getEntry() ) );
+ break;
+
+ case( ChangeType.DELETE_ORDINAL ):
+ session.delete( dn );
break;
-
- case( ChangeType.DELETE_ORDINAL ):
- session.delete( dn );
+
+ case( ChangeType.MODDN_ORDINAL ):
+ case( ChangeType.MODRDN_ORDINAL ):
+ Rdn newRdn = new Rdn( entry.getNewRdn() );
+
+ if ( entry.getNewSuperior() != null )
+ {
+ // It's a move. The superior have changed
+ // Let's see if it's a rename too
+ Rdn oldRdn = dn.getRdn();
+ LdapDN newSuperior = new LdapDN( entry.getNewSuperior() );
+
+ if ( dn.size() == 0 )
+ {
+ throw new IllegalStateException( "can't move the root DSE" );
+ }
+ else if ( oldRdn.equals( newRdn ) )
+ {
+ // Same rdn : it's a move
+ session.move( dn, newSuperior );
+ }
+ else
+ {
+ // it's a move and rename
+ session.moveAndRename( dn, newSuperior, newRdn, entry.isDeleteOldRdn() );
+ }
+ }
+ else
+ {
+ // it's a rename
+ session.rename( dn, newRdn, entry.isDeleteOldRdn() );
+ }
+
break;
-
- case( ChangeType.MODDN_ORDINAL ):
- case( ChangeType.MODRDN_ORDINAL ):
- Rdn newRdn = new Rdn( entry.getNewRdn() );
-
- if ( entry.getNewSuperior() != null )
- {
- // It's a move. The superior have changed
- // Let's see if it's a rename too
- Rdn oldRdn = dn.getRdn();
- LdapDN newSuperior = new LdapDN( entry.getNewSuperior() );
-
- if ( dn.size() == 0 )
- {
- throw new IllegalStateException( "can't move the root DSE" );
- }
- else if ( oldRdn.equals( newRdn ) )
- {
- // Same rdn : it's a move
- session.move( dn, newSuperior );
- }
- else
- {
- // it's a move and rename
- session.moveAndRename( dn, newSuperior, newRdn, entry.isDeleteOldRdn() );
- }
- }
- else
- {
- // it's a rename
- session.rename( dn, newRdn, entry.isDeleteOldRdn() );
- }
-
+
+ case( ChangeType.MODIFY_ORDINAL ):
+ session.modify( dn, entry.getModificationItems() );
break;
- case( ChangeType.MODIFY_ORDINAL ):
- session.modify( dn, entry.getModificationItems() );
- break;
-
- default:
- throw new IllegalStateException( "Unidentified change type value: " + entry.getChangeType() );
- }
- }
-
-
- public static LdifEntry getUserAddLdif( String dnstr, byte[] password, String cn, String sn )
- throws InvalidNameException, NamingException
- {
- LdapDN dn = new LdapDN( dnstr );
- LdifEntry ldif = new LdifEntry();
- ldif.setDn( dnstr );
- ldif.setChangeType( ChangeType.Add );
-
- EntryAttribute attr = new DefaultClientAttribute( "objectClass",
- "top", "person", "organizationalPerson", "inetOrgPerson" );
- ldif.addAttribute( attr );
-
- attr = new DefaultClientAttribute( "ou", "Engineering", "People" );
- ldif.addAttribute( attr );
-
- String uid = ( String ) dn.getRdn().getValue();
- ldif.putAttribute( "uid", uid );
-
- ldif.putAttribute( "l", "Bogusville" );
- ldif.putAttribute( "cn", cn );
- ldif.putAttribute( "sn", sn );
- ldif.putAttribute( "mail", uid + "@apache.org" );
- ldif.putAttribute( "telephoneNumber", "+1 408 555 4798" );
- ldif.putAttribute( "facsimileTelephoneNumber", "+1 408 555 9751" );
- ldif.putAttribute( "roomnumber", "4612" );
- ldif.putAttribute( "userPassword", password );
-
- String givenName = cn.split( " " )[0];
- ldif.putAttribute( "givenName", givenName );
- return ldif;
- }
-
- // -----------------------------------------------------------------------
- // Enable/Disable Schema Tests
- // -----------------------------------------------------------------------
- public static Map<String, Schema> getLoadedSchemas( DirectoryService service )
- {
- return service.getRegistries().getLoadedSchemas();
- }
-
-
- public static void enableSchema( DirectoryService service, String schemaName ) throws Exception
- {
- LdapContext schemaRoot = getSchemaContext( service );
-
- // now enable the test schema
- ModificationItem[] mods = new ModificationItem[1];
- Attribute attr = new BasicAttribute( "m-disabled", "FALSE" );
- mods[0] = new ModificationItem( DirContext.REPLACE_ATTRIBUTE, attr );
- schemaRoot.modifyAttributes( "cn=" + schemaName, mods );
- }
-
-
- public static void disableSchema( DirectoryService service, String schemaName ) throws Exception
- {
- LdapContext schemaRoot = getSchemaContext( service );
-
- // now enable the test schema
- ModificationItem[] mods = new ModificationItem[1];
- Attribute attr = new BasicAttribute( "m-disabled", "TRUE" );
- mods[0] = new ModificationItem( DirContext.REPLACE_ATTRIBUTE, attr );
- schemaRoot.modifyAttributes( "cn=" + schemaName, mods );
- }
-
-
- /**
- * A helper method which tells if a schema is disabled
- */
- public static boolean isDisabled( DirectoryService service, String schemaName )
- {
- Schema schema = getLoadedSchemas(service ).get( schemaName );
-
- return ( schema == null ) || ( schema.isDisabled() );
- }
-
-
- /**
- * A helper method which tells if a schema is enabled
- */
- public static boolean isEnabled( DirectoryService service, String schemaName )
- {
- Schema schema = getLoadedSchemas( service ).get( schemaName );
-
- return ( schema != null ) && ( !schema.isDisabled() );
- }
-}
+ default:
+ throw new IllegalStateException( "Unidentified change type value: " + entry.getChangeType() );
+ }
+ }
+
+
+ public static LdifEntry getUserAddLdif( String dnstr, byte[] password, String cn, String sn )
+ throws InvalidNameException, NamingException
+ {
+ LdapDN dn = new LdapDN( dnstr );
+ LdifEntry ldif = new LdifEntry();
+ ldif.setDn( dnstr );
+ ldif.setChangeType( ChangeType.Add );
+
+ EntryAttribute attr = new DefaultClientAttribute( "objectClass",
+ "top", "person", "organizationalPerson", "inetOrgPerson" );
+ ldif.addAttribute( attr );
+
+ attr = new DefaultClientAttribute( "ou", "Engineering", "People" );
+ ldif.addAttribute( attr );
+
+ String uid = ( String ) dn.getRdn().getValue();
+ ldif.putAttribute( "uid", uid );
+
+ ldif.putAttribute( "l", "Bogusville" );
+ ldif.putAttribute( "cn", cn );
+ ldif.putAttribute( "sn", sn );
+ ldif.putAttribute( "mail", uid + "@apache.org" );
+ ldif.putAttribute( "telephoneNumber", "+1 408 555 4798" );
+ ldif.putAttribute( "facsimileTelephoneNumber", "+1 408 555 9751" );
+ ldif.putAttribute( "roomnumber", "4612" );
+ ldif.putAttribute( "userPassword", password );
+
+ String givenName = cn.split( " " )[0];
+ ldif.putAttribute( "givenName", givenName );
+ return ldif;
+ }
+
+ // -----------------------------------------------------------------------
+ // Enable/Disable Schema Tests
+ // -----------------------------------------------------------------------
+ public static Map<String, Schema> getLoadedSchemas( DirectoryService service )
+ {
+ return service.getRegistries().getLoadedSchemas();
+ }
+
+
+ public static void enableSchema( DirectoryService service, String schemaName ) throws Exception
+ {
+ LdapContext schemaRoot = getSchemaContext( service );
+
+ // now enable the test schema
+ ModificationItem[] mods = new ModificationItem[1];
+ Attribute attr = new BasicAttribute( "m-disabled", "FALSE" );
+ mods[0] = new ModificationItem( DirContext.REPLACE_ATTRIBUTE, attr );
+ schemaRoot.modifyAttributes( "cn=" + schemaName, mods );
+ }
+
+
+ public static void disableSchema( DirectoryService service, String schemaName ) throws Exception
+ {
+ LdapContext schemaRoot = getSchemaContext( service );
+
+ // now enable the test schema
+ ModificationItem[] mods = new ModificationItem[1];
+ Attribute attr = new BasicAttribute( "m-disabled", "TRUE" );
+ mods[0] = new ModificationItem( DirContext.REPLACE_ATTRIBUTE, attr );
+ schemaRoot.modifyAttributes( "cn=" + schemaName, mods );
+ }
+
+
+ /**
+ * A helper method which tells if a schema is disabled
+ */
+ public static boolean isDisabled( DirectoryService service, String schemaName )
+ {
+ Schema schema = getLoadedSchemas(service ).get( schemaName );
+
+ return ( schema == null ) || ( schema.isDisabled() );
+ }
+
+
+ /**
+ * A helper method which tells if a schema is enabled
+ */
+ public static boolean isEnabled( DirectoryService service, String schemaName )
+ {
+ Schema schema = getLoadedSchemas( service ).get( schemaName );
+
+ return ( schema != null ) && ( !schema.isDisabled() );
+ }
+}
Modified: directory/apacheds/trunk/core-integ/src/main/java/org/apache/directory/server/core/integ/Level.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/main/java/org/apache/directory/server/core/integ/Level.java?rev=801340&r1=801339&r2=801340&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/main/java/org/apache/directory/server/core/integ/Level.java (original)
+++ directory/apacheds/trunk/core-integ/src/main/java/org/apache/directory/server/core/integ/Level.java Wed Aug 5 17:55:15 2009
@@ -1,64 +1,64 @@
-/*
- * 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.integ;
-
-
-/**
- * A scope or level of testing. There are four levels:
- *
- * <ul>
- * <li>
- * <b>system level</b>: the level external to the testing framework</li>
- * </li>
- * <li>
- * <b>suite level</b>: the level representing test suite scope</li>
- * </li>
- * <li>
- * <b>class level</b>: the level representing test class scope</li>
- * </li>
- * <li>
- * <b>method level</b>: the lowest level representing test method scope</li>
- * </li>
- * </ul>
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- * @version $Rev$, $Date$
- */
-public enum Level
-{
- SUITE( 0, "test suite level" ),
- CLASS( 1, "test class level" ),
- SYSTEM( 2, "test system level" ),
- METHOD( 3, "test method level" );
-
- public final int ordinal;
- public final String description;
-
- public static final int SUITE_ORDINAL = 0;
- public static final int CLASS_ORDINAL = 1;
- public static final int SYSTEM_ORDINAL = 2;
- public static final int METHOD_ORDINAL = 3;
-
-
- Level( int ordinal, String description )
- {
- this.ordinal = ordinal;
- this.description = description;
- }
-}
+/*
+ * 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.integ;
+
+
+/**
+ * A scope or level of testing. There are four levels:
+ *
+ * <ul>
+ * <li>
+ * <b>system level</b>: the level external to the testing framework</li>
+ * </li>
+ * <li>
+ * <b>suite level</b>: the level representing test suite scope</li>
+ * </li>
+ * <li>
+ * <b>class level</b>: the level representing test class scope</li>
+ * </li>
+ * <li>
+ * <b>method level</b>: the lowest level representing test method scope</li>
+ * </li>
+ * </ul>
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public enum Level
+{
+ SUITE( 0, "test suite level" ),
+ CLASS( 1, "test class level" ),
+ SYSTEM( 2, "test system level" ),
+ METHOD( 3, "test method level" );
+
+ public final int ordinal;
+ public final String description;
+
+ public static final int SUITE_ORDINAL = 0;
+ public static final int CLASS_ORDINAL = 1;
+ public static final int SYSTEM_ORDINAL = 2;
+ public static final int METHOD_ORDINAL = 3;
+
+
+ Level( int ordinal, String description )
+ {
+ this.ordinal = ordinal;
+ this.description = description;
+ }
+}
Modified: directory/apacheds/trunk/core-integ/src/main/java/org/apache/directory/server/core/integ/SetupMode.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/main/java/org/apache/directory/server/core/integ/SetupMode.java?rev=801340&r1=801339&r2=801340&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/main/java/org/apache/directory/server/core/integ/SetupMode.java (original)
+++ directory/apacheds/trunk/core-integ/src/main/java/org/apache/directory/server/core/integ/SetupMode.java Wed Aug 5 17:55:15 2009
@@ -1,125 +1,125 @@
-/*
- * 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.integ;
-
-
-/**
- * Different modes of conducting core tests.
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- * @version $Rev$, $Date$
- */
-public enum SetupMode
-{
- /*
-
- MATRIX FOR MODE ACTIONS BASED ON SERVER STATE
-
- | NOSERVICE | PRISTINE | RESTART | ROLLBACK | CUMULATIVE
- +===========+===========+==========+==========+===========
- | | | | |
- RUNNING | NOTHING | SHUTDOWN | SHUTDOWN | REVERT | NOTHING
- STOPPED | NOTHING | CLEANUP | STARTUP | CLEANUP | RESTART
- MISSING | NOTHING | CREATE | CREATE | CREATE | CREATE
-
- */
-
-
- /**
- * If a service is running this mode will shutdown the service, destroy
- * it's working directory, null it out and start all over again with a
- * new service object to start it up fresh. If no service is running,
- * yet a valid handle to a stopped service exists, this handle is used
- * to destroy the working directory then the handle is nulled out.
- * Whether or not a valid service exists a new one is created, and
- * started up.
- */
- PRISTINE( 0, "PRISTINE: Fresh test with full working directory cleanout." ),
- /**
- * If a service is running this mode will shutdown the service, WITHOUT
- * destroying it's working directory, so changes made in tests are or
- * should be persistant. The same service object is restarted without
- * creating a new one. If the service exists yet is found to have been
- * shutdown it is restarted. If no service is available, one is created
- * and started up.
- */
- RESTART( 1, "RESTART: Working directories are not cleaned out but the core is restarted." ),
- /**
- * If a service is running this mode will NOT shutdown the service,
- * instead the service's state will be reverted to it's previous state
- * before the last test which operated on it. So changes are not
- * persisted across tests. If the service exists yet has been shutdown
- * the working directory is cleaned out and the service is started up.
- * We must destroy working directories since reverts are not possible
- * across shutdowns at this point in time (change log is not persistent).
- */
- ROLLBACK( 2, "ROLLBACK: The service is not stopped, it's state is restored to the original startup state." ),
- /**
- * If a service is running it is used as is. Changes across tests have
- * no isolation. If the service has been stopped it is simply restarted.
- * If the service does not exists it is created then started. There is
- * no attempt to destroy existing working directories if any at all exist.
- */
- CUMULATIVE( 3, "CUMULATIVE: Nothing is done to the service between tests so changes accumulate." ),
- /**
- * Does nothing at all. Does not care if service is running or if it
- * exists. This is the default. Really useful with suites which you
- * may not want to do anything with. Otherwise for all other modes a
- * suite will start up a server before all runs and shut it down after
- * all runs.
- */
- NOSERVICE( 4, "NOSERVICE: No service is required at all." );
-
- public static final int PRISTINE_ORDINAL = 0;
- public static final int RESTART_ORDINAL = 1;
- public static final int ROLLBACK_ORDINAL = 2;
- public static final int CUMULATIVE_ORDINAL = 3;
- public static final int NOSERVICE_ORDINAL = 4;
-
-
- public final int ordinal;
- public final String description;
-
-
- private SetupMode( int ordinal, String description )
- {
- this.ordinal = ordinal;
- this.description = description;
- }
-
-
- public boolean isStartedDirtyTestable()
- {
- switch( ordinal )
- {
- case( PRISTINE_ORDINAL ):
- return false;
- case( ROLLBACK_ORDINAL ):
- return false;
- case( NOSERVICE_ORDINAL ):
- return true;
- case( RESTART_ORDINAL ):
- return true;
- case( CUMULATIVE_ORDINAL ):
- return true;
- default:
- throw new IllegalStateException( "Unidentified ordinal value: " + ordinal );
- }
- }
-}
+/*
+ * 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.integ;
+
+
+/**
+ * Different modes of conducting core tests.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public enum SetupMode
+{
+ /*
+
+ MATRIX FOR MODE ACTIONS BASED ON SERVER STATE
+
+ | NOSERVICE | PRISTINE | RESTART | ROLLBACK | CUMULATIVE
+ +===========+===========+==========+==========+===========
+ | | | | |
+ RUNNING | NOTHING | SHUTDOWN | SHUTDOWN | REVERT | NOTHING
+ STOPPED | NOTHING | CLEANUP | STARTUP | CLEANUP | RESTART
+ MISSING | NOTHING | CREATE | CREATE | CREATE | CREATE
+
+ */
+
+
+ /**
+ * If a service is running this mode will shutdown the service, destroy
+ * it's working directory, null it out and start all over again with a
+ * new service object to start it up fresh. If no service is running,
+ * yet a valid handle to a stopped service exists, this handle is used
+ * to destroy the working directory then the handle is nulled out.
+ * Whether or not a valid service exists a new one is created, and
+ * started up.
+ */
+ PRISTINE( 0, "PRISTINE: Fresh test with full working directory cleanout." ),
+ /**
+ * If a service is running this mode will shutdown the service, WITHOUT
+ * destroying it's working directory, so changes made in tests are or
+ * should be persistant. The same service object is restarted without
+ * creating a new one. If the service exists yet is found to have been
+ * shutdown it is restarted. If no service is available, one is created
+ * and started up.
+ */
+ RESTART( 1, "RESTART: Working directories are not cleaned out but the core is restarted." ),
+ /**
+ * If a service is running this mode will NOT shutdown the service,
+ * instead the service's state will be reverted to it's previous state
+ * before the last test which operated on it. So changes are not
+ * persisted across tests. If the service exists yet has been shutdown
+ * the working directory is cleaned out and the service is started up.
+ * We must destroy working directories since reverts are not possible
+ * across shutdowns at this point in time (change log is not persistent).
+ */
+ ROLLBACK( 2, "ROLLBACK: The service is not stopped, it's state is restored to the original startup state." ),
+ /**
+ * If a service is running it is used as is. Changes across tests have
+ * no isolation. If the service has been stopped it is simply restarted.
+ * If the service does not exists it is created then started. There is
+ * no attempt to destroy existing working directories if any at all exist.
+ */
+ CUMULATIVE( 3, "CUMULATIVE: Nothing is done to the service between tests so changes accumulate." ),
+ /**
+ * Does nothing at all. Does not care if service is running or if it
+ * exists. This is the default. Really useful with suites which you
+ * may not want to do anything with. Otherwise for all other modes a
+ * suite will start up a server before all runs and shut it down after
+ * all runs.
+ */
+ NOSERVICE( 4, "NOSERVICE: No service is required at all." );
+
+ public static final int PRISTINE_ORDINAL = 0;
+ public static final int RESTART_ORDINAL = 1;
+ public static final int ROLLBACK_ORDINAL = 2;
+ public static final int CUMULATIVE_ORDINAL = 3;
+ public static final int NOSERVICE_ORDINAL = 4;
+
+
+ public final int ordinal;
+ public final String description;
+
+
+ private SetupMode( int ordinal, String description )
+ {
+ this.ordinal = ordinal;
+ this.description = description;
+ }
+
+
+ public boolean isStartedDirtyTestable()
+ {
+ switch( ordinal )
+ {
+ case( PRISTINE_ORDINAL ):
+ return false;
+ case( ROLLBACK_ORDINAL ):
+ return false;
+ case( NOSERVICE_ORDINAL ):
+ return true;
+ case( RESTART_ORDINAL ):
+ return true;
+ case( CUMULATIVE_ORDINAL ):
+ return true;
+ default:
+ throw new IllegalStateException( "Unidentified ordinal value: " + ordinal );
+ }
+ }
+}
Modified: directory/apacheds/trunk/core-integ/src/main/java/org/apache/directory/server/core/integ/annotations/ApplyLdifFiles.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/main/java/org/apache/directory/server/core/integ/annotations/ApplyLdifFiles.java?rev=801340&r1=801339&r2=801340&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/main/java/org/apache/directory/server/core/integ/annotations/ApplyLdifFiles.java (original)
+++ directory/apacheds/trunk/core-integ/src/main/java/org/apache/directory/server/core/integ/annotations/ApplyLdifFiles.java Wed Aug 5 17:55:15 2009
@@ -1,46 +1,46 @@
-/*
- * 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.integ.annotations;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-
-
-
-/**
- * A annotation used to specify an array of ldif files to load and apply
- * on the instance used for integration testing.
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- * @version $Rev$, $Date$
- */
-@Documented
-@Inherited
-@Retention ( RetentionPolicy.RUNTIME )
-@Target ( { ElementType.METHOD, ElementType.TYPE } )
-public @interface ApplyLdifFiles
-{
- String[] value();
-}
\ 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.integ.annotations;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+
+
+
+/**
+ * A annotation used to specify an array of ldif files to load and apply
+ * on the instance used for integration testing.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+@Documented
+@Inherited
+@Retention ( RetentionPolicy.RUNTIME )
+@Target ( { ElementType.METHOD, ElementType.TYPE } )
+public @interface ApplyLdifFiles
+{
+ String[] value();
+}
Modified: directory/apacheds/trunk/core-integ/src/main/java/org/apache/directory/server/core/integ/annotations/ApplyLdifs.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/main/java/org/apache/directory/server/core/integ/annotations/ApplyLdifs.java?rev=801340&r1=801339&r2=801340&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/main/java/org/apache/directory/server/core/integ/annotations/ApplyLdifs.java (original)
+++ directory/apacheds/trunk/core-integ/src/main/java/org/apache/directory/server/core/integ/annotations/ApplyLdifs.java Wed Aug 5 17:55:15 2009
@@ -1,46 +1,46 @@
-/*
- * 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.integ.annotations;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-
-
-
-/**
- * A annotation used to specify an sequence of LDIF's to be applied to
- * the instance for integration testing.
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- * @version $Rev$, $Date$
- */
-@Documented
-@Inherited
-@Retention ( RetentionPolicy.RUNTIME )
-@Target ( { ElementType.METHOD, ElementType.TYPE } )
-public @interface ApplyLdifs
-{
- String[] value();
-}
\ 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.integ.annotations;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+
+
+
+/**
+ * A annotation used to specify an sequence of LDIF's to be applied to
+ * the instance for integration testing.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+@Documented
+@Inherited
+@Retention ( RetentionPolicy.RUNTIME )
+@Target ( { ElementType.METHOD, ElementType.TYPE } )
+public @interface ApplyLdifs
+{
+ String[] value();
+}
Modified: directory/apacheds/trunk/core-integ/src/main/java/org/apache/directory/server/core/integ/annotations/CleanupLevel.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/main/java/org/apache/directory/server/core/integ/annotations/CleanupLevel.java?rev=801340&r1=801339&r2=801340&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/main/java/org/apache/directory/server/core/integ/annotations/CleanupLevel.java (original)
+++ directory/apacheds/trunk/core-integ/src/main/java/org/apache/directory/server/core/integ/annotations/CleanupLevel.java Wed Aug 5 17:55:15 2009
@@ -1,44 +1,44 @@
-/*
- * 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.integ.annotations;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import org.apache.directory.server.core.integ.Level;
-
-/**
- * An annotation to control the mode used to setup for a test.
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- * @version $Rev$, $Date$
- */
-@Documented
-@Inherited
-@Retention ( RetentionPolicy.RUNTIME )
-@Target ( { ElementType.METHOD, ElementType.TYPE } )
-public @interface CleanupLevel
-{
- Level value();
-}
\ 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.integ.annotations;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import org.apache.directory.server.core.integ.Level;
+
+/**
+ * An annotation to control the mode used to setup for a test.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+@Documented
+@Inherited
+@Retention ( RetentionPolicy.RUNTIME )
+@Target ( { ElementType.METHOD, ElementType.TYPE } )
+public @interface CleanupLevel
+{
+ Level value();
+}
Modified: directory/apacheds/trunk/core-integ/src/main/java/org/apache/directory/server/core/integ/annotations/Factory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/main/java/org/apache/directory/server/core/integ/annotations/Factory.java?rev=801340&r1=801339&r2=801340&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/main/java/org/apache/directory/server/core/integ/annotations/Factory.java (original)
+++ directory/apacheds/trunk/core-integ/src/main/java/org/apache/directory/server/core/integ/annotations/Factory.java Wed Aug 5 17:55:15 2009
@@ -1,46 +1,46 @@
-/*
- * 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.integ.annotations;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-
-
-
-/**
- * A annotation used to specify a factory which builds a DirectoryService
- * instance for integration testing.
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- * @version $Rev$, $Date$
- */
-@Documented
-@Inherited
-@Retention ( RetentionPolicy.RUNTIME )
-@Target ( { ElementType.METHOD, ElementType.TYPE } )
-public @interface Factory
-{
- Class value();
-}
+/*
+ * 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.integ.annotations;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+
+
+
+/**
+ * A annotation used to specify a factory which builds a DirectoryService
+ * instance for integration testing.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+@Documented
+@Inherited
+@Retention ( RetentionPolicy.RUNTIME )
+@Target ( { ElementType.METHOD, ElementType.TYPE } )
+public @interface Factory
+{
+ Class value();
+}
Modified: directory/apacheds/trunk/core-integ/src/main/java/org/apache/directory/server/core/integ/annotations/Mode.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/main/java/org/apache/directory/server/core/integ/annotations/Mode.java?rev=801340&r1=801339&r2=801340&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/main/java/org/apache/directory/server/core/integ/annotations/Mode.java (original)
+++ directory/apacheds/trunk/core-integ/src/main/java/org/apache/directory/server/core/integ/annotations/Mode.java Wed Aug 5 17:55:15 2009
@@ -1,46 +1,46 @@
-/*
- * 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.integ.annotations;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import org.apache.directory.server.core.integ.SetupMode;
-
-
-
-/**
- * An annotation to control the mode used to setup for a test.
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- * @version $Rev$, $Date$
- */
-@Documented
-@Inherited
-@Retention ( RetentionPolicy.RUNTIME )
-@Target ( { ElementType.METHOD, ElementType.TYPE } )
-public @interface Mode
-{
- SetupMode value();
-}
+/*
+ * 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.integ.annotations;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import org.apache.directory.server.core.integ.SetupMode;
+
+
+
+/**
+ * An annotation to control the mode used to setup for a test.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+@Documented
+@Inherited
+@Retention ( RetentionPolicy.RUNTIME )
+@Target ( { ElementType.METHOD, ElementType.TYPE } )
+public @interface Mode
+{
+ SetupMode value();
+}