directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r664443 - in /directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/message: AbstractMessage.java Message.java
Date Sun, 08 Jun 2008 05:21:29 GMT
Author: akarasulu
Date: Sat Jun  7 22:21:29 2008
New Revision: 664443

URL: http://svn.apache.org/viewvc?rev=664443&view=rev
Log:
added easy lookup method to see if a control is present within an LdapMessage

Modified:
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/message/AbstractMessage.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/message/Message.java

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/message/AbstractMessage.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/message/AbstractMessage.java?rev=664443&r1=664442&r2=664443&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/message/AbstractMessage.java
(original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/message/AbstractMessage.java
Sat Jun  7 22:21:29 2008
@@ -93,6 +93,15 @@
         return Collections.unmodifiableMap( controls );
     }
 
+    
+    /**
+     * @see org.apache.directory.shared.ldap.message.Message#hasControl(java.lang.String)
+     */
+    public boolean hasControl( String oid )
+    {
+        return controls.containsKey( oid );
+    }
+    
 
     /**
      * Adds a control to this Message.

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/message/Message.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/message/Message.java?rev=664443&r1=664442&r2=664443&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/message/Message.java
(original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/message/Message.java
Sat Jun  7 22:21:29 2008
@@ -51,6 +51,15 @@
      */
     Map<String, Control> getControls();
 
+    
+    /**
+     * Checks whether or not this message has the specified control.
+     *
+     * @param oid the OID of the control
+     * @return true if this message has the control, false if it does not
+     */
+    boolean hasControl( String oid );
+    
 
     /**
      * Adds a control to this Message.



Mime
View raw message