You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ak...@apache.org on 2009/12/26 01:47:10 UTC
svn commit: r893914 - in /directory/shared/branches/shared-schema: ./
ldap-schema-loader/
ldap-schema-loader/src/main/java/org/apache/directory/shared/ldap/schema/
ldap-schema-loader/src/main/java/org/apache/directory/shared/ldap/schema/loader/ldif/
ld...
Author: akarasulu
Date: Sat Dec 26 00:47:08 2009
New Revision: 893914
URL: http://svn.apache.org/viewvc?rev=893914&view=rev
Log:
fixing all the tests and package issues that resulted from some idea refactoring issues
Modified:
directory/shared/branches/shared-schema/ldap-schema-loader/pom.xml
directory/shared/branches/shared-schema/ldap-schema-loader/src/main/java/org/apache/directory/shared/ldap/schema/DefaultSchemaManager.java
directory/shared/branches/shared-schema/ldap-schema-loader/src/main/java/org/apache/directory/shared/ldap/schema/loader/ldif/JarLdifSchemaLoader.java
directory/shared/branches/shared-schema/ldap-schema-loader/src/main/java/org/apache/directory/shared/ldap/schema/loader/ldif/LdifSchemaLoader.java
directory/shared/branches/shared-schema/ldap-schema-loader/src/test/java/org/apache/directory/shared/ldap/schema/SchemaManagerAddTest.java
directory/shared/branches/shared-schema/ldap-schema-loader/src/test/java/org/apache/directory/shared/ldap/schema/SchemaManagerDelTest.java
directory/shared/branches/shared-schema/ldap-schema-loader/src/test/java/org/apache/directory/shared/ldap/schema/SchemaManagerEnableDisableLoadTest.java
directory/shared/branches/shared-schema/ldap-schema-loader/src/test/java/org/apache/directory/shared/ldap/schema/SchemaManagerLoadTest.java
directory/shared/branches/shared-schema/ldap-schema-loader/src/test/java/org/apache/directory/shared/ldap/schema/SchemaManagerLoadWithDepsTest.java
directory/shared/branches/shared-schema/ldap-schema-loader/src/test/java/org/apache/directory/shared/ldap/schema/loader/ldif/JarLdifSchemaLoaderTest.java
directory/shared/branches/shared-schema/ldap-schema-loader/src/test/java/org/apache/directory/shared/ldap/schema/loader/ldif/LdifSchemaLoaderTest.java
directory/shared/branches/shared-schema/ldap-schema/pom.xml
directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaManager.java
directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/SchemaLoader.java
directory/shared/branches/shared-schema/pom.xml
Modified: directory/shared/branches/shared-schema/ldap-schema-loader/pom.xml
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap-schema-loader/pom.xml?rev=893914&r1=893913&r2=893914&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap-schema-loader/pom.xml (original)
+++ directory/shared/branches/shared-schema/ldap-schema-loader/pom.xml Sat Dec 26 00:47:08 2009
@@ -57,18 +57,48 @@
<build>
<plugins>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <groupId>org.apache.maven.plugins</groupId>
- <configuration>
- <systemProperties>
- <property>
- <name>workingDirectory</name>
- <value>${basedir}/target</value>
- </property>
- </systemProperties>
- </configuration>
- </plugin>
+
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <version>2.0.1</version>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <Include-Resource>src/main/resources</Include-Resource>
+ <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
+ <Private-Package>org.apache.directory.shared.ldap.schema.schema.loader.ldif</Private-Package>
+ <Export-Package>org.apache.directory.shared.ldap.schema.*</Export-Package>
+ <Export-Package>org.apache.directory.shared.ldap.schema.loader.ldif</Export-Package>
+ </instructions>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-ipojo-plugin</artifactId>
+ <version>1.4.0</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>ipojo-bundle</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <groupId>org.apache.maven.plugins</groupId>
+ <configuration>
+ <systemProperties>
+ <property>
+ <name>workingDirectory</name>
+ <value>${basedir}/target</value>
+ </property>
+ </systemProperties>
+ </configuration>
+ </plugin>
</plugins>
</build>
</project>
Modified: directory/shared/branches/shared-schema/ldap-schema-loader/src/main/java/org/apache/directory/shared/ldap/schema/DefaultSchemaManager.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap-schema-loader/src/main/java/org/apache/directory/shared/ldap/schema/DefaultSchemaManager.java?rev=893914&r1=893913&r2=893914&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap-schema-loader/src/main/java/org/apache/directory/shared/ldap/schema/DefaultSchemaManager.java (original)
+++ directory/shared/branches/shared-schema/ldap-schema-loader/src/main/java/org/apache/directory/shared/ldap/schema/DefaultSchemaManager.java Sat Dec 26 00:47:08 2009
@@ -17,7 +17,7 @@
* under the License.
*
*/
-package org.apache.directory.shared.schema;
+package org.apache.directory.shared.ldap.schema;
import java.util.ArrayList;
@@ -126,7 +126,7 @@
/**
* Creates a new instance of DefaultSchemaManager with the default schema schemaLoader
*
- * @param schemaLoader
+ * @param loader
*/
public DefaultSchemaManager( SchemaLoader loader ) throws Exception
{
@@ -628,7 +628,7 @@
* - disabledAccepted
*
* @param registries
- * @param schemas
+ * @param schema
* @return
* @throws Exception
*/
@@ -696,7 +696,7 @@
* - disabledAccepted
*
* @param registries
- * @param schemas
+ * @param schema
* @return
* @throws Exception
*/
Modified: directory/shared/branches/shared-schema/ldap-schema-loader/src/main/java/org/apache/directory/shared/ldap/schema/loader/ldif/JarLdifSchemaLoader.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap-schema-loader/src/main/java/org/apache/directory/shared/ldap/schema/loader/ldif/JarLdifSchemaLoader.java?rev=893914&r1=893913&r2=893914&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap-schema-loader/src/main/java/org/apache/directory/shared/ldap/schema/loader/ldif/JarLdifSchemaLoader.java (original)
+++ directory/shared/branches/shared-schema/ldap-schema-loader/src/main/java/org/apache/directory/shared/ldap/schema/loader/ldif/JarLdifSchemaLoader.java Sat Dec 26 00:47:08 2009
@@ -17,7 +17,7 @@
* under the License.
*
*/
-package org.apache.directory.shared.schema.loader.ldif;
+package org.apache.directory.shared.ldap.schema.loader.ldif;
import java.io.File;
@@ -32,8 +32,8 @@
import org.apache.directory.shared.ldap.entry.Entry;
import org.apache.directory.shared.ldap.ldif.LdifEntry;
import org.apache.directory.shared.ldap.ldif.LdifReader;
-import org.apache.directory.shared.ldap.schema.ldif.extractor.ResourceMap;
-import org.apache.directory.shared.ldap.schema.ldif.extractor.SchemaLdifExtractor;
+import org.apache.directory.shared.ldap.schema.ldif.extractor.impl.DefaultSchemaLdifExtractor;
+import org.apache.directory.shared.ldap.schema.ldif.extractor.impl.ResourceMap;
import org.apache.directory.shared.ldap.schema.registries.AbstractSchemaLoader;
import org.apache.directory.shared.ldap.schema.registries.Schema;
import org.slf4j.Logger;
@@ -69,7 +69,6 @@
* sure the supplied base directory exists and contains a schema.ldif file
* and if not complains about it.
*
- * @param baseDirectory the schema LDIF base URL
* @throws Exception if the base directory does not exist or does not
* a valid schema.ldif file
*/
@@ -79,11 +78,11 @@
}
- private final URL getResource( String resource, String msg ) throws Exception
+ private URL getResource( String resource, String msg ) throws Exception
{
if ( RESOURCE_MAP.get( resource ) )
{
- return SchemaLdifExtractor.getUniqueResource( resource, msg );
+ return DefaultSchemaLdifExtractor.getUniqueResource( resource, msg );
}
else
{
@@ -96,7 +95,7 @@
* Scans for LDIF files just describing the various schema contained in
* the schema repository.
*
- * @throws Exception
+ * @throws Exception on failure
*/
private void initializeSchemas() throws Exception
{
@@ -147,7 +146,7 @@
* @param schema the schema to get the path for
* @return the path for the specific schema directory
*/
- private final String getSchemaDirectory( Schema schema )
+ private String getSchemaDirectory( Schema schema )
{
return "schema/ou=schema/cn=" + schema.getSchemaName();
}
Modified: directory/shared/branches/shared-schema/ldap-schema-loader/src/main/java/org/apache/directory/shared/ldap/schema/loader/ldif/LdifSchemaLoader.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap-schema-loader/src/main/java/org/apache/directory/shared/ldap/schema/loader/ldif/LdifSchemaLoader.java?rev=893914&r1=893913&r2=893914&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap-schema-loader/src/main/java/org/apache/directory/shared/ldap/schema/loader/ldif/LdifSchemaLoader.java (original)
+++ directory/shared/branches/shared-schema/ldap-schema-loader/src/main/java/org/apache/directory/shared/ldap/schema/loader/ldif/LdifSchemaLoader.java Sat Dec 26 00:47:08 2009
@@ -17,25 +17,21 @@
* under the License.
*
*/
-package org.apache.directory.shared.schema.loader.ldif;
+package org.apache.directory.shared.ldap.schema.loader.ldif;
import java.io.File;
import java.io.FileNotFoundException;
-import java.io.FileWriter;
import java.io.FilenameFilter;
import java.util.ArrayList;
import java.util.List;
-import org.apache.directory.shared.ldap.constants.MetaSchemaConstants;
import org.apache.directory.shared.ldap.constants.SchemaConstants;
import org.apache.directory.shared.ldap.entry.Entry;
import org.apache.directory.shared.ldap.ldif.LdifEntry;
import org.apache.directory.shared.ldap.ldif.LdifReader;
-import org.apache.directory.shared.ldap.ldif.LdifUtils;
import org.apache.directory.shared.ldap.schema.registries.AbstractSchemaLoader;
import org.apache.directory.shared.ldap.schema.registries.Schema;
-import org.apache.directory.shared.ldap.util.DateUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -63,13 +59,6 @@
/** Speedup for DEBUG mode */
private static final boolean IS_DEBUG = LOG.isDebugEnabled();
- /**
- * the administrator DN - very ADS specific but we need some DN here for
- * the modifiers name when the system modifies by itself enabled and
- * disabled schemas in the repository.
- */
- private static final String ADMIN_SYSTEM_DN = "uid=admin,ou=system";
-
/** directory containing the schema LDIF file for ou=schema */
private final File baseDirectory;
@@ -126,7 +115,7 @@
* Scans for LDIF files just describing the various schema contained in
* the schema repository.
*
- * @throws Exception
+ * @throws Exception on errors
*/
private void initializeSchemas() throws Exception
{
@@ -243,69 +232,6 @@
notifyListenerOrRegistries( schema, registries );
}
-
- /**
- * Utility method used to enable a specific schema on disk in the LDIF
- * based schema repository. This method will remove the m-disabled AT
- * in the schema file and update the modifiersName and modifyTimestamp.
- *
- * The modifiersName and modifyTimestamp on the schema.ldif file will
- * also be updated to indicate a change to the schema.
- *
- * @param schema the disabled schema to enable
- * @throws Exception if there are problems writing changes back to disk
- */
- private void enableSchema( Schema schema ) throws Exception
- {
- // -------------------------------------------------------------------
- // Modifying the foo schema foo.ldif file to be enabled but still
- // have to now update the timestamps and update the modifiersName
- // -------------------------------------------------------------------
-
- File schemaLdifFile = new File( new File( baseDirectory, SchemaConstants.OU_SCHEMA ), "cn="
- + schema.getSchemaName() + "." + LDIF_EXT );
- LdifReader reader = new LdifReader( schemaLdifFile );
- LdifEntry ldifEntry = reader.next();
- Entry entry = ldifEntry.getEntry();
-
- entry.removeAttributes( "changeType" );
- entry.removeAttributes( SchemaConstants.MODIFIERS_NAME_AT );
- entry.removeAttributes( SchemaConstants.MODIFY_TIMESTAMP_AT );
- entry.removeAttributes( MetaSchemaConstants.M_DISABLED_AT );
-
- entry.add( SchemaConstants.MODIFIERS_NAME_AT, ADMIN_SYSTEM_DN );
- entry.add( SchemaConstants.MODIFY_TIMESTAMP_AT, DateUtils.getGeneralizedTime() );
-
- FileWriter out = new FileWriter( schemaLdifFile );
- out.write( LdifUtils.convertEntryToLdif( entry ) );
- out.flush();
- out.close();
-
- // -------------------------------------------------------------------
- // Now we need to update the timestamp on the schema.ldif file which
- // shows that something changed below the schema directory in schema
- // -------------------------------------------------------------------
-
- schemaLdifFile = new File( baseDirectory, "ou=schema." + LDIF_EXT );
- reader = new LdifReader( schemaLdifFile );
- ldifEntry = reader.next();
- entry = ldifEntry.getEntry();
-
- entry.removeAttributes( "changeType" );
- entry.removeAttributes( SchemaConstants.MODIFIERS_NAME_AT );
- entry.removeAttributes( SchemaConstants.MODIFY_TIMESTAMP_AT );
-
- entry.add( SchemaConstants.MODIFIERS_NAME_AT, ADMIN_SYSTEM_DN );
- entry.add( SchemaConstants.MODIFY_TIMESTAMP_AT, DateUtils.getGeneralizedTime() );
-
- out = new FileWriter( schemaLdifFile );
- out.write( LdifUtils.convertEntryToLdif( entry ) );
- out.flush();
- out.close();
-
- reader.close();
- }
-
/**
* Utility method to get the file for a schema directory.
@@ -313,7 +239,7 @@
* @param schema the schema to get the file for
* @return the file for the specific schema directory
*/
- private final File getSchemaDirectory( Schema schema )
+ private File getSchemaDirectory( Schema schema )
{
return new File( new File( baseDirectory, SchemaConstants.OU_SCHEMA ), "cn=" + schema.getSchemaName() );
}
Modified: directory/shared/branches/shared-schema/ldap-schema-loader/src/test/java/org/apache/directory/shared/ldap/schema/SchemaManagerAddTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap-schema-loader/src/test/java/org/apache/directory/shared/ldap/schema/SchemaManagerAddTest.java?rev=893914&r1=893913&r2=893914&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap-schema-loader/src/test/java/org/apache/directory/shared/ldap/schema/SchemaManagerAddTest.java (original)
+++ directory/shared/branches/shared-schema/ldap-schema-loader/src/test/java/org/apache/directory/shared/ldap/schema/SchemaManagerAddTest.java Sat Dec 26 00:47:08 2009
@@ -17,7 +17,7 @@
* under the License.
*
*/
-package org.apache.directory.shared.ldap.schema.loader.ldif;
+package org.apache.directory.shared.ldap.schema;
import static org.junit.Assert.assertEquals;
Modified: directory/shared/branches/shared-schema/ldap-schema-loader/src/test/java/org/apache/directory/shared/ldap/schema/SchemaManagerDelTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap-schema-loader/src/test/java/org/apache/directory/shared/ldap/schema/SchemaManagerDelTest.java?rev=893914&r1=893913&r2=893914&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap-schema-loader/src/test/java/org/apache/directory/shared/ldap/schema/SchemaManagerDelTest.java (original)
+++ directory/shared/branches/shared-schema/ldap-schema-loader/src/test/java/org/apache/directory/shared/ldap/schema/SchemaManagerDelTest.java Sat Dec 26 00:47:08 2009
@@ -17,7 +17,7 @@
* under the License.
*
*/
-package org.apache.directory.shared.ldap.schema.loader.ldif;
+package org.apache.directory.shared.ldap.schema;
import static org.junit.Assert.assertEquals;
Modified: directory/shared/branches/shared-schema/ldap-schema-loader/src/test/java/org/apache/directory/shared/ldap/schema/SchemaManagerEnableDisableLoadTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap-schema-loader/src/test/java/org/apache/directory/shared/ldap/schema/SchemaManagerEnableDisableLoadTest.java?rev=893914&r1=893913&r2=893914&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap-schema-loader/src/test/java/org/apache/directory/shared/ldap/schema/SchemaManagerEnableDisableLoadTest.java (original)
+++ directory/shared/branches/shared-schema/ldap-schema-loader/src/test/java/org/apache/directory/shared/ldap/schema/SchemaManagerEnableDisableLoadTest.java Sat Dec 26 00:47:08 2009
@@ -17,7 +17,7 @@
* under the License.
*
*/
-package org.apache.directory.shared.schema;
+package org.apache.directory.shared.ldap.schema.loader.ldif;
import static org.junit.Assert.assertEquals;
Modified: directory/shared/branches/shared-schema/ldap-schema-loader/src/test/java/org/apache/directory/shared/ldap/schema/SchemaManagerLoadTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap-schema-loader/src/test/java/org/apache/directory/shared/ldap/schema/SchemaManagerLoadTest.java?rev=893914&r1=893913&r2=893914&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap-schema-loader/src/test/java/org/apache/directory/shared/ldap/schema/SchemaManagerLoadTest.java (original)
+++ directory/shared/branches/shared-schema/ldap-schema-loader/src/test/java/org/apache/directory/shared/ldap/schema/SchemaManagerLoadTest.java Sat Dec 26 00:47:08 2009
@@ -17,7 +17,7 @@
* under the License.
*
*/
-package org.apache.directory.shared.schema;
+package org.apache.directory.shared.ldap.schema;
import static org.junit.Assert.assertEquals;
Modified: directory/shared/branches/shared-schema/ldap-schema-loader/src/test/java/org/apache/directory/shared/ldap/schema/SchemaManagerLoadWithDepsTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap-schema-loader/src/test/java/org/apache/directory/shared/ldap/schema/SchemaManagerLoadWithDepsTest.java?rev=893914&r1=893913&r2=893914&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap-schema-loader/src/test/java/org/apache/directory/shared/ldap/schema/SchemaManagerLoadWithDepsTest.java (original)
+++ directory/shared/branches/shared-schema/ldap-schema-loader/src/test/java/org/apache/directory/shared/ldap/schema/SchemaManagerLoadWithDepsTest.java Sat Dec 26 00:47:08 2009
@@ -17,7 +17,7 @@
* under the License.
*
*/
-package org.apache.directory.shared.schema;
+package org.apache.directory.shared.ldap.schema;
import static org.junit.Assert.assertEquals;
@@ -31,13 +31,11 @@
import org.apache.commons.io.FileUtils;
import org.apache.directory.shared.ldap.exception.LdapOperationNotSupportedException;
-import org.apache.directory.shared.ldap.schema.SchemaManager;
import org.apache.directory.shared.ldap.schema.ldif.extractor.impl.DefaultSchemaLdifExtractor;
import org.apache.directory.shared.ldap.schema.ldif.extractor.SchemaLdifExtractor;
import org.apache.directory.shared.ldap.schema.registries.DefaultSchema;
import org.apache.directory.shared.ldap.schema.registries.Schema;
import org.apache.directory.shared.ldap.schema.loader.ldif.LdifSchemaLoader;
-import org.apache.directory.shared.schema.DefaultSchemaManager;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
Modified: directory/shared/branches/shared-schema/ldap-schema-loader/src/test/java/org/apache/directory/shared/ldap/schema/loader/ldif/JarLdifSchemaLoaderTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap-schema-loader/src/test/java/org/apache/directory/shared/ldap/schema/loader/ldif/JarLdifSchemaLoaderTest.java?rev=893914&r1=893913&r2=893914&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap-schema-loader/src/test/java/org/apache/directory/shared/ldap/schema/loader/ldif/JarLdifSchemaLoaderTest.java (original)
+++ directory/shared/branches/shared-schema/ldap-schema-loader/src/test/java/org/apache/directory/shared/ldap/schema/loader/ldif/JarLdifSchemaLoaderTest.java Sat Dec 26 00:47:08 2009
@@ -17,7 +17,7 @@
* under the License.
*
*/
-package org.apache.directory.shared.schema.loader.ldif;
+package org.apache.directory.shared.ldap.schema.loader.ldif;
import static org.junit.Assert.assertFalse;
Modified: directory/shared/branches/shared-schema/ldap-schema-loader/src/test/java/org/apache/directory/shared/ldap/schema/loader/ldif/LdifSchemaLoaderTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap-schema-loader/src/test/java/org/apache/directory/shared/ldap/schema/loader/ldif/LdifSchemaLoaderTest.java?rev=893914&r1=893913&r2=893914&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap-schema-loader/src/test/java/org/apache/directory/shared/ldap/schema/loader/ldif/LdifSchemaLoaderTest.java (original)
+++ directory/shared/branches/shared-schema/ldap-schema-loader/src/test/java/org/apache/directory/shared/ldap/schema/loader/ldif/LdifSchemaLoaderTest.java Sat Dec 26 00:47:08 2009
@@ -17,7 +17,7 @@
* under the License.
*
*/
-package org.apache.directory.shared.schema.loader.ldif;
+package org.apache.directory.shared.ldap.schema.loader.ldif;
import static org.junit.Assert.assertTrue;
Modified: directory/shared/branches/shared-schema/ldap-schema/pom.xml
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap-schema/pom.xml?rev=893914&r1=893913&r2=893914&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap-schema/pom.xml (original)
+++ directory/shared/branches/shared-schema/ldap-schema/pom.xml Sat Dec 26 00:47:08 2009
@@ -42,11 +42,37 @@
<artifactId>commons-io</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.ipojo</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.ipojo.annotations</artifactId>
+ </dependency>
</dependencies>
<build>
<plugins>
+ <plugin>
+ <groupId>org.apache.geronimo.genesis.plugins</groupId>
+ <artifactId>tools-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>verify-legal-files</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>verify-legal-files</goal>
+ </goals>
+ <configuration>
+ <strict>false</strict>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaManager.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaManager.java?rev=893914&r1=893913&r2=893914&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaManager.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaManager.java Sat Dec 26 00:47:08 2009
@@ -240,6 +240,7 @@
*
* @param schemas The list of Schema to unload
* @return True if all the schemas have been unloaded
+ * @throws Exception @TODO
*/
boolean unload( Schema... schemas ) throws Exception;
@@ -249,6 +250,7 @@
*
* @param schemas The list of Schema to unload
* @return True if all the schemas have been unloaded
+ * @throws Exception @TODO
*/
boolean unload( String... schemas ) throws Exception;
@@ -263,9 +265,9 @@
*
* If the modification is ok, the Registries will be updated.
*
- * @param schemas The list of schemas to enable
- * @return true if the Registries is still consistent, false otherwise.
- * @throws If something went wrong
+ * @param schemas The list of schemas to enable
+ * @return true if the Registries is still consistent, false otherwise.
+ * @throws Exception @TODO
*/
boolean enable( Schema... schemas ) throws Exception;
@@ -277,9 +279,9 @@
*
* If the modification is ok, the Registries will be updated.
*
- * @param schemas The list of schema name to enable
- * @return true if the Registries is still consistent, false otherwise.
- * @throws If something went wrong
+ * @param schemas The list of schema name to enable
+ * @return true if the Registries is still consistent, false otherwise.
+ * @throws Exception something went wrong
*/
boolean enable( String... schemas ) throws Exception;
@@ -337,9 +339,9 @@
*
* If the modification is ok, the Registries will be updated.
*
- * @param schemas The list of schemas to disable
- * @return true if the Registries is still consistent, false otherwise.
- * @throws If something went wrong
+ * @param schemas The list of schemas to disable
+ * @return true if the Registries is still consistent, false otherwise.
+ * @throws Exception if something went wrong
*/
boolean disable( Schema... schemas ) throws Exception;
@@ -351,9 +353,9 @@
*
* If the modification is ok, the Registries will be updated.
*
- * @param schemas The list of schema names to disable
- * @return true if the Registries is still consistent, false otherwise.
- * @throws If something went wrong
+ * @param schemas The list of schema names to disable
+ * @return true if the Registries is still consistent, false otherwise.
+ * @throws Exception if something went wrong
*/
boolean disable( String... schemas ) throws Exception;
@@ -365,8 +367,8 @@
*
* If the modification is ok, the Registries will be updated.
*
- * @param schemas The list of schemas to disable
- * @return true if all the schemas have been disabled
+ * @param schemas The list of schemas to disable
+ * @return true if all the schemas have been disabled
*/
boolean disabledRelaxed( Schema... schemas );
@@ -378,8 +380,8 @@
*
* If the modification is ok, the Registries will be updated.
*
- * @param schemas The list of schema names to disable
- * @return true if all the schemas have been disabled
+ * @param schemas The list of schema names to disable
+ * @return true if all the schemas have been disabled
*/
boolean disabledRelaxed( String... schemas );
@@ -437,7 +439,7 @@
/**
* Lookup for an AttributeType in the AttributeType registry
*
- * @param String oid the OID we are looking for
+ * @param oid the OID we are looking for
* @return The found AttributeType
* @throws NamingException if the OID is not found in the AttributeType registry
*/
@@ -447,7 +449,7 @@
/**
* Lookup for a Comparator in the Comparator registry
*
- * @param String oid the OID we are looking for
+ * @param oid the OID we are looking for
* @return The found Comparator
* @throws NamingException if the OID is not found in the Comparator registry
*/
@@ -457,7 +459,7 @@
/**
* Lookup for a MatchingRule in the MatchingRule registry
*
- * @param String oid the OID we are looking for
+ * @param oid the OID we are looking for
* @return The found MatchingRule
* @throws NamingException if the OID is not found in the MatchingRule registry
*/
@@ -467,7 +469,7 @@
/**
* Lookup for a Normalizer in the Normalizer registry
*
- * @param String oid the OID we are looking for
+ * @param oid the OID we are looking for
* @return The found Normalizer
* @throws NamingException if the OID is not found in the Normalizer registry
*/
@@ -477,7 +479,7 @@
/**
* Lookup for a ObjectClass in the ObjectClass registry
*
- * @param String oid the OID we are looking for
+ * @param oid the OID we are looking for
* @return The found ObjectClass
* @throws NamingException if the OID is not found in the ObjectClass registry
*/
@@ -487,7 +489,7 @@
/**
* Lookup for an LdapSyntax in the LdapSyntax registry
*
- * @param String oid the OID we are looking for
+ * @param oid the OID we are looking for
* @return The found LdapSyntax
* @throws NamingException if the OID is not found in the LdapSyntax registry
*/
@@ -497,7 +499,7 @@
/**
* Lookup for a SyntaxChecker in the SyntaxChecker registry
*
- * @param String oid the OID we are looking for
+ * @param oid the OID we are looking for
* @return The found SyntaxChecker
* @throws NamingException if the OID is not found in the SyntaxChecker registry
*/
@@ -673,7 +675,8 @@
/**
* Removes the registered attributeType from the attributeTypeRegistry
*
- * @param String the attributeType OID to unregister
+ * @param attributeTypeOid the attributeType OID to unregister
+ * @return the schema object associated with the OID
* @throws NamingException if the attributeType is invalid
*/
SchemaObject unregisterAttributeType( String attributeTypeOid ) throws NamingException;
@@ -682,7 +685,8 @@
/**
* Removes the registered Comparator from the ComparatorRegistry
*
- * @param String the Comparator OID to unregister
+ * @param comparatorOid the Comparator OID to unregister
+ * @return the schema object associated with the OID
* @throws NamingException if the Comparator is invalid
*/
SchemaObject unregisterComparator( String comparatorOid ) throws NamingException;
@@ -691,7 +695,8 @@
/**
* Removes the registered DitControlRule from the DitControlRuleRegistry
*
- * @param String the DitControlRule OID to unregister
+ * @param ditControlRuleOid the DitControlRule OID to unregister
+ * @return the schema object associated with the OID
* @throws NamingException if the DitControlRule is invalid
*/
SchemaObject unregisterDitControlRule( String ditControlRuleOid ) throws NamingException;
@@ -700,7 +705,8 @@
/**
* Removes the registered DitStructureRule from the DitStructureRuleRegistry
*
- * @param String the DitStructureRule OID to unregister
+ * @param ditStructureRuleOid the DitStructureRule OID to unregister
+ * @return the schema object associated with the OID
* @throws NamingException if the DitStructureRule is invalid
*/
SchemaObject unregisterDitStructureRule( String ditStructureRuleOid ) throws NamingException;
@@ -709,7 +715,8 @@
/**
* Removes the registered MatchingRule from the MatchingRuleRegistry
*
- * @param String the MatchingRuleRule OID to unregister
+ * @param matchingRuleOid the MatchingRuleRule OID to unregister
+ * @return the schema object associated with the OID
* @throws NamingException if the MatchingRule is invalid
*/
SchemaObject unregisterMatchingRule( String matchingRuleOid ) throws NamingException;
@@ -718,7 +725,7 @@
/**
* Removes the registered MatchingRuleUse from the MatchingRuleUseRegistry
*
- * @param String the MatchingRuleUse OID to unregister
+ * @param matchingRuleUseOid the MatchingRuleUse OID to unregister
* @throws NamingException if the MatchingRuleUse is invalid
*/
SchemaObject unregisterMatchingRuleUse( String matchingRuleUseOid ) throws NamingException;
@@ -727,7 +734,7 @@
/**
* Removes the registered NameForm from the NameFormRegistry
*
- * @param String the NameForm OID to unregister
+ * @param nameFormOid the NameForm OID to unregister
* @throws NamingException if the NameForm is invalid
*/
SchemaObject unregisterNameForm( String nameFormOid ) throws NamingException;
@@ -736,7 +743,7 @@
/**
* Removes the registered Normalizer from the NormalizerRegistry
*
- * @param String the Normalizer OID to unregister
+ * @param normalizerOid the Normalizer OID to unregister
* @throws NamingException if the Normalizer is invalid
*/
SchemaObject unregisterNormalizer( String normalizerOid ) throws NamingException;
@@ -745,7 +752,7 @@
/**
* Removes the registered ObjectClass from the ObjectClassRegistry
*
- * @param String the ObjectClass OID to unregister
+ * @param objectClassOid the ObjectClass OID to unregister
* @throws NamingException if the ObjectClass is invalid
*/
SchemaObject unregisterObjectClass( String objectClassOid ) throws NamingException;
@@ -754,7 +761,7 @@
/**
* Removes the registered LdapSyntax from the LdapSyntaxRegistry
*
- * @param String the LdapSyntax OID to unregister
+ * @param ldapSyntaxOid the LdapSyntax OID to unregister
* @throws NamingException if the LdapSyntax is invalid
*/
SchemaObject unregisterLdapSyntax( String ldapSyntaxOid ) throws NamingException;
@@ -763,7 +770,7 @@
/**
* Removes the registered SyntaxChecker from the SyntaxCheckerRegistry
*
- * @param String the SyntaxChecker OID to unregister
+ * @param syntaxCheckerOid the SyntaxChecker OID to unregister
* @throws NamingException if the SyntaxChecker is invalid
*/
SchemaObject unregisterSyntaxChecker( String syntaxCheckerOid ) throws NamingException;
Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/SchemaLoader.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/SchemaLoader.java?rev=893914&r1=893913&r2=893914&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/SchemaLoader.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/SchemaLoader.java Sat Dec 26 00:47:08 2009
@@ -27,7 +27,7 @@
/**
- * Loads schemas into registres.
+ * Loads schemas into a SchemaManager's registries.
*
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
* @version $Rev$
@@ -69,7 +69,7 @@
*
* @param registries the registry to load all enabled schemas into
* @param check tells if the Registries must be checked after having been loaded
- * @return the list of erros we met during the loading of schemas
+ * @return the list of errors we met during the loading of schemas
* @throws Exception if there are any failures
*
List<Throwable> loadAllEnabled( Registries registries, boolean check ) throws Exception;
@@ -91,6 +91,7 @@
* a list of specified schema
*
* @param schemas the schemas from which AttributeTypes are loaded
+ * @return a List of LDAP entries representing schema entities
* @throws Exception if there are failures accessing AttributeType information
*/
List<Entry> loadAttributeTypes( Schema... schemas ) throws Exception;
@@ -101,6 +102,7 @@
* a list of specific schema, using their name
*
* @param schemaNames the schema names from which AttributeTypes are loaded
+ * @return a List of LDAP entries representing schema entities
* @throws Exception if there are failures accessing AttributeType information
*/
List<Entry> loadAttributeTypes( String... schemaNames ) throws Exception;
@@ -111,6 +113,7 @@
* a list of specific schema.
*
* @param schemas the schemas from which Comparators are loaded
+ * @return a List of LDAP entries representing schema entities
* @throws Exception if there are failures accessing Comparator information
*/
List<Entry> loadComparators( Schema... schemas ) throws Exception;
@@ -121,6 +124,7 @@
* a list of specific schema, using their name
*
* @param schemaNames the schema names from which Comparators are loaded
+ * @return a List of LDAP entries representing schema entities
* @throws Exception if there are failures accessing Comparator information
*/
List<Entry> loadComparators( String... schemaNames ) throws Exception;
@@ -131,6 +135,7 @@
* a list of specific schema.
*
* @param schemas the schemas from which DitContentRules are loaded
+ * @return a List of LDAP entries representing schema entities
* @throws Exception if there are failures accessing DitContentRule information
*/
List<Entry> loadDitContentRules( Schema... schemas ) throws Exception;
@@ -141,9 +146,10 @@
* a list of specified schema names
*
* @param schemaNames the schema names from which DitContentRules are loaded
+ * @return a List of LDAP entries representing schema entities
* @throws Exception if there are failures accessing DitContentRule information
*/
- List<Entry> loadDitContentRules( String... schemanames ) throws Exception;
+ List<Entry> loadDitContentRules( String... schemaNames ) throws Exception;
/**
@@ -151,6 +157,7 @@
* a list of specific schema.
*
* @param schemas the schemas from which DitStructureRules are loaded
+ * @return a List of LDAP entries representing schema entities
* @throws Exception if there are failures accessing DitStructureRule information
*/
List<Entry> loadDitStructureRules( Schema... schemas ) throws Exception;
@@ -161,9 +168,10 @@
* a list of specified schema names
*
* @param schemaNames the schema names from which DitStructureRules are loaded
+ * @return a List of LDAP entries representing schema entities
* @throws Exception if there are failures accessing DitStructureRule information
*/
- List<Entry> loadDitStructureRules( String... schemanames ) throws Exception;
+ List<Entry> loadDitStructureRules( String... schemaNames ) throws Exception;
/**
@@ -171,6 +179,7 @@
* a list of specific schema
*
* @param schemas the schemas from which MatchingRules are loaded
+ * @return a List of LDAP entries representing schema entities
* @throws Exception if there are failures accessing MatchingRule information
*/
List<Entry> loadMatchingRules( Schema... schemas ) throws Exception;
@@ -181,6 +190,7 @@
* a list of specific schema, using their name
*
* @param schemaNames the schema names from which MatchingRules are loaded
+ * @return a List of LDAP entries representing schema entities
* @throws Exception if there are failures accessing MatchingRule information
*/
List<Entry> loadMatchingRules( String... schemaNames ) throws Exception;
@@ -191,6 +201,7 @@
* a list of specific schema.
*
* @param schemas the schemas from which MatchingRuleUses are loaded
+ * @return a List of LDAP entries representing schema entities
* @throws Exception if there are failures accessing MatchingRuleUse information
*/
List<Entry> loadMatchingRuleUses( Schema... schemas ) throws Exception;
@@ -201,9 +212,10 @@
* a list of specified schema names
*
* @param schemaNames the schema names from which MatchingRuleUses are loaded
+ * @return a List of LDAP entries representing schema entities
* @throws Exception if there are failures accessing MatchingRuleUses information
*/
- List<Entry> loadMatchingRuleUses( String... schemanames ) throws Exception;
+ List<Entry> loadMatchingRuleUses( String... schemaNames ) throws Exception;
/**
@@ -211,6 +223,7 @@
* a list of specific schema.
*
* @param schemas the schemas from which NameForms are loaded
+ * @return a List of LDAP entries representing schema entities
* @throws Exception if there are failures accessing NameForm information
*/
List<Entry> loadNameForms( Schema... schemas ) throws Exception;
@@ -221,9 +234,10 @@
* a list of specified schema names
*
* @param schemaNames the schema names from which NameForms are loaded
+ * @return a List of LDAP entries representing schema entities
* @throws Exception if there are failures accessing NameForms information
*/
- List<Entry> loadNameForms( String... schemanames ) throws Exception;
+ List<Entry> loadNameForms( String... schemaNames ) throws Exception;
/**
@@ -231,6 +245,7 @@
* a list of specified schema
*
* @param schemas the schemas from which Normalizers are loaded
+ * @return a List of LDAP entries representing schema entities
* @throws Exception if there are failures accessing Normalizer information
*/
List<Entry> loadNormalizers( Schema... schemas ) throws Exception;
@@ -241,6 +256,7 @@
* a list of specified schema names
*
* @param schemaNames the schema names from which Normalizers are loaded
+ * @return a List of LDAP entries representing schema entities
* @throws Exception if there are failures accessing Normalizer information
*/
List<Entry> loadNormalizers( String... schemaNames ) throws Exception;
@@ -251,6 +267,7 @@
* a list of specific schema.
*
* @param schemas the schemas from which ObjectClasses are loaded
+ * @return a List of LDAP entries representing schema entities
* @throws Exception if there are failures accessing ObjectClass information
*/
List<Entry> loadObjectClasses( Schema... schemas ) throws Exception;
@@ -261,6 +278,7 @@
* a list of specified schema names
*
* @param schemaNames the schema names from which ObjectClasses are loaded
+ * @return a List of LDAP entries representing schema entities
* @throws Exception if there are failures accessing ObjectClasses information
*/
List<Entry> loadObjectClasses( String... schemaNames ) throws Exception;
@@ -271,6 +289,7 @@
* a list of specified schema
*
* @param schemas the schemas from which Syntaxes are loaded
+ * @return a List of LDAP entries representing schema entities
* @throws Exception if there are failures accessing Syntax information
*/
List<Entry> loadSyntaxes( Schema... schemas ) throws Exception;
@@ -281,6 +300,7 @@
* a list of specified schema names
*
* @param schemaNames the schema names from which Syntaxes are loaded
+ * @return a List of LDAP entries representing schema entities
* @throws Exception if there are failures accessing Syntax information
*/
List<Entry> loadSyntaxes( String... schemaNames ) throws Exception;
@@ -291,6 +311,7 @@
* a list of specified schema
*
* @param schemas the schemas from which SyntaxCheckers are loaded
+ * @return a List of LDAP entries representing schema entities
* @throws Exception if there are failures accessing SyntaxChecker information
*/
List<Entry> loadSyntaxCheckers( Schema... schemas ) throws Exception;
@@ -301,9 +322,10 @@
* a list of specified schema names
*
* @param schemaNames the schema names from which SyntaxCheckers are loaded
+ * @return a List of LDAP entries representing schema entities
* @throws Exception if there are failures accessing SyntaxChecker information
*/
- List<Entry> loadSyntaxCheckers( String... schemanames ) throws Exception;
+ List<Entry> loadSyntaxCheckers( String... schemaNames ) throws Exception;
/**
@@ -322,12 +344,16 @@
/**
* Add a new schema to the schema's list
+ *
+ * @param schema Schema to add to this loader
*/
- public void addSchema( Schema schema );
+ void addSchema( Schema schema );
/**
* Remove a schema from the schema's list
+ *
+ * @param schema Schema to remove from this loader
*/
- public void removeSchema( Schema schema );
+ void removeSchema( Schema schema );
}
Modified: directory/shared/branches/shared-schema/pom.xml
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/pom.xml?rev=893914&r1=893913&r2=893914&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/pom.xml (original)
+++ directory/shared/branches/shared-schema/pom.xml Sat Dec 26 00:47:08 2009
@@ -72,6 +72,18 @@
</dependency>
<dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.ipojo</artifactId>
+ <version>1.4.0</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.ipojo.annotations</artifactId>
+ <version>1.4.0</version>
+ </dependency>
+
+ <dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>1.4</version>
@@ -147,6 +159,12 @@
<artifactId>slf4j-api</artifactId>
</dependency>
+ <!-- common logging interface -->
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.ipojo.annotations</artifactId>
+ </dependency>
+
<!-- logging implementation used for unit tests -->
<dependency>
<groupId>org.slf4j</groupId>