directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject [directory-ldap-api] branch master updated: Removed the constant TYPE from the interfaces, moved it to the implementing classes.
Date Tue, 27 Feb 2018 18:40:36 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-ldap-api.git


The following commit(s) were added to refs/heads/master by this push:
     new e5939d2  Removed the constant TYPE from the interfaces, moved it to the implementing
classes.
e5939d2 is described below

commit e5939d2e21ae97bafb0cf3c3b2b348f3ab75f28b
Author: Emmanuel L├ęcharny <elecharny@symas.com>
AuthorDate: Tue Feb 27 19:40:24 2018 +0100

    Removed the constant TYPE from the interfaces, moved it to the
    implementing classes.
---
 .../api/ldap/model/message/AbandonRequest.java     |  4 ---
 .../api/ldap/model/message/AbandonRequestImpl.java |  3 ++
 .../api/ldap/model/message/ExtendedResponse.java   |  4 ---
 .../ldap/model/message/ExtendedResponseImpl.java   |  2 ++
 .../ldap/model/message/IntermediateResponse.java   |  4 ---
 .../model/message/IntermediateResponseImpl.java    |  2 ++
 .../api/ldap/model/message/ResultCodeEnum.java     | 35 +---------------------
 7 files changed, 8 insertions(+), 46 deletions(-)

diff --git a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/AbandonRequest.java
b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/AbandonRequest.java
index 4928229..4d9496f 100644
--- a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/AbandonRequest.java
+++ b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/AbandonRequest.java
@@ -28,10 +28,6 @@ package org.apache.directory.api.ldap.model.message;
  */
 public interface AbandonRequest extends Request
 {
-    /** Ldap abandon request type code */
-    MessageTypeEnum TYPE = MessageTypeEnum.ABANDON_REQUEST;
-
-
     /**
      * Gets the id of the request operation to terminate.
      * 
diff --git a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/AbandonRequestImpl.java
b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/AbandonRequestImpl.java
index ef32ef9..e91a249 100644
--- a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/AbandonRequestImpl.java
+++ b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/AbandonRequestImpl.java
@@ -33,6 +33,9 @@ public class AbandonRequestImpl extends AbstractRequest implements AbandonReques
     /** Sequence identifier of the outstanding request message to abandon */
     private int abandonId;
 
+    /** Ldap abandon request type code */
+    private static final MessageTypeEnum TYPE = MessageTypeEnum.ABANDON_REQUEST;
+
 
     /**
      * Creates an AbandonRequest implementation for an outstanding request.
diff --git a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ExtendedResponse.java
b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ExtendedResponse.java
index 1099705..49a6983 100644
--- a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ExtendedResponse.java
+++ b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ExtendedResponse.java
@@ -28,10 +28,6 @@ package org.apache.directory.api.ldap.model.message;
  */
 public interface ExtendedResponse extends ResultResponse
 {
-    /** Extended response message type enumeration value */
-    MessageTypeEnum TYPE = MessageTypeEnum.EXTENDED_RESPONSE;
-
-
     /**
      * Gets the OID uniquely identifying this extended response (a.k.a. its
      * name).
diff --git a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ExtendedResponseImpl.java
b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ExtendedResponseImpl.java
index 640ceae..7c037bd 100644
--- a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ExtendedResponseImpl.java
+++ b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ExtendedResponseImpl.java
@@ -32,6 +32,8 @@ public class ExtendedResponseImpl extends AbstractResultResponse implements
Exte
     /** Object identifier for the extended response */
     protected String responseName;
 
+    /** Extended response message type enumeration value */
+    private static final MessageTypeEnum TYPE = MessageTypeEnum.EXTENDED_RESPONSE;
 
     /**
      * Creates an ExtendedResponse as a reply to an ExtendedRequest.
diff --git a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/IntermediateResponse.java
b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/IntermediateResponse.java
index 617f3eb..6c5e605 100644
--- a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/IntermediateResponse.java
+++ b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/IntermediateResponse.java
@@ -29,10 +29,6 @@ package org.apache.directory.api.ldap.model.message;
  */
 public interface IntermediateResponse extends Response
 {
-    /** Intermediate response message type enumeration value */
-    MessageTypeEnum TYPE = MessageTypeEnum.INTERMEDIATE_RESPONSE;
-
-
     /**
      * Gets the response name
      * 
diff --git a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/IntermediateResponseImpl.java
b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/IntermediateResponseImpl.java
index 72e4fdc..31757b5 100644
--- a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/IntermediateResponseImpl.java
+++ b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/IntermediateResponseImpl.java
@@ -40,6 +40,8 @@ public class IntermediateResponseImpl extends AbstractResultResponse implements
     /** Response Value for the intermediate response */
     protected byte[] responseValue;
 
+    /** Intermediate response message type enumeration value */
+    private static final MessageTypeEnum TYPE = MessageTypeEnum.INTERMEDIATE_RESPONSE;
 
     /**
      * Creates a new IntermediateResponseImpl instance
diff --git a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ResultCodeEnum.java
b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ResultCodeEnum.java
index f8e035f..7ac9429 100644
--- a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ResultCodeEnum.java
+++ b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ResultCodeEnum.java
@@ -1623,84 +1623,51 @@ public enum ResultCodeEnum
                 return set.iterator().next();
 
             case ADD_REQUEST:
-                candidates = intersection( set, ADD_CODES );
-                break;
-
             case ADD_RESPONSE:
                 candidates = intersection( set, ADD_CODES );
                 break;
 
             case BIND_REQUEST:
-                candidates = intersection( set, BIND_CODES );
-                break;
-
             case BIND_RESPONSE:
                 candidates = intersection( set, BIND_CODES );
                 break;
 
             case COMPARE_REQUEST:
-                candidates = intersection( set, COMPARE_CODES );
-                break;
-
             case COMPARE_RESPONSE:
                 candidates = intersection( set, COMPARE_CODES );
                 break;
 
             case DEL_REQUEST:
-                candidates = intersection( set, DELETE_CODES );
-                break;
-
             case DEL_RESPONSE:
                 candidates = intersection( set, DELETE_CODES );
                 break;
 
             case EXTENDED_REQUEST:
-                candidates = intersection( set, EXTENDED_CODES );
-                break;
-
             case EXTENDED_RESPONSE:
                 candidates = intersection( set, EXTENDED_CODES );
                 break;
 
             case MODIFYDN_REQUEST:
-                candidates = intersection( set, MODIFYDN_CODES );
-                break;
-
             case MODIFYDN_RESPONSE:
                 candidates = intersection( set, MODIFYDN_CODES );
                 break;
 
             case MODIFY_REQUEST:
-                candidates = intersection( set, MODIFY_CODES );
-                break;
-
             case MODIFY_RESPONSE:
                 candidates = intersection( set, MODIFY_CODES );
                 break;
 
             case SEARCH_REQUEST:
-                candidates = intersection( set, SEARCH_CODES );
-                break;
-
             case SEARCH_RESULT_DONE:
-                candidates = intersection( set, SEARCH_CODES );
-                break;
-
             case SEARCH_RESULT_ENTRY:
-                candidates = intersection( set, SEARCH_CODES );
-                break;
-
             case SEARCH_RESULT_REFERENCE:
+            case INTERMEDIATE_RESPONSE:
                 candidates = intersection( set, SEARCH_CODES );
                 break;
 
             case UNBIND_REQUEST:
                 return set.iterator().next();
 
-            case INTERMEDIATE_RESPONSE:
-                candidates = intersection( set, SEARCH_CODES );
-                break;
-
             default:
                 throw new IllegalArgumentException( "Unexpected MessageTypeEnum " + type
);
         }

-- 
To stop receiving notification emails like this one, please contact
elecharny@apache.org.

Mime
View raw message