directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject [directory-server] branch master updated: Fixed server-annotations javadoc errors/warnings
Date Sun, 12 Aug 2018 22:41:56 GMT
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 ca3b275  Fixed server-annotations javadoc errors/warnings
ca3b275 is described below

commit ca3b2750b212c54315719754725a6bef8417df70
Author: Emmanuel L├ęcharny <elecharny@symas.com>
AuthorDate: Mon Aug 13 00:41:52 2018 +0200

    Fixed server-annotations javadoc errors/warnings
---
 .../server/annotations/CreateChngPwdServer.java    |  12 ++-
 .../server/annotations/CreateConsumer.java         | 115 +++++++++++++++++----
 .../server/annotations/CreateKdcServer.java        |  16 +--
 .../annotations/CreateLdapConnectionPool.java      |  36 +++----
 .../server/annotations/CreateLdapServer.java       |  30 +++---
 .../server/annotations/CreateTransport.java        |  14 +--
 .../apache/directory/server/annotations/Sasl.java  |  10 +-
 .../server/annotations/SaslMechanism.java          |   4 +-
 .../server/factory/ServerAnnotationProcessor.java  |  10 +-
 9 files changed, 167 insertions(+), 80 deletions(-)

diff --git a/server-annotations/src/main/java/org/apache/directory/server/annotations/CreateChngPwdServer.java
b/server-annotations/src/main/java/org/apache/directory/server/annotations/CreateChngPwdServer.java
index 9097311..75129dc 100644
--- a/server-annotations/src/main/java/org/apache/directory/server/annotations/CreateChngPwdServer.java
+++ b/server-annotations/src/main/java/org/apache/directory/server/annotations/CreateChngPwdServer.java
@@ -25,11 +25,19 @@ package org.apache.directory.server.annotations;
  */
 public @interface CreateChngPwdServer
 {
-    /** The default kdc service principal */
+    /** 
+     * The default kdc service principal
+     * 
+     *  @return The server Principal
+     */
     String srvPrincipal() default "kadmin/changepw@EXAMPLE.COM";
 
 
-    /** The transports to use, default none */
+    /** 
+     * The transports to use, default none
+     * 
+     *  @return The Transports
+     */
     CreateTransport[] transports() default
         {};
 }
diff --git a/server-annotations/src/main/java/org/apache/directory/server/annotations/CreateConsumer.java
b/server-annotations/src/main/java/org/apache/directory/server/annotations/CreateConsumer.java
index 6985d5c..ec768a2 100644
--- a/server-annotations/src/main/java/org/apache/directory/server/annotations/CreateConsumer.java
+++ b/server-annotations/src/main/java/org/apache/directory/server/annotations/CreateConsumer.java
@@ -66,80 +66,153 @@ import org.apache.directory.ldap.client.api.NoVerificationTrustManager;
     { ElementType.METHOD, ElementType.TYPE })
 public @interface CreateConsumer
 {
-    /** host name of the syncrepl remote server, default value is "" */
+    /** 
+     * Host name of the syncrepl remote server, default value is ""
+     * 
+     *  @return The remote host
+     */
     String remoteHost() default "";
 
 
-    /** port number of the syncrepl provider server, default is 389 */
+    /** 
+     * Port number of the syncrepl provider server, default is 389 
+     * 
+     * @return The remote port
+     */
     int remotePort() default 389;
 
 
-    /** replication user's Dn */
+    /** 
+     * Replication user's Dn 
+     * 
+     * @return the replication user's Dn
+     */
     String replUserDn();
 
 
-    /** password for binding with replication user dn */
+    /** 
+     * Password for binding with replication user dn 
+     * 
+     * @return the replication user credentials
+     */
     String replUserPassword();
 
 
-    /** flag to represent refresh and persist or refresh only mode, defaults to true */
+    /** 
+     * flag to represent refresh and persist or refresh only mode, defaults to true
+     *  
+     * @return <tt>true</tt> if replication is done with a refresh and persist
+     */
     boolean refreshNPersist() default true;
 
 
-    /** time interval for successive sync requests, default is 60 seconds */
+    /** 
+     * Time interval for successive sync requests, default is 60 seconds 
+     * 
+     * @return The refresh interval
+     */
     long refreshInterval() default 60 * 1000;
 
 
-    /** the base Dn whose content will be searched for replicating */
+    /** 
+     * The base Dn whose content will be searched for replicating
+     * 
+     * @return The replication Base DN 
+     */
     String baseDn();
 
 
-    /** the ldap filter for fetching the entries, default value is (objectClass=*) */
+    /** 
+     * The ldap filter for fetching the entries, default value is (objectClass=*)
+     * 
+     *  @return The filter
+     */
     String filter() default LdapConstants.OBJECT_CLASS_STAR;
 
 
-    /** names of attributes to be replicated, default value is all user attributes */
+    /** 
+     * Names of attributes to be replicated, default value is all user attributes
+     * 
+     * @return The replicated attributes
+     */
     String[] attributes() default "";
 
 
-    /** the maximum number of search results to be fetched
-     * default value is 0 (i.e no limit) */
+    /** 
+     * The maximum number of search results to be fetched
+     * default value is 0 (i.e no limit) 
+     * 
+     * @return The search size limit
+     */
     int searchSizeLimit() default 0;
 
 
-    /** the timeout value to be used while doing a search 
-     * default value is 0 (i.e no limit)*/
+    /** 
+     * The timeout value to be used while doing a search 
+     * default value is 0 (i.e no limit)
+     * 
+     * @return The search time limit
+     */
     int searchTimeout() default 0;
 
 
-    /** the search scope, default is sub tree level */
+    /** 
+     * The search scope, default is sub tree level 
+     * 
+     * @return the Search scope
+     */
     SearchScope searchScope() default SearchScope.SUBTREE;
 
 
-    /** alias dereferencing mode, default is set to 'never deref aliases' */
+    /** 
+     * Alias dereferencing mode, default is set to 'never deref aliases' 
+     * 
+     * @return the Deref Alias mode
+     */
     AliasDerefMode aliasDerefMode() default AliasDerefMode.NEVER_DEREF_ALIASES;
 
 
-    /** the replica's id */
+    /**
+     * @return The replica's id
+     */
     int replicaId();
 
 
-    /** The configuration entry DN */
+    /** 
+     * @return The configuration entry DN
+     */
     String configEntryDn() default "";
 
 
-    /** flag to indicate whether to chase referrals or not, default is false hence passes
ManageDsaITControl with syncsearch request*/
+    /** 
+     * flag to indicate whether to chase referrals or not, default is false hence passes
ManageDsaITControl 
+     * with syncsearch request
+     * 
+     * @return <tt>true</tt> if referals are chased
+     */
     boolean chaseReferrals() default false;
 
 
-    /** flag to indicate the use of TLS, default is true */
+    /** 
+     * flag to indicate the use of TLS, default is true
+     * 
+     * @return <tt>true</tt> if Tls is in use
+     */
     boolean useTls() default true;
 
 
-    /** flag to indicate the use of strict certificate verification, default is true */
+    /** 
+     * flag to indicate the use of strict certificate verification, default is true
+     *  
+     * @return <tt>true</tt> if a strict certificate validation is done
+     */
     boolean strictCertVerification() default true;
 
 
-    /** the X509 certificate trust manager used, default value set to {@link NoVerificationTrustManager}
*/
+    /** 
+     * The X509 certificate trust manager used, default value set to {@link NoVerificationTrustManager}
+     * 
+     *  @return The trust manager class
+     */
     Class<?> trustManager() default NoVerificationTrustManager.class;
 }
diff --git a/server-annotations/src/main/java/org/apache/directory/server/annotations/CreateKdcServer.java
b/server-annotations/src/main/java/org/apache/directory/server/annotations/CreateKdcServer.java
index 7c54772..86c6fb7 100644
--- a/server-annotations/src/main/java/org/apache/directory/server/annotations/CreateKdcServer.java
+++ b/server-annotations/src/main/java/org/apache/directory/server/annotations/CreateKdcServer.java
@@ -48,31 +48,31 @@ import org.apache.directory.server.constants.ServerDNConstants;
     { ElementType.METHOD, ElementType.TYPE })
 public @interface CreateKdcServer
 {
-    /** The instance name */
+    /** @return The instance name */
     String name() default "DefaultKrbServer";
 
 
-    /** The transports to use, default to LDAP */
+    /** @return The transports to use, default to LDAP */
     CreateTransport[] transports() default
         {};
 
 
-    /** The default kdc realm */
+    /** @return The default kdc realm */
     String primaryRealm() default "EXAMPLE.COM";
 
 
-    /** The default kdc service principal */
+    /** @return The default kdc service principal */
     String kdcPrincipal() default "krbtgt/EXAMPLE.COM@EXAMPLE.COM";
 
 
-    /** The maximum ticket lifetime. */
+    /** @return The maximum ticket lifetime. */
     long maxTicketLifetime() default 60000 * 1440;
 
 
-    /** The maximum renewable lifetime. */
+    /** @return The maximum renewable lifetime. */
     long maxRenewableLifetime() default 60000 * 10080;
     
-    /** the change password server.
+    /** @return the change password server.
      * NOTE: this annotation is declared as an array cause there is no
      * way to define the default value as null for a value in annotation
      * 
@@ -81,6 +81,6 @@ public @interface CreateKdcServer
      * array elements will be ignored*/
     CreateChngPwdServer[] chngPwdServer() default {};
     
-    /** the DN of the search base for finding users and services */
+    /** @return the DN of the search base for finding users and services */
     String searchBaseDn() default ServerDNConstants.USER_EXAMPLE_COM_DN;
 }
\ No newline at end of file
diff --git a/server-annotations/src/main/java/org/apache/directory/server/annotations/CreateLdapConnectionPool.java
b/server-annotations/src/main/java/org/apache/directory/server/annotations/CreateLdapConnectionPool.java
index c3d6410..4f960fc 100755
--- a/server-annotations/src/main/java/org/apache/directory/server/annotations/CreateLdapConnectionPool.java
+++ b/server-annotations/src/main/java/org/apache/directory/server/annotations/CreateLdapConnectionPool.java
@@ -54,77 +54,77 @@ import org.apache.directory.ldap.client.api.LdapConnectionValidator;
     { ElementType.METHOD, ElementType.TYPE })
 public @interface CreateLdapConnectionPool
 {
-    /** Attributes names to be added to the list of default binary attributes */
+    /** @return Attributes names to be added to the list of default binary attributes */
     String[] additionalBinaryAttributes() default {};
     
     
-    /** LdapConnection factory implementation class */
+    /** @return LdapConnection factory implementation class */
     Class<? extends LdapConnectionFactory> connectionFactoryClass() default 
             DefaultLdapConnectionFactory.class;
     
     
-    /** LdapConnection pool factory implementation class */
+    /** @return LdapConnection pool factory implementation class */
     Class<? extends PooledObjectFactory<LdapConnection>> factoryClass() default

             DefaultPoolableLdapConnectionFactory.class;
     
     
-    /** Connections borrowed in LIFO order, default true */
+    /** @return Connections borrowed in LIFO order, default true */
     boolean lifo() default true;
     
     
-    /** The maximum number of active connections, default 8 */
+    /** @return The maximum number of active connections, default 8 */
     int maxActive() default 8;
     
     
-    /** The maximum number of idle connections, default 8 */
+    /** @return The maximum number of idle connections, default 8 */
     int maxIdle() default 8;
     
     
-    /** The maximum amount of time to wait for a connection to be returned in millis, default
-1 */
+    /** @return The maximum amount of time to wait for a connection to be returned in millis,
default -1 */
     long maxWait() default -1L;
     
     
-    /** The minimum idle time before evicting a connection in millis, default 1000*60*30
*/
+    /** @return The minimum idle time before evicting a connection in millis, default 1000*60*30
*/
     long minEvictableIdleTimeMillis() default 1000L * 60L * 30L;
     
     
-    /** The minumum number of idle instances before evictor spawns new object, default 0
*/
+    /** @return The minumum number of idle instances before evictor spawns new object, default
0 */
     int minIdle() default 0;
     
     
-    /** The number of objects to test per eviction run, default 3 */
+    /** @return The number of objects to test per eviction run, default 3 */
     int numTestsPerEvictionRun() default 3;
 
     
-    /** Same as minEvictableIdleTimeMillis with extra condition that minIdle objects remain
in pool, default -1 */
+    /** @return Same as minEvictableIdleTimeMillis with extra condition that minIdle objects
remain in pool, default -1 */
     long softMinEvictableIdleTimeMillis() default -1L;
     
     
-    /** If true, connection will be tested on borrow, default false */
+    /** @return If true, connection will be tested on borrow, default false */
     boolean testOnBorrow() default false;
     
     
-    /** If true, connection will be tested on return, default false */
+    /** @return If true, connection will be tested on return, default false */
     boolean testOnReturn() default false;
     
     
-    /** If true, connection will be tested on while idle, default false */
+    /** @return If true, connection will be tested on while idle, default false */
     boolean testWhileIdle() default false;
     
     
-    /** The time, in millis, between eviction runs, default -1 (forever) */
+    /** @return The time, in millis, between eviction runs, default -1 (forever) */
     long timeBetweenEvictionRunsMillis() default -1L;
     
     
-    /** The connection timeout in millis, default 30000 */
+    /** @return The connection timeout in millis, default 30000 */
     long timeout() default 30000L;
     
     
-    /** The class to use for validation */
+    /** @return The class to use for validation */
     Class<? extends LdapConnectionValidator> validatorClass() default 
         DefaultLdapConnectionValidator.class;
 
 
-    /** The default action when connections are exhausted, default 1 (block) */
+    /** @return The default action when connections are exhausted, default 1 (block) */
     byte whenExhaustedAction() default 1;
 }
\ No newline at end of file
diff --git a/server-annotations/src/main/java/org/apache/directory/server/annotations/CreateLdapServer.java
b/server-annotations/src/main/java/org/apache/directory/server/annotations/CreateLdapServer.java
index d75a1ad..bd167c9 100644
--- a/server-annotations/src/main/java/org/apache/directory/server/annotations/CreateLdapServer.java
+++ b/server-annotations/src/main/java/org/apache/directory/server/annotations/CreateLdapServer.java
@@ -49,59 +49,61 @@ import org.apache.directory.server.factory.DefaultLdapServerFactory;
     { ElementType.METHOD, ElementType.TYPE })
 public @interface CreateLdapServer
 {
-    /** The instance name */
+    /** @return The instance name */
     String name() default "DefaultLdapServer";
 
 
-    /** The transports to use, default to LDAP */
+    /** @return The transports to use, default to LDAP */
     CreateTransport[] transports() default
         {};
 
 
-    /** The LdapServer factory */
+    /** @return The LdapServer factory */
     Class<?> factory() default DefaultLdapServerFactory.class;
 
 
-    /** The maximum size limit.*/
+    /** @return The maximum size limit.*/
     long maxSizeLimit() default 1000;
 
 
-    /** The maximum time limit. */
+    /** @return The maximum time limit. */
     int maxTimeLimit() default 1000;
 
 
-    /** Tells if anonymous access are allowed or not. */
+    /** @return Tells if anonymous access are allowed or not. */
     boolean allowAnonymousAccess() default false;
 
 
-    /** The external keyStore file to use, default to the empty string */
+    /** @return The external keyStore file to use, default to the empty string */
     String keyStore() default "";
 
 
-    /** The certificate password in base64, default to the empty string */
+    /** @return The certificate password in base64, default to the empty string */
     String certificatePassword() default "";
 
 
-    /** name of the classes implementing extended operations */
+    /** @return name of the classes implementing extended operations */
     Class<?>[] extendedOpHandlers() default
         {};
 
 
-    /** supported set of SASL mechanisms */
+    /** @return supported set of SASL mechanisms */
     SaslMechanism[] saslMechanisms() default
         {};
 
 
-    /** NTLM provider class, default value is a invalid class */
+    /** @return NTLM provider class, default value is a invalid class */
     Class<?> ntlmProvider() default Object.class;
 
 
-    /** The name of this host, validated during SASL negotiation. */
+    /** @return The name of this host, validated during SASL negotiation. */
     String saslHost() default "ldap.example.com";
     
-    /** The name of this host, validated during SASL negotiation. */
+    
+    /** @return The name of this host, validated during SASL negotiation. */
     String[] saslRealms() default {"example.com"};
     
-    /** The service principal, used by GSSAPI. */
+    
+    /** @return The service principal, used by GSSAPI. */
     String saslPrincipal() default "ldap/ldap.example.com@EXAMPLE.COM";
 }
\ No newline at end of file
diff --git a/server-annotations/src/main/java/org/apache/directory/server/annotations/CreateTransport.java
b/server-annotations/src/main/java/org/apache/directory/server/annotations/CreateTransport.java
index 05edf85..b3fe0cb 100644
--- a/server-annotations/src/main/java/org/apache/directory/server/annotations/CreateTransport.java
+++ b/server-annotations/src/main/java/org/apache/directory/server/annotations/CreateTransport.java
@@ -41,31 +41,31 @@ import java.lang.annotation.Target;
     { ElementType.METHOD, ElementType.TYPE })
 public @interface CreateTransport
 {
-    /** The name for this protocol*/
+    /** @return The name for this protocol*/
     String protocol();
 
 
-    /** The transport type (TCP or UDP) Default to TCP */
+    /** @return The transport type (TCP or UDP) Default to TCP */
     TransportType type() default TransportType.TCP;
 
 
-    /** The port to use, default to a bad value so that we know 
+    /** @return The port to use, default to a bad value so that we know 
      * we have to pick one random available port */
     int port() default -1;
 
 
-    /** The InetAddress for this transport. */
+    /** @return The InetAddress for this transport. */
     String address() default "";
 
 
-    /** The backlog. Default to 50 */
+    /** @return The backlog. Default to 50 */
     int backlog() default 50;
 
 
-    /** A flag to tell if the transport is SSL based. Default to false */
+    /** @return A flag to tell if the transport is SSL based. Default to false */
     boolean ssl() default false;
 
 
-    /** The number of threads to use. Default to 3*/
+    /** @return The number of threads to use. Default to 3*/
     int nbThreads() default 3;
 }
\ No newline at end of file
diff --git a/server-annotations/src/main/java/org/apache/directory/server/annotations/Sasl.java
b/server-annotations/src/main/java/org/apache/directory/server/annotations/Sasl.java
index 2bfd919..bd17688 100644
--- a/server-annotations/src/main/java/org/apache/directory/server/annotations/Sasl.java
+++ b/server-annotations/src/main/java/org/apache/directory/server/annotations/Sasl.java
@@ -52,25 +52,25 @@ import org.apache.directory.server.ldap.handlers.sasl.ntlm.NtlmMechanismHandler;
     { ElementType.METHOD, ElementType.TYPE })
 public @interface Sasl
 {
-    /** The SASL host, default to "" */
+    /** @return The SASL host, default to "" */
     String host() default "";
 
 
-    /** The principal */
+    /** @return The principal */
     String principal();
 
 
-    /** The SASL QOP list */
+    /** @return The SASL QOP list */
     String[] qop() default
         { "auth", "auth-int", "auth-conf" };
 
 
-    /** The SASL realms */
+    /** @return The SASL realms */
     String[] realms() default
         {};
 
 
-    /** The mechanism handlers.*/
+    /** @return The mechanism handlers.*/
     Class<?>[] mechanismHandler() default
         {
             SimpleMechanismHandler.class,
diff --git a/server-annotations/src/main/java/org/apache/directory/server/annotations/SaslMechanism.java
b/server-annotations/src/main/java/org/apache/directory/server/annotations/SaslMechanism.java
index d46f905..f0cda23 100644
--- a/server-annotations/src/main/java/org/apache/directory/server/annotations/SaslMechanism.java
+++ b/server-annotations/src/main/java/org/apache/directory/server/annotations/SaslMechanism.java
@@ -28,10 +28,10 @@ package org.apache.directory.server.annotations;
  */
 public @interface SaslMechanism
 {
-    /** name of the SASL mechanism */
+    /** @return name of the SASL mechanism */
     String name();
 
 
-    /** class implementing the named SASL mechanism */
+    /** @return class implementing the named SASL mechanism */
     Class<?> implClass();
 }
diff --git a/server-annotations/src/main/java/org/apache/directory/server/factory/ServerAnnotationProcessor.java
b/server-annotations/src/main/java/org/apache/directory/server/factory/ServerAnnotationProcessor.java
index d10e02b..85997d6 100644
--- a/server-annotations/src/main/java/org/apache/directory/server/factory/ServerAnnotationProcessor.java
+++ b/server-annotations/src/main/java/org/apache/directory/server/factory/ServerAnnotationProcessor.java
@@ -117,6 +117,10 @@ public final class ServerAnnotationProcessor
      * Just gives an instance of {@link LdapServer} without starting it.
      * For getting a running LdapServer instance see {@link #createLdapServer(CreateLdapServer,
DirectoryService)}
      * @see #createLdapServer(CreateLdapServer, DirectoryService)
+     * 
+     * @param createLdapServer The LdapServer to create
+     * @param directoryService the directory service
+     * @return The created LdapServer
      */
     public static LdapServer instantiateLdapServer( CreateLdapServer createLdapServer, DirectoryService
directoryService )
     {
@@ -213,7 +217,9 @@ public final class ServerAnnotationProcessor
      * Returns an LdapServer instance and starts it before returning the instance, infering
      * the configuration from the Stack trace
      *  
+     * @param directoryService the directory service
      * @return a running LdapServer instance
+     * @throws ClassNotFoundException If the CreateLdapServer class cannot be loaded
      */
     public static LdapServer getLdapServer( DirectoryService directoryService ) throws ClassNotFoundException
     {
@@ -266,6 +272,7 @@ public final class ServerAnnotationProcessor
      * the configuration from the Stack trace
      *  
      * @return a running LdapServer instance
+     * @throws ClassNotFoundException If the CreateConsumer class cannot be loaded
      */
     public static ReplicationConsumer createConsumer() throws ClassNotFoundException
     {
@@ -318,12 +325,9 @@ public final class ServerAnnotationProcessor
      *
      * @param description A description for the created LdapServer
      * @param directoryService The associated DirectoryService
-     * @param startPort The port used by the server
      * @return An LdapServer instance 
-     * @throws Exception If the server cannot be started
      */
     public static LdapServer createLdapServer( Description description, DirectoryService
directoryService )
-        throws Exception
     {
         CreateLdapServer createLdapServer = description.getAnnotation( CreateLdapServer.class
);
 


Mime
View raw message