directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r761711 - /directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/
Date Fri, 03 Apr 2009 15:40:01 GMT
Author: elecharny
Date: Fri Apr  3 15:40:00 2009
New Revision: 761711

URL: http://svn.apache.org/viewvc?rev=761711&view=rev
Log:
o Added some base constructors
o Added the missing search classes
o Fixed some javaDoc

Added:
    directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/SearchDoneResponseImpl.java
    directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/SearchEntryResponseImpl.java
Modified:
    directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/AbstractResponseWithResult.java
    directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/SearchRefResponse.java
    directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/SearchRefResponseImpl.java

Modified: directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/AbstractResponseWithResult.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/AbstractResponseWithResult.java?rev=761711&r1=761710&r2=761711&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/AbstractResponseWithResult.java
(original)
+++ directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/AbstractResponseWithResult.java
Fri Apr  3 15:40:00 2009
@@ -32,6 +32,15 @@
     private LdapResult ldapResult;
     
     /**
+     * Creates a new instance of AbstractResponseWithResult.
+     */
+    public AbstractResponseWithResult()
+    {
+        super();
+    }
+
+    
+    /**
      * Returns the response's result
      * 
      * @return a result containing response with defaults and the messageId set

Added: directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/SearchDoneResponseImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/SearchDoneResponseImpl.java?rev=761711&view=auto
==============================================================================
--- directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/SearchDoneResponseImpl.java
(added)
+++ directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/SearchDoneResponseImpl.java
Fri Apr  3 15:40:00 2009
@@ -0,0 +1,38 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.shared.ldap.client.api.messages;
+
+
+/**
+ * Search done protocol response message used to indicate the completion of a
+ * search request message. It's an empty class, just created for completeness.
+ * 
+ * @author <a href="mailto:dev@directory.apache.org"> Apache Directory Project</a>
+ */
+public class SearchDoneResponseImpl extends AbstractResponseWithResult implements SearchDoneResponse
+{
+    /**
+     * Creates a new instance of SearchDoneResponseImpl.
+     */
+    public SearchDoneResponseImpl()
+    {
+        super();
+    }
+}

Added: directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/SearchEntryResponseImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/SearchEntryResponseImpl.java?rev=761711&view=auto
==============================================================================
--- directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/SearchEntryResponseImpl.java
(added)
+++ directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/SearchEntryResponseImpl.java
Fri Apr  3 15:40:00 2009
@@ -0,0 +1,81 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+
+package org.apache.directory.shared.ldap.client.api.messages;
+
+
+import org.apache.directory.shared.ldap.entry.Entry;
+import org.apache.directory.shared.ldap.name.LdapDN;
+
+
+/**
+ * Search entry protocol response message used to return non referral entries to
+ * the client in response to a search request message.
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Revision: 760984 $
+ */
+public class SearchEntryResponseImpl extends AbstractMessage implements SearchEntryResponse
+{
+    /** The found entry */
+    private Entry entry;
+    
+    /**
+     * Creates a new instance of SearchEntryResponseImpl.
+     */
+    public SearchEntryResponseImpl()
+    {
+        super();
+    }
+
+    
+    /**
+     * {@inheritDoc}
+     */
+    public LdapDN getObjectName()
+    {
+        if ( entry != null )
+        {
+            return entry.getDn();
+        }
+        else
+        {
+            return LdapDN.EMPTY_LDAPDN;
+        }
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public Entry getEntry()
+    {
+        return entry;
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void setEntry( Entry entry )
+    {
+        this.entry = entry;
+    }
+}

Modified: directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/SearchRefResponse.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/SearchRefResponse.java?rev=761711&r1=761710&r2=761711&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/SearchRefResponse.java
(original)
+++ directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/SearchRefResponse.java
Fri Apr  3 15:40:00 2009
@@ -51,31 +51,31 @@
     /**
      * Sets the sequence of LdapUrls as a Referral instance.
      * 
-     * @param referrals the sequence of LdapUrls
+     * @param urls the sequence of LdapUrls
      */
-    void addReferrals( LdapURL... referrals );
+    void addReferrals( LdapURL... urls );
 
 
     /**
      * Sets the sequence of LdapUrls as a Referral instance.
      * 
-     * @param referrals the sequence of LdapUrls
+     * @param urls the sequence of LdapUrls
      */
-    void addReferrals( String... referrals );
+    void addReferrals( String... urls );
 
 
     /**
      * Removes the sequence of LdapUrls from the Referral instance.
      * 
-     * @param referrals the sequence of LdapUrls
+     * @param urls the sequence of LdapUrls
      */
-    void removeReferrals( LdapURL... referrals );
+    void removeReferrals( LdapURL... urls );
 
 
     /**
      * Removes the sequence of LdapUrls from the Referral instance.
      * 
-     * @param referrals the sequence of LdapUrls
+     * @param urls the sequence of LdapUrls
      */
-    void removeReferrals( String... referrals );
+    void removeReferrals( String... urls );
 }

Modified: directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/SearchRefResponseImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/SearchRefResponseImpl.java?rev=761711&r1=761710&r2=761711&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/SearchRefResponseImpl.java
(original)
+++ directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/SearchRefResponseImpl.java
Fri Apr  3 15:40:00 2009
@@ -30,15 +30,22 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Revision: 760984 $
  */
-public class SearchRefResponseImpl extends AbstractMessage implements SearchResponse
+public class SearchRefResponseImpl extends AbstractMessage implements SearchRefResponse
 {
     /** The list of LdapURL referrals */
     private Referral referral;
     
     /**
-     * Gets the sequence of LdapUrls as a Referral instance.
-     * 
-     * @return the sequence of LdapUrls
+     * Creates a new instance of SearchRefResponseImpl.
+     */
+    public SearchRefResponseImpl()
+    {
+        super();
+    }
+
+    
+    /**
+     * {@inheritDoc}
      */
     public Referral getReferrals()
     {
@@ -47,9 +54,7 @@
 
 
     /**
-     * Sets the sequence of LdapUrls as a Referral instance.
-     * 
-     * @param referral the sequence of LdapUrls
+     * {@inheritDoc}
      */
     public void setReferral( Referral referral )
     {
@@ -58,50 +63,57 @@
 
 
     /**
-     * Sets the sequence of LdapUrls as a Referral instance.
-     * 
-     * @param referrals the sequence of LdapUrls
+     * {@inheritDoc}
      */
-    public void addReferrals( LdapURL... referrals )
+    public void addReferrals( LdapURL... urls )
     {
         if ( referral == null )
         {
             referral = new ReferralImpl();
         }
         
-        
+        referral.addLdapUrls( urls );
     }
 
 
     /**
-     * Sets the sequence of LdapUrls as a Referral instance.
-     * 
-     * @param referrals the sequence of LdapUrls
+     * {@inheritDoc}
      */
-    public void addReferrals( String... referrals )
+    public void addReferrals( String... urls )
     {
+        if ( referral == null )
+        {
+            referral = new ReferralImpl();
+        }
         
+        referral.addLdapUrls( urls );
     }
 
 
     /**
-     * Removes the sequence of LdapUrls from the Referral instance.
-     * 
-     * @param referrals the sequence of LdapUrls
+     * {@inheritDoc}
      */
-    public void removeReferrals( LdapURL... referrals )
+    public void removeReferrals( LdapURL... urls )
     {
+        if ( referral == null )
+        {
+            referral = new ReferralImpl();
+        }
         
+        referral.removeLdapUrl( urls );
     }
 
 
     /**
-     * Removes the sequence of LdapUrls from the Referral instance.
-     * 
-     * @param referrals the sequence of LdapUrls
+     * {@inheritDoc}
      */
-    public void removeReferrals( String... referrals )
+    public void removeReferrals( String... urls )
     {
+        if ( referral == null )
+        {
+            referral = new ReferralImpl();
+        }
         
+        referral.removeLdapUrl( urls );
     }
 }



Mime
View raw message