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 2009/06/14 21:35:41 UTC
svn commit: r784608 - in /directory:
apacheds/trunk/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/operations/
shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/
shared/trunk/client-api/src/main/java/...
Author: elecharny
Date: Sun Jun 14 19:35:40 2009
New Revision: 784608
URL: http://svn.apache.org/viewvc?rev=784608&view=rev
Log:
Merged more classes and interfaces
Added:
directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/AddRequest.java
- copied, changed from r784524, directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/AddRequest.java
Removed:
directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/AddRequest.java
directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/SearchRequestImpl.java
directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/SearchResultDoneImpl.java
directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/SearchResultEntryImpl.java
directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/SearchResultReferenceImpl.java
Modified:
directory/apacheds/trunk/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientAddRequestTest.java
directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/LdapConnection.java
directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/BindRequest.java
directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/DeleteRequest.java
directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/ModifyDnRequest.java
directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/ModifyRequest.java
directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/SearchRequest.java
directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/SearchResultDone.java
directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/SearchResultEntry.java
directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/SearchResultReference.java
directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/UnbindRequest.java
Modified: directory/apacheds/trunk/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientAddRequestTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientAddRequestTest.java?rev=784608&r1=784607&r2=784608&view=diff
==============================================================================
--- directory/apacheds/trunk/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientAddRequestTest.java (original)
+++ directory/apacheds/trunk/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientAddRequestTest.java Sun Jun 14 19:35:40 2009
@@ -32,10 +32,10 @@
import org.apache.directory.server.core.integ.annotations.CleanupLevel;
import org.apache.directory.server.integ.SiRunner;
import org.apache.directory.server.ldap.LdapServer;
-import org.apache.directory.shared.ldap.client.api.AddRequest;
import org.apache.directory.shared.ldap.client.api.LdapConnection;
import org.apache.directory.shared.ldap.client.api.exception.LdapException;
import org.apache.directory.shared.ldap.client.api.listeners.AddListener;
+import org.apache.directory.shared.ldap.client.api.messages.AddRequest;
import org.apache.directory.shared.ldap.client.api.messages.AddResponse;
import org.apache.directory.shared.ldap.constants.SchemaConstants;
import org.apache.directory.shared.ldap.entry.Entry;
Modified: directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/LdapConnection.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/LdapConnection.java?rev=784608&r1=784607&r2=784608&view=diff
==============================================================================
--- directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/LdapConnection.java (original)
+++ directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/LdapConnection.java Sun Jun 14 19:35:40 2009
@@ -53,6 +53,7 @@
import org.apache.directory.shared.ldap.client.api.listeners.OperationResponseListener;
import org.apache.directory.shared.ldap.client.api.listeners.SearchListener;
import org.apache.directory.shared.ldap.client.api.messages.AbandonRequest;
+import org.apache.directory.shared.ldap.client.api.messages.AddRequest;
import org.apache.directory.shared.ldap.client.api.messages.AddResponse;
import org.apache.directory.shared.ldap.client.api.messages.BindRequest;
import org.apache.directory.shared.ldap.client.api.messages.BindResponse;
@@ -66,14 +67,10 @@
import org.apache.directory.shared.ldap.client.api.messages.ModifyResponse;
import org.apache.directory.shared.ldap.client.api.messages.Referral;
import org.apache.directory.shared.ldap.client.api.messages.SearchRequest;
-import org.apache.directory.shared.ldap.client.api.messages.SearchRequestImpl;
import org.apache.directory.shared.ldap.client.api.messages.SearchResponse;
import org.apache.directory.shared.ldap.client.api.messages.SearchResultDone;
-import org.apache.directory.shared.ldap.client.api.messages.SearchResultDoneImpl;
import org.apache.directory.shared.ldap.client.api.messages.SearchResultEntry;
-import org.apache.directory.shared.ldap.client.api.messages.SearchResultEntryImpl;
import org.apache.directory.shared.ldap.client.api.messages.SearchResultReference;
-import org.apache.directory.shared.ldap.client.api.messages.SearchResultReferenceImpl;
import org.apache.directory.shared.ldap.client.api.messages.future.BindFuture;
import org.apache.directory.shared.ldap.client.api.protocol.LdapProtocolCodecFactory;
import org.apache.directory.shared.ldap.codec.ControlCodec;
@@ -413,7 +410,7 @@
*/
private SearchResultEntry convert( SearchResultEntryCodec searchEntryResultCodec )
{
- SearchResultEntry searchResultEntry = new SearchResultEntryImpl();
+ SearchResultEntry searchResultEntry = new SearchResultEntry();
searchResultEntry.setMessageId( searchEntryResultCodec.getMessageId() );
searchResultEntry.setEntry( searchEntryResultCodec.getEntry() );
@@ -427,7 +424,7 @@
*/
private SearchResultDone convert( SearchResultDoneCodec searchResultDoneCodec )
{
- SearchResultDone searchResultDone = new SearchResultDoneImpl();
+ SearchResultDone searchResultDone = new SearchResultDone();
searchResultDone.setMessageId( searchResultDoneCodec.getMessageId() );
searchResultDone.setLdapResult( convert( searchResultDoneCodec.getLdapResult() ) );
@@ -441,7 +438,7 @@
*/
private SearchResultReference convert( SearchResultReferenceCodec searchEntryReferenceCodec )
{
- SearchResultReference searchResultReference = new SearchResultReferenceImpl();
+ SearchResultReference searchResultReference = new SearchResultReference();
searchResultReference.setMessageId( searchEntryReferenceCodec.getMessageId() );
@@ -1100,7 +1097,7 @@
String... attributes ) throws LdapException
{
// Create a new SearchRequest object
- SearchRequest searchRequest = new SearchRequestImpl();
+ SearchRequest searchRequest = new SearchRequest();
searchRequest.setBaseDn( baseDn );
searchRequest.setFilter( filter );
@@ -2153,7 +2150,7 @@
{
cursor = search( "", "(objectClass=*)", SearchScope.OBJECT, "*", "+" );
cursor.next();
- SearchResultEntryImpl searchRes = ( SearchResultEntryImpl ) cursor.get();
+ SearchResultEntry searchRes = ( SearchResultEntry ) cursor.get();
rootDSE = searchRes.getEntry();
}
Copied: directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/AddRequest.java (from r784524, directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/AddRequest.java)
URL: http://svn.apache.org/viewvc/directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/AddRequest.java?p2=directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/AddRequest.java&p1=directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/AddRequest.java&r1=784524&r2=784608&rev=784608&view=diff
==============================================================================
--- directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/AddRequest.java (original)
+++ directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/AddRequest.java Sun Jun 14 19:35:40 2009
@@ -18,10 +18,9 @@
*
*/
-package org.apache.directory.shared.ldap.client.api;
+package org.apache.directory.shared.ldap.client.api.messages;
-import org.apache.directory.shared.ldap.client.api.messages.AbstractRequest;
import org.apache.directory.shared.ldap.entry.Entry;
@@ -31,7 +30,7 @@
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
* @version $Rev$, $Date$
*/
-public class AddRequest extends AbstractRequest
+public class AddRequest extends AbstractRequest implements RequestWithResponse, AbandonableRequest
{
/** the entry to be added */
private Entry entry;
Modified: directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/BindRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/BindRequest.java?rev=784608&r1=784607&r2=784608&view=diff
==============================================================================
--- directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/BindRequest.java (original)
+++ directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/BindRequest.java Sun Jun 14 19:35:40 2009
@@ -30,7 +30,7 @@
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
* @version $Rev$, $Date$
*/
-public class BindRequest extends AbstractRequest
+public class BindRequest extends AbstractRequest implements RequestWithResponse, AbandonableRequest
{
/**
* Distinguished name identifying the name of the authenticating subject -
Modified: directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/DeleteRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/DeleteRequest.java?rev=784608&r1=784607&r2=784608&view=diff
==============================================================================
--- directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/DeleteRequest.java (original)
+++ directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/DeleteRequest.java Sun Jun 14 19:35:40 2009
@@ -30,7 +30,7 @@
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
* @version $Rev$, $Date$
*/
-public class DeleteRequest extends AbstractRequest
+public class DeleteRequest extends AbstractRequest implements RequestWithResponse, AbandonableRequest
{
/** the DN to be deleted */
private LdapDN targetDn;
Modified: directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/ModifyDnRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/ModifyDnRequest.java?rev=784608&r1=784607&r2=784608&view=diff
==============================================================================
--- directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/ModifyDnRequest.java (original)
+++ directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/ModifyDnRequest.java Sun Jun 14 19:35:40 2009
@@ -31,7 +31,7 @@
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
* @version $Rev$, $Date$
*/
-public class ModifyDnRequest extends AbstractRequest
+public class ModifyDnRequest extends AbstractRequest implements RequestWithResponse, AbandonableRequest
{
/** the entry's DN to be changed */
private LdapDN entryDn;
Modified: directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/ModifyRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/ModifyRequest.java?rev=784608&r1=784607&r2=784608&view=diff
==============================================================================
--- directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/ModifyRequest.java (original)
+++ directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/ModifyRequest.java Sun Jun 14 19:35:40 2009
@@ -38,7 +38,7 @@
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
* @version $Rev$, $Date$
*/
-public class ModifyRequest extends AbstractRequest
+public class ModifyRequest extends AbstractRequest implements RequestWithResponse, AbandonableRequest
{
/** DN of the target Entry to be modified */
private LdapDN dn;
Modified: directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/SearchRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/SearchRequest.java?rev=784608&r1=784607&r2=784608&view=diff
==============================================================================
--- directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/SearchRequest.java (original)
+++ directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/SearchRequest.java Sun Jun 14 19:35:40 2009
@@ -20,6 +20,7 @@
package org.apache.directory.shared.ldap.client.api.messages;
+import java.util.HashSet;
import java.util.Set;
import org.apache.directory.shared.ldap.filter.SearchScope;
@@ -32,14 +33,85 @@
* @author <a href="mailto:dev@directory.apache.org"> Apache Directory Project</a>
* @version $Rev: 760724 $
*/
-public interface SearchRequest extends AbandonableRequest, RequestWithResponse
+public class SearchRequest extends AbstractRequest implements AbandonableRequest, RequestWithResponse
{
+ /** Search base distinguished name */
+ private String baseDn;
+
+ /** Search filter expression tree's root node */
+ private String filter;
+
+ /** Search scope enumeration value */
+ private SearchScope scope;
+
+ /** Types only return flag */
+ private boolean typesOnly;
+
+ /** Max size in entries to return */
+ private int sizeLimit;
+
+ /** Max seconds to wait for search to complete */
+ private int timeLimit;
+
+ /** Alias dereferencing mode enumeration value */
+ private AliasDerefMode aliasDerefMode;
+
+ /** Attributes to return */
+ private Set<String> attributes = new HashSet<String>();
+
+
+ /**
+ *
+ * Creates a new instance of SearchRequestImpl.
+ *
+ * @param messageId The message ID
+ */
+ public SearchRequest()
+ {
+ super();
+ }
+
+
+ // ------------------------------------------------------------------------
+ // SearchRequest Interface Method Implementations
+ // ------------------------------------------------------------------------
+ /**
+ * Gets a list of the attributes to be returned from each entry which
+ * matches the search filter. There are two special values which may be
+ * used: an empty list with no attributes, and the attribute description
+ * string "*". Both of these signify that all user attributes are to be
+ * returned. (The "*" allows the client to request all user attributes in
+ * addition to specific operational attributes). Attributes MUST be named at
+ * most once in the list, and are returned at most once in an entry. If
+ * there are attribute descriptions in the list which are not recognized,
+ * they are ignored by the server. If the client does not want any
+ * attributes returned, it can specify a list containing only the attribute
+ * with OID "1.1". This OID was chosen arbitrarily and does not correspond
+ * to any attribute in use. Client implementors should note that even if all
+ * user attributes are requested, some attributes of the entry may not be
+ * included in search results due to access control or other restrictions.
+ * Furthermore, servers will not return operational attributes, such as
+ * objectClasses or attributeTypes, unless they are listed by name, since
+ * there may be extremely large number of values for certain operational
+ * attributes.
+ *
+ * @return the attributes to return for this request
+ */
+ public Set<String> getAttributes()
+ {
+ return attributes;
+ }
+
+
/**
* Gets the search base as a distinguished name.
*
* @return the search base
*/
- String getBaseDn();
+ public String getBaseDn()
+ {
+ return baseDn;
+ }
/**
@@ -47,39 +119,77 @@
*
* @param baseDn the search base
*/
- void setBaseDn( String baseDn );
+ public void setBaseDn( String baseDn )
+ {
+ this.baseDn = baseDn;
+ }
/**
- * Gets the search scope parameter enumeration.
+ * Gets the alias handling parameter.
*
- * @return the scope enumeration parameter.
+ * @return the alias handling parameter enumeration.
*/
- SearchScope getScope();
+ public AliasDerefMode getDerefAliases()
+ {
+ return aliasDerefMode;
+ }
/**
- * Sets the search scope parameter enumeration.
+ * Sets the alias handling parameter.
*
- * @param scope the scope enumeration parameter.
+ * @param aliasDerefAliases the alias handling parameter enumeration.
*/
- void setScope( SearchScope scope );
+ public void setDerefAliases( AliasDerefMode aliasDerefAliases )
+ {
+ this.aliasDerefMode = aliasDerefAliases;
+ }
/**
- * Gets the alias handling parameter.
+ * Gets the search filter associated with this search request.
*
- * @return the alias handling parameter enumeration.
+ * @return the expression node for the root of the filter expression tree.
*/
- AliasDerefMode getDerefAliases();
+ public String getFilter()
+ {
+ return filter;
+ }
/**
- * Sets the alias handling parameter.
+ * Sets the search filter associated with this search request.
*
- * @param aliasDerefAliases the alias handling parameter enumeration.
+ * @param filter the expression node for the root of the filter
+ * expression tree.
*/
- void setDerefAliases( AliasDerefMode aliasDerefAliases );
+ public void setFilter( String filter )
+ {
+ this.filter = filter;
+ }
+
+
+ /**
+ * Gets the search scope parameter enumeration.
+ *
+ * @return the scope enumeration parameter.
+ */
+ public SearchScope getScope()
+ {
+ return scope;
+ }
+
+
+ /**
+ * Sets the search scope parameter enumeration.
+ *
+ * @param scope the scope enumeration parameter.
+ */
+ public void setScope( SearchScope scope )
+ {
+ this.scope = scope;
+ }
/**
@@ -90,7 +200,10 @@
*
* @return search size limit.
*/
- int getSizeLimit();
+ public int getSizeLimit()
+ {
+ return sizeLimit;
+ }
/**
@@ -101,7 +214,10 @@
*
* @param entriesMax maximum search result entries to return.
*/
- void setSizeLimit( int entriesMax );
+ public void setSizeLimit( int entriesMax )
+ {
+ sizeLimit = entriesMax;
+ }
/**
@@ -111,7 +227,10 @@
*
* @return the search time limit in seconds.
*/
- int getTimeLimit();
+ public int getTimeLimit()
+ {
+ return timeLimit;
+ }
/**
@@ -121,7 +240,10 @@
*
* @param secondsMax the search time limit in seconds.
*/
- void setTimeLimit( int secondsMax );
+ public void setTimeLimit( int secondsMax )
+ {
+ timeLimit = secondsMax;
+ }
/**
@@ -132,7 +254,10 @@
*
* @return true for only types, false for types and values.
*/
- boolean getTypesOnly();
+ public boolean getTypesOnly()
+ {
+ return typesOnly;
+ }
/**
@@ -144,49 +269,10 @@
* @param typesOnly
* true for only types, false for types and values.
*/
- void setTypesOnly( boolean typesOnly );
-
-
- /**
- * Gets the search filter associated with this search request.
- *
- * @return the expression node for the root of the filter expression tree.
- */
- String getFilter();
-
-
- /**
- * Sets the search filter associated with this search request.
- *
- * @param filter the expression node for the root of the filter
- * expression tree.
- */
- void setFilter( String filter );
-
-
- /**
- * Gets a list of the attributes to be returned from each entry which
- * matches the search filter. There are two special values which may be
- * used: an empty list with no attributes, and the attribute description
- * string "*". Both of these signify that all user attributes are to be
- * returned. (The "*" allows the client to request all user attributes in
- * addition to specific operational attributes). Attributes MUST be named at
- * most once in the list, and are returned at most once in an entry. If
- * there are attribute descriptions in the list which are not recognized,
- * they are ignored by the server. If the client does not want any
- * attributes returned, it can specify a list containing only the attribute
- * with OID "1.1". This OID was chosen arbitrarily and does not correspond
- * to any attribute in use. Client implementors should note that even if all
- * user attributes are requested, some attributes of the entry may not be
- * included in search results due to access control or other restrictions.
- * Furthermore, servers will not return operational attributes, such as
- * objectClasses or attributeTypes, unless they are listed by name, since
- * there may be extremely large number of values for certain operational
- * attributes.
- *
- * @return the attributes to return for this request
- */
- Set<String> getAttributes();
+ public void setTypesOnly( boolean typesOnly )
+ {
+ this.typesOnly = typesOnly;
+ }
/**
@@ -195,7 +281,25 @@
* @param attributes the attributes description or identifier.
* @return The object itself, to allow chaining
*/
- SearchRequest addAttributes( String... attribute );
+ public SearchRequest addAttributes( String... attributes )
+ {
+ if ( ( attributes == null ) || ( attributes.length == 0 ) )
+ {
+ return this;
+ }
+
+ if ( this.attributes == null )
+ {
+ this.attributes = new HashSet<String>( attributes.length );
+ }
+
+ for ( String attribute:attributes )
+ {
+ this.attributes.add( attribute );
+ }
+
+ return this;
+ }
/**
@@ -204,5 +308,23 @@
* @param attributes the attributes description or identifier.
* @return The object itself, to allow chaining
*/
- SearchRequest removeAttributes( String... attributes );
+ public SearchRequest removeAttributes( String... attributes )
+ {
+ if ( ( attributes == null ) || ( attributes.length == 0 ) )
+ {
+ return this;
+ }
+
+ if ( this.attributes == null )
+ {
+ this.attributes = new HashSet<String>( attributes.length );
+ }
+
+ for ( String attribute:attributes )
+ {
+ this.attributes.remove( attribute );
+ }
+
+ return this;
+ }
}
Modified: directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/SearchResultDone.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/SearchResultDone.java?rev=784608&r1=784607&r2=784608&view=diff
==============================================================================
--- directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/SearchResultDone.java (original)
+++ directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/SearchResultDone.java Sun Jun 14 19:35:40 2009
@@ -26,6 +26,13 @@
*
* @author <a href="mailto:dev@directory.apache.org"> Apache Directory Project</a>
*/
-public interface SearchResultDone extends SearchResponse, ResponseWithResult
+public class SearchResultDone extends AbstractResponseWithResult implements SearchResponse, ResponseWithResult
{
+ /**
+ * Creates a new instance of SearchResultDoneImpl.
+ */
+ public SearchResultDone()
+ {
+ super();
+ }
}
Modified: directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/SearchResultEntry.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/SearchResultEntry.java?rev=784608&r1=784607&r2=784608&view=diff
==============================================================================
--- directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/SearchResultEntry.java (original)
+++ directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/SearchResultEntry.java Sun Jun 14 19:35:40 2009
@@ -32,14 +32,36 @@
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
* @version $Revision: 760984 $
*/
-public interface SearchResultEntry extends SearchResponse
+public class SearchResultEntry extends AbstractMessage implements SearchResponse
{
+ /** The found entry */
+ private Entry entry;
+
+ /**
+ * Creates a new instance of SearchResultEntryImpl.
+ */
+ public SearchResultEntry()
+ {
+ super();
+ }
+
+
/**
* Gets the distinguished name of the entry object returned.
*
* @return the Dn of the entry returned.
*/
- LdapDN getObjectName();
+ public LdapDN getObjectName()
+ {
+ if ( entry != null )
+ {
+ return entry.getDn();
+ }
+ else
+ {
+ return LdapDN.EMPTY_LDAPDN;
+ }
+ }
/**
@@ -47,7 +69,10 @@
*
* @return the entry
*/
- Entry getEntry();
+ public Entry getEntry()
+ {
+ return entry;
+ }
/**
@@ -55,5 +80,8 @@
*
* @param entry the entry
*/
- void setEntry( Entry entry );
+ public void setEntry( Entry entry )
+ {
+ this.entry = entry;
+ }
}
Modified: directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/SearchResultReference.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/SearchResultReference.java?rev=784608&r1=784607&r2=784608&view=diff
==============================================================================
--- directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/SearchResultReference.java (original)
+++ directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/SearchResultReference.java Sun Jun 14 19:35:40 2009
@@ -30,14 +30,29 @@
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
* @version $Revision: 760984 $
*/
-public interface SearchResultReference extends SearchResponse
+public class SearchResultReference extends AbstractMessage implements SearchResponse
{
+ /** The list of LdapURL referrals */
+ private Referral referral;
+
+ /**
+ * Creates a new instance of SearchResultReferenceImpl.
+ */
+ public SearchResultReference()
+ {
+ super();
+ }
+
+
/**
* Gets the sequence of LdapUrls as a Referral instance.
*
* @return the sequence of LdapUrls
*/
- Referral getReferrals();
+ public Referral getReferrals()
+ {
+ return referral;
+ }
/**
@@ -45,7 +60,10 @@
*
* @param referrals the sequence of LdapUrls
*/
- void setReferral( Referral referral );
+ public void setReferral( Referral referral )
+ {
+ this.referral = referral;
+ }
/**
@@ -53,7 +71,15 @@
*
* @param urls the sequence of LdapUrls
*/
- void addReferrals( LdapURL... urls );
+ public void addReferrals( LdapURL... urls )
+ {
+ if ( referral == null )
+ {
+ referral = new Referral();
+ }
+
+ referral.addLdapUrls( urls );
+ }
/**
@@ -61,7 +87,15 @@
*
* @param urls the sequence of LdapUrls
*/
- void addReferrals( String... urls );
+ public void addReferrals( String... urls )
+ {
+ if ( referral == null )
+ {
+ referral = new Referral();
+ }
+
+ referral.addLdapUrls( urls );
+ }
/**
@@ -69,7 +103,15 @@
*
* @param urls the sequence of LdapUrls
*/
- void removeReferrals( LdapURL... urls );
+ public void removeReferrals( LdapURL... urls )
+ {
+ if ( referral == null )
+ {
+ referral = new Referral();
+ }
+
+ referral.removeLdapUrl( urls );
+ }
/**
@@ -77,5 +119,13 @@
*
* @param urls the sequence of LdapUrls
*/
- void removeReferrals( String... urls );
+ public void removeReferrals( String... urls )
+ {
+ if ( referral == null )
+ {
+ referral = new Referral();
+ }
+
+ referral.removeLdapUrl( urls );
+ }
}
Modified: directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/UnbindRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/UnbindRequest.java?rev=784608&r1=784607&r2=784608&view=diff
==============================================================================
--- directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/UnbindRequest.java (original)
+++ directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/messages/UnbindRequest.java Sun Jun 14 19:35:40 2009
@@ -25,7 +25,7 @@
*
* @author <a href="mailto:dev@directory.apache.org"> Apache Directory Project</a>
*/
-public class UnbindRequest extends AbstractRequest
+public class UnbindRequest extends AbstractRequest implements RequestWithResponse, AbandonableRequest
{
/**
*