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 2018/08/12 23:17:15 UTC
[directory-server] branch master updated: Fixed core-annotations
javadoc errors and warnings
This is an automated email from the ASF dual-hosted git repository.
elecharny pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/directory-server.git
The following commit(s) were added to refs/heads/master by this push:
new ee4383a Fixed core-annotations javadoc errors and warnings
ee4383a is described below
commit ee4383af03cfdfc507277d3cd8331a2ec380c6c8
Author: Emmanuel Lécharny <el...@symas.com>
AuthorDate: Mon Aug 13 01:17:11 2018 +0200
Fixed core-annotations javadoc errors and warnings
---
.../server/core/annotations/ApplyLdifFiles.java | 2 +-
.../server/core/annotations/ApplyLdifs.java | 1 +
.../server/core/annotations/ContextEntry.java | 2 +-
.../core/annotations/CreateAuthenticator.java | 18 +++++-----
.../server/core/annotations/CreateDS.java | 18 +++++-----
.../server/core/annotations/CreateIndex.java | 14 ++++----
.../server/core/annotations/CreatePartition.java | 22 ++++++------
.../server/core/annotations/LoadSchema.java | 10 +++---
.../server/core/factory/DSAnnotationProcessor.java | 41 +++++++++++++---------
.../core/factory/DirectoryServiceFactory.java | 6 +++-
.../server/core/factory/PartitionFactory.java | 5 +--
11 files changed, 76 insertions(+), 63 deletions(-)
diff --git a/core-annotations/src/main/java/org/apache/directory/server/core/annotations/ApplyLdifFiles.java b/core-annotations/src/main/java/org/apache/directory/server/core/annotations/ApplyLdifFiles.java
index 023e7ab..a3cdfb1 100644
--- a/core-annotations/src/main/java/org/apache/directory/server/core/annotations/ApplyLdifFiles.java
+++ b/core-annotations/src/main/java/org/apache/directory/server/core/annotations/ApplyLdifFiles.java
@@ -44,6 +44,6 @@ public @interface ApplyLdifFiles
String[] value();
- /** Class which class loader is used to read LDIF files. Required in OSGi environment. */
+ /** @return Class which class loader is used to read LDIF files. Required in OSGi environment. */
Class<?> clazz() default ApplyLdifFiles.class;
}
diff --git a/core-annotations/src/main/java/org/apache/directory/server/core/annotations/ApplyLdifs.java b/core-annotations/src/main/java/org/apache/directory/server/core/annotations/ApplyLdifs.java
index 5b6e083..1459572 100644
--- a/core-annotations/src/main/java/org/apache/directory/server/core/annotations/ApplyLdifs.java
+++ b/core-annotations/src/main/java/org/apache/directory/server/core/annotations/ApplyLdifs.java
@@ -41,5 +41,6 @@ import java.lang.annotation.Target;
{ ElementType.METHOD, ElementType.TYPE })
public @interface ApplyLdifs
{
+ /** @return The LDIF files */
String[] value();
}
diff --git a/core-annotations/src/main/java/org/apache/directory/server/core/annotations/ContextEntry.java b/core-annotations/src/main/java/org/apache/directory/server/core/annotations/ContextEntry.java
index 73745a7..aa00784 100644
--- a/core-annotations/src/main/java/org/apache/directory/server/core/annotations/ContextEntry.java
+++ b/core-annotations/src/main/java/org/apache/directory/server/core/annotations/ContextEntry.java
@@ -35,6 +35,6 @@ import java.lang.annotation.Target;
{ ElementType.METHOD, ElementType.TYPE })
public @interface ContextEntry
{
- /** the context entry in LDIF to be added */
+ /** @return the context entry in LDIF to be added */
String entryLdif();
}
diff --git a/core-annotations/src/main/java/org/apache/directory/server/core/annotations/CreateAuthenticator.java b/core-annotations/src/main/java/org/apache/directory/server/core/annotations/CreateAuthenticator.java
index 7d66aa4..2ceaa6a 100644
--- a/core-annotations/src/main/java/org/apache/directory/server/core/annotations/CreateAuthenticator.java
+++ b/core-annotations/src/main/java/org/apache/directory/server/core/annotations/CreateAuthenticator.java
@@ -32,7 +32,7 @@ import org.apache.directory.server.core.authn.Authenticator;
* An authenticator creation
* a name and a suffix, plus some other characteristics. Here is an example :
* <pre>
- * @CreateAuthenticator(
+ * @CreateAuthenticator(
* type = "org.apache.directory.server.core.authn.StrongAuthenticator"
* )
* )
@@ -45,34 +45,34 @@ import org.apache.directory.server.core.authn.Authenticator;
{ ElementType.METHOD, ElementType.TYPE })
public @interface CreateAuthenticator
{
- /** The authenticator implementation class */
+ /** @return The authenticator implementation class */
Class<? extends Authenticator> type() default AnonymousAuthenticator.class;
- /** Delegate host, use for testing DelegatingAuthenticator */
+ /** @return Delegate host, use for testing DelegatingAuthenticator */
String delegateHost() default "";
- /** Delegate port, use for testing DelegatingAuthenticator */
+ /** @return Delegate port, use for testing DelegatingAuthenticator */
int delegatePort() default -1;
- /** The base DN from which we will do authentication */
+ /** @return The base DN from which we will do authentication */
String baseDn() default "";
- /** Tells if we use SSL to connect */
+ /** @return Tells if we use SSL to connect */
boolean delegateSsl() default false;
- /** Tells if we use startTls to connect */
+ /** @return Tells if we use startTls to connect */
boolean delegateTls() default false;
- /** The SSL TrustManager FQCN */
+ /** @return The SSL TrustManager FQCN */
String delegateSslTrustManagerFQCN() default "org.apache.directory.ldap.client.api.NoVerificationTrustManager";
- /** The startTls TrustManager FQCN */
+ /** @return The startTls TrustManager FQCN */
String delegateTlsTrustManagerFQCN() default "org.apache.directory.ldap.client.api.NoVerificationTrustManager";
}
diff --git a/core-annotations/src/main/java/org/apache/directory/server/core/annotations/CreateDS.java b/core-annotations/src/main/java/org/apache/directory/server/core/annotations/CreateDS.java
index 9e4a63a..603ce57 100644
--- a/core-annotations/src/main/java/org/apache/directory/server/core/annotations/CreateDS.java
+++ b/core-annotations/src/main/java/org/apache/directory/server/core/annotations/CreateDS.java
@@ -37,42 +37,42 @@ import org.apache.directory.server.core.factory.DefaultDirectoryServiceFactory;
{ ElementType.METHOD, ElementType.TYPE })
public @interface CreateDS
{
- /** The Factory to use to create a DirectoryService */
+ /** @return The Factory to use to create a DirectoryService */
Class<?> factory() default DefaultDirectoryServiceFactory.class;
- /** The DS name */
+ /** @return The DS name */
String name() default "defaultDS";
- /** flag to enable/disable access control, default is false */
+ /** @return flag to enable/disable access control, default is false */
boolean enableAccessControl() default false;
- /** flag to enable/disable anonymous access, default is false */
+ /** @return flag to enable/disable anonymous access, default is false */
boolean allowAnonAccess() default false;
- /** flag to enable/disable changelog, default is true */
+ /** @return flag to enable/disable changelog, default is true */
boolean enableChangeLog() default true;
- /** The list of partitions to create */
+ /** @return The list of partitions to create */
CreatePartition[] partitions() default
{};
- /** additional interceptors */
+ /** @return additional interceptors */
Class<?>[] additionalInterceptors() default
{};
- /** authenticators, when empty the default authenticators are used, else this must contain the complete list */
+ /** @return authenticators, when empty the default authenticators are used, else this must contain the complete list */
CreateAuthenticator[] authenticators() default
{};
- /** The loaded schemas */
+ /** @return The loaded schemas */
LoadSchema[] loadedSchemas() default
{};
}
diff --git a/core-annotations/src/main/java/org/apache/directory/server/core/annotations/CreateIndex.java b/core-annotations/src/main/java/org/apache/directory/server/core/annotations/CreateIndex.java
index 4094ab1..76a0b9d 100644
--- a/core-annotations/src/main/java/org/apache/directory/server/core/annotations/CreateIndex.java
+++ b/core-annotations/src/main/java/org/apache/directory/server/core/annotations/CreateIndex.java
@@ -31,11 +31,11 @@ import org.apache.directory.server.xdbm.Index;
* An annotation for the Index creation. It's used when we need to inject an
* indexed attribute into a given partition. Here is an exemple :
* <pre>
- * @CreatePartition(
+ * @CreatePartition(
* name = "example",
- * @Indexes( {
- * @CreateIndex( attribute = "cn" ),
- * @CreateIndex( attribute = "sn' )
+ * @Indexes( {
+ * @CreateIndex( attribute = "cn" ),
+ * @CreateIndex( attribute = "sn' )
* })
* )
* </pre>
@@ -49,14 +49,14 @@ import org.apache.directory.server.xdbm.Index;
{ ElementType.METHOD, ElementType.TYPE })
public @interface CreateIndex
{
- /** The index implementation class */
+ /** @return The index implementation class */
Class<? extends Index> type() default Index.class;
- /** The cache size */
+ /** @return The cache size */
int cacheSize() default 1000;
- /** The indexed attribute */
+ /** @return The indexed attribute */
String attribute();
}
diff --git a/core-annotations/src/main/java/org/apache/directory/server/core/annotations/CreatePartition.java b/core-annotations/src/main/java/org/apache/directory/server/core/annotations/CreatePartition.java
index 9694bed..e24ed6c 100644
--- a/core-annotations/src/main/java/org/apache/directory/server/core/annotations/CreatePartition.java
+++ b/core-annotations/src/main/java/org/apache/directory/server/core/annotations/CreatePartition.java
@@ -31,19 +31,19 @@ import org.apache.directory.server.core.api.partition.Partition;
* An annotation for the Partition creation. A partition is defined by
* a name and a suffix, plus some other characteristics. Here is an example :
* <pre>
- * @CreatePartition(
+ * @CreatePartition(
* name = "example",
* suffix = "dc=example, dc=com",
- * @ContextEntry(
+ * @ContextEntry(
* {
* "dn: dc=example, dc=com",
* "objectclass: top",
* "objectclass: domain",
* "dc: example",
* }),
- * @Indexes( {
- * @CreateIndex( attribute = "cn" ),
- * @CreateIndex( attribute = "sn' )
+ * @Indexes( {
+ * @CreateIndex( attribute = "cn" ),
+ * @CreateIndex( attribute = "sn' )
* })
* )
* </pre>
@@ -55,27 +55,27 @@ import org.apache.directory.server.core.api.partition.Partition;
{ ElementType.METHOD, ElementType.TYPE })
public @interface CreatePartition
{
- /** The partition implementation class */
+ /** @return The partition implementation class */
Class<? extends Partition> type() default Partition.class;
- /** The partition name */
+ /** @return The partition name */
String name();
- /** The partition suffix */
+ /** @return The partition suffix */
String suffix();
- /** The context entry */
+ /** @return The context entry */
ContextEntry contextEntry() default @ContextEntry(entryLdif = "");
- /** The associated indexes */
+ /** @return The associated indexes */
CreateIndex[] indexes() default
{};
- /** The cache size */
+ /** @return The cache size */
int cacheSize() default 1000;
}
diff --git a/core-annotations/src/main/java/org/apache/directory/server/core/annotations/LoadSchema.java b/core-annotations/src/main/java/org/apache/directory/server/core/annotations/LoadSchema.java
index 70d28e6..6b9f8be 100644
--- a/core-annotations/src/main/java/org/apache/directory/server/core/annotations/LoadSchema.java
+++ b/core-annotations/src/main/java/org/apache/directory/server/core/annotations/LoadSchema.java
@@ -41,9 +41,9 @@ import java.lang.annotation.Target;
*
* Here is an exemple :
* <pre>
- * @Schemas( {
- * @LoadSchema( name = "nis", enabled="TRUE" ),
- * @LoadSchema( name = "posix", enabled="FALSE" ),
+ * @Schemas( {
+ * @LoadSchema( name = "nis", enabled="TRUE" ),
+ * @LoadSchema( name = "posix", enabled="FALSE" ),
* })
* )
* </pre>
@@ -55,10 +55,10 @@ import java.lang.annotation.Target;
{ ElementType.METHOD, ElementType.TYPE })
public @interface LoadSchema
{
- /** The schema name */
+ /** @return The schema name */
String name();
- /** The flag indicating if the schema should be enabled or disabled */
+ /** @return The flag indicating if the schema should be enabled or disabled */
boolean enabled() default true;
}
diff --git a/core-annotations/src/main/java/org/apache/directory/server/core/factory/DSAnnotationProcessor.java b/core-annotations/src/main/java/org/apache/directory/server/core/factory/DSAnnotationProcessor.java
index 53a9be0..b4d82de 100644
--- a/core-annotations/src/main/java/org/apache/directory/server/core/factory/DSAnnotationProcessor.java
+++ b/core-annotations/src/main/java/org/apache/directory/server/core/factory/DSAnnotationProcessor.java
@@ -79,6 +79,10 @@ public final class DSAnnotationProcessor
/**
* Create the DirectoryService
+ *
+ * @param dsBuilder The DirectoryService builder
+ * @return an instance of DirectoryService
+ * @throws Exception If the DirectoryService cannot be created
*/
public static DirectoryService createDS( CreateDS dsBuilder )
throws Exception
@@ -316,7 +320,8 @@ public final class DSAnnotationProcessor
*
* @param description The annotations containing the info from which we will create
* the DS
- * @return A valid DS
+ * @return A valid DirectoryService
+ * @throws Exception If the DirectoryService instance can't be returned
*/
public static DirectoryService getDirectoryService( Description description )
throws Exception
@@ -342,6 +347,7 @@ public final class DSAnnotationProcessor
* none, then we try at the class level.
*
* @return A valid DS
+ * @throws Exception If the DirectoryService instance can't be returned
*/
public static DirectoryService getDirectoryService() throws Exception
{
@@ -363,11 +369,9 @@ public final class DSAnnotationProcessor
/**
* injects an LDIF entry in the given DirectoryService
*
- * @param entry
- * the LdifEntry to be injected
- * @param service
- * the DirectoryService
- * @throws Exception
+ * @param entry the LdifEntry to be injected
+ * @param service the DirectoryService
+ * @throws Exception If the entry cannot be injected
*/
private static void injectEntry( LdifEntry entry, DirectoryService service )
throws LdapException
@@ -394,11 +398,10 @@ public final class DSAnnotationProcessor
/**
* injects the LDIF entries present in a LDIF file
*
- * @param service
- * the DirectoryService
- * @param ldifFiles
- * the array of LDIF file names (only )
- * @throws Exception
+ * @param clazz The class which classLoaded will be use to retrieve the resources
+ * @param service the DirectoryService
+ * @param ldifFiles array of LDIF file names (only )
+ * @throws Exception If we weren't able to inject LdifFiles
*/
public static void injectLdifFiles( Class<?> clazz,
DirectoryService service, String[] ldifFiles ) throws Exception
@@ -433,12 +436,9 @@ public final class DSAnnotationProcessor
/**
* 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 Exception
- * if there is a problem adding the entries from the LDIF
+ * @param service the directory service to use
+ * @param ldif the ldif containing entries to add to the server.
+ * @throws Exception if there is a problem adding the entries from the LDIF
*/
public static void injectEntries( DirectoryService service, String ldif )
throws Exception
@@ -458,6 +458,9 @@ public final class DSAnnotationProcessor
/**
* Load the schemas, and enable/disable them.
+ *
+ * @param desc The description
+ * @param service The DirectoryService instance
*/
public static void loadSchemas( Description desc, DirectoryService service )
{
@@ -482,6 +485,10 @@ public final class DSAnnotationProcessor
/**
* Apply the LDIF entries to the given service
+ *
+ * @param desc The description
+ * @param service The DirectoryService instance
+ * @throws Exception If we can't apply the ldifs
*/
public static void applyLdifs( Description desc, DirectoryService service )
throws Exception
diff --git a/core-annotations/src/main/java/org/apache/directory/server/core/factory/DirectoryServiceFactory.java b/core-annotations/src/main/java/org/apache/directory/server/core/factory/DirectoryServiceFactory.java
index 2e08ca3..65febd0 100644
--- a/core-annotations/src/main/java/org/apache/directory/server/core/factory/DirectoryServiceFactory.java
+++ b/core-annotations/src/main/java/org/apache/directory/server/core/factory/DirectoryServiceFactory.java
@@ -19,6 +19,7 @@
package org.apache.directory.server.core.factory;
+import org.apache.commons.collections.Factory;
import org.apache.directory.server.core.api.DirectoryService;
@@ -37,6 +38,7 @@ public interface DirectoryServiceFactory
* Inits the directory service factory.
*
* @param name the name
+ * @throws Exception If the DirectoryService initialization failed
*/
void init( String name ) throws Exception;
@@ -45,6 +47,7 @@ public interface DirectoryServiceFactory
* Gets the directory service.
*
* @return the directory service
+ * @throws Exception If the DirectoryService cannot be returned
*/
DirectoryService getDirectoryService() throws Exception;
@@ -52,7 +55,8 @@ public interface DirectoryServiceFactory
/**
* Gets the partition factory.
*
- * @return the partition factory
+ * @return the partition {@link Factory}
+ * @throws Exception If the partition cannot be created
*/
PartitionFactory getPartitionFactory() throws Exception;
}
diff --git a/core-annotations/src/main/java/org/apache/directory/server/core/factory/PartitionFactory.java b/core-annotations/src/main/java/org/apache/directory/server/core/factory/PartitionFactory.java
index d1f56eb..b4fb7e3 100644
--- a/core-annotations/src/main/java/org/apache/directory/server/core/factory/PartitionFactory.java
+++ b/core-annotations/src/main/java/org/apache/directory/server/core/factory/PartitionFactory.java
@@ -24,6 +24,7 @@ import java.io.File;
import org.apache.directory.api.ldap.model.schema.SchemaManager;
import org.apache.directory.server.core.api.DnFactory;
import org.apache.directory.server.core.api.partition.Partition;
+import org.apache.directory.server.xdbm.Index;
/**
@@ -38,6 +39,7 @@ public interface PartitionFactory
* Creates a new Partition.
*
* @param schemaManager The SchemaManager instance
+ * @param dnFactory The DnFactory instance
* @param id the partition id
* @param suffix the suffix
* @param cacheSize the cache size
@@ -46,8 +48,7 @@ public interface PartitionFactory
* @throws Exception the exception
*/
Partition createPartition( SchemaManager schemaManager, DnFactory dnFactory, String id, String suffix,
- int cacheSize,
- File workingDirectory ) throws Exception;
+ int cacheSize, File workingDirectory ) throws Exception;
/**