directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erodrig...@apache.org
Subject svn commit: r547524 - in /directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns: io/decoder/ io/encoder/ messages/ store/ store/operations/ util/
Date Fri, 15 Jun 2007 04:42:28 GMT
Author: erodriguez
Date: Thu Jun 14 21:42:26 2007
New Revision: 547524

URL: http://svn.apache.org/viewvc?view=rev&rev=547524
Log:
Warnings clean-up, mostly Javadocs and generics.

Modified:
    directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/decoder/AddressRecordDecoder.java
    directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/decoder/DnsMessageDecoder.java
    directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/decoder/IPv6RecordDecoder.java
    directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/decoder/MailExchangeRecordDecoder.java
    directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/decoder/RecordDecoder.java
    directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/DnsMessageEncoder.java
    directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/QuestionRecordEncoder.java
    directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/RecordEncoder.java
    directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/messages/MessageType.java
    directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/messages/OpCode.java
    directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/messages/ProtocolType.java
    directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/messages/QuestionRecord.java
    directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/messages/RecordClass.java
    directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/messages/RecordType.java
    directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/messages/ResourceRecordModifier.java
    directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/messages/ResponseCode.java
    directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/messages/ServiceType.java
    directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/store/JndiRecordStoreImpl.java
    directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/store/MultiBaseSearch.java
    directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/store/SearchStrategy.java
    directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/store/SingleBaseSearch.java
    directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/store/operations/GetFlatRecord.java
    directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/store/operations/GetRecords.java
    directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/util/EnumConverter.java
    directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/util/ReverseEnumMap.java

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/decoder/AddressRecordDecoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/decoder/AddressRecordDecoder.java?view=diff&rev=547524&r1=547523&r2=547524
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/decoder/AddressRecordDecoder.java
(original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/decoder/AddressRecordDecoder.java
Thu Jun 14 21:42:26 2007
@@ -53,7 +53,7 @@
 {
     public Map decode( ByteBuffer byteBuffer, short length ) throws IOException
     {
-        Map attributes = new HashMap();
+        Map<String, Object> attributes = new HashMap<String, Object>();
         byte[] addressBytes = new byte[length];
         byteBuffer.get( addressBytes );
         attributes.put( DnsAttribute.IP_ADDRESS, InetAddress.getByAddress( addressBytes )
);

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/decoder/DnsMessageDecoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/decoder/DnsMessageDecoder.java?view=diff&rev=547524&r1=547523&r2=547524
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/decoder/DnsMessageDecoder.java
(original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/decoder/DnsMessageDecoder.java
Thu Jun 14 21:42:26 2007
@@ -64,7 +64,7 @@
 
     static
     {
-        Map map = new HashMap();
+        Map<RecordType, RecordDecoder> map = new HashMap<RecordType, RecordDecoder>();
 
         map.put( RecordType.A, new AddressRecordDecoder() );
         map.put( RecordType.NS, new NameServerRecordDecoder() );
@@ -75,6 +75,13 @@
     }
 
 
+    /**
+     * Decode the {@link ByteBuffer} into a {@link DnsMessage}.
+     *
+     * @param in
+     * @return The {@link DnsMessage}.
+     * @throws IOException
+     */
     public DnsMessage decode( ByteBuffer in ) throws IOException
     {
         DnsMessageModifier modifier = new DnsMessageModifier();

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/decoder/IPv6RecordDecoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/decoder/IPv6RecordDecoder.java?view=diff&rev=547524&r1=547523&r2=547524
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/decoder/IPv6RecordDecoder.java
(original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/decoder/IPv6RecordDecoder.java
Thu Jun 14 21:42:26 2007
@@ -48,7 +48,7 @@
 
     public Map decode( ByteBuffer byteBuffer, short length ) throws IOException
     {
-        Map attributes = new HashMap();
+        Map<String, Object> attributes = new HashMap<String, Object>();
         byte[] addressBytes = new byte[length];
         byteBuffer.get( addressBytes );
         attributes.put( DnsAttribute.IP_ADDRESS, InetAddress.getByAddress( addressBytes )
);

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/decoder/MailExchangeRecordDecoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/decoder/MailExchangeRecordDecoder.java?view=diff&rev=547524&r1=547523&r2=547524
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/decoder/MailExchangeRecordDecoder.java
(original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/decoder/MailExchangeRecordDecoder.java
Thu Jun 14 21:42:26 2007
@@ -60,7 +60,7 @@
 {
     public Map decode( ByteBuffer byteBuffer, short length ) throws IOException
     {
-        Map attributes = new HashMap();
+        Map<String, Object> attributes = new HashMap<String, Object>();
         attributes.put( DnsAttribute.MX_PREFERENCE, byteBuffer.getShort() );
         attributes.put( DnsAttribute.DOMAIN_NAME, DnsMessageDecoder.getDomainName( byteBuffer
) );
         return attributes;

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/decoder/RecordDecoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/decoder/RecordDecoder.java?view=diff&rev=547524&r1=547523&r2=547524
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/decoder/RecordDecoder.java
(original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/decoder/RecordDecoder.java
Thu Jun 14 21:42:26 2007
@@ -33,5 +33,14 @@
  */
 public interface RecordDecoder
 {
+    /**
+     * Decodes the given length of resource record data into attributes.  The
+     * type and number of attributes depends on the type of the resource record.
+     *
+     * @param byteBuffer
+     * @param length
+     * @return The map of attributes.
+     * @throws IOException
+     */
     public Map decode( ByteBuffer byteBuffer, short length ) throws IOException;
 }

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/DnsMessageEncoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/DnsMessageEncoder.java?view=diff&rev=547524&r1=547523&r2=547524
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/DnsMessageEncoder.java
(original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/DnsMessageEncoder.java
Thu Jun 14 21:42:26 2007
@@ -78,6 +78,12 @@
     }
 
 
+    /**
+     * Encodes the {@link DnsMessage} into the {@link ByteBuffer}.
+     *
+     * @param byteBuffer
+     * @param message
+     */
     public void encode( ByteBuffer byteBuffer, DnsMessage message )
     {
         byteBuffer.putShort( ( short ) message.getTransactionId() );

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/QuestionRecordEncoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/QuestionRecordEncoder.java?view=diff&rev=547524&r1=547523&r2=547524
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/QuestionRecordEncoder.java
(original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/QuestionRecordEncoder.java
Thu Jun 14 21:42:26 2007
@@ -33,6 +33,12 @@
  */
 public class QuestionRecordEncoder
 {
+    /**
+     * Encodes the {@link QuestionRecord} into the {@link ByteBuffer}.
+     *
+     * @param out
+     * @param question
+     */
     public void put( ByteBuffer out, QuestionRecord question )
     {
         encodeDomainName( out, question.getDomainName() );

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/RecordEncoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/RecordEncoder.java?view=diff&rev=547524&r1=547523&r2=547524
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/RecordEncoder.java
(original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/RecordEncoder.java
Thu Jun 14 21:42:26 2007
@@ -33,5 +33,12 @@
  */
 public interface RecordEncoder
 {
+    /**
+     * Encodes the {@link ResourceRecord} into the {@link ByteBuffer}.
+     *
+     * @param buffer
+     * @param record
+     * @throws IOException
+     */
     public void put( ByteBuffer buffer, ResourceRecord record ) throws IOException;
 }

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/messages/MessageType.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/messages/MessageType.java?view=diff&rev=547524&r1=547523&r2=547524
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/messages/MessageType.java
(original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/messages/MessageType.java
Thu Jun 14 21:42:26 2007
@@ -31,7 +31,11 @@
  */
 public enum MessageType implements EnumConverter<Byte>
 {
-    QUERY(0), RESPONSE(1);
+    /** A query message. */
+    QUERY(0),
+
+    /** A response message. */
+    RESPONSE(1);
 
     private static ReverseEnumMap<Byte, MessageType> map = new ReverseEnumMap<Byte,
MessageType>( MessageType.class );
 
@@ -50,6 +54,12 @@
     }
 
 
+    /**
+     * Converts an ordinal value into a {@link MessageType}.
+     *
+     * @param value
+     * @return The {@link MessageType}.
+     */
     public static MessageType convert( byte value )
     {
         return map.get( value );

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/messages/OpCode.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/messages/OpCode.java?view=diff&rev=547524&r1=547523&r2=547524
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/messages/OpCode.java
(original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/messages/OpCode.java
Thu Jun 14 21:42:26 2007
@@ -63,6 +63,12 @@
     }
 
 
+    /**
+     * Converts an ordinal value into an {@link OpCode}.
+     *
+     * @param value
+     * @return The {@link OpCode}.
+     */
     public static OpCode convert( byte value )
     {
         return map.get( value );

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/messages/ProtocolType.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/messages/ProtocolType.java?view=diff&rev=547524&r1=547523&r2=547524
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/messages/ProtocolType.java
(original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/messages/ProtocolType.java
Thu Jun 14 21:42:26 2007
@@ -177,6 +177,12 @@
     }
 
 
+    /**
+     * Converts an ordinal value into a {@link ProtocolType}.
+     *
+     * @param value
+     * @return The {@link ProtocolType}.
+     */
     public static ProtocolType convert( byte value )
     {
         return map.get( value );

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/messages/QuestionRecord.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/messages/QuestionRecord.java?view=diff&rev=547524&r1=547523&r2=547524
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/messages/QuestionRecord.java
(original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/messages/QuestionRecord.java
Thu Jun 14 21:42:26 2007
@@ -70,6 +70,13 @@
     private RecordClass recordClass;
 
 
+    /**
+     * Creates a new instance of QuestionRecord.
+     *
+     * @param domainName
+     * @param recordType
+     * @param recordClass
+     */
     public QuestionRecord( String domainName, RecordType recordType, RecordClass recordClass
)
     {
         this.domainName = domainName;
@@ -81,6 +88,8 @@
     /**
      * The domain name of this query.
      * For example, www.example.com.
+     * 
+     * @return The domain name.
      */
     public String getDomainName()
     {
@@ -91,6 +100,8 @@
     /**
      * The type of the query.
      * For example, the type is A for address records.
+     * 
+     * @return The {@link RecordType}.
      */
     public RecordType getRecordType()
     {
@@ -101,6 +112,8 @@
     /**
      * The class for this query.
      * For example, the class is IN for the Internet.
+     * 
+     * @return The {@link RecordClass}.
      */
     public RecordClass getRecordClass()
     {

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/messages/RecordClass.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/messages/RecordClass.java?view=diff&rev=547524&r1=547523&r2=547524
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/messages/RecordClass.java
(original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/messages/RecordClass.java
Thu Jun 14 21:42:26 2007
@@ -66,6 +66,12 @@
     }
 
 
+    /**
+     * Converts an ordinal value into a {@link RecordClass}.
+     *
+     * @param value
+     * @return The {@link RecordClass}.
+     */
     public static RecordClass convert( short value )
     {
         return map.get( value );

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/messages/RecordType.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/messages/RecordType.java?view=diff&rev=547524&r1=547523&r2=547524
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/messages/RecordType.java
(original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/messages/RecordType.java
Thu Jun 14 21:42:26 2007
@@ -207,12 +207,24 @@
     }
 
 
+    /**
+     * Converts an ordinal value into a {@link RecordType}.
+     *
+     * @param value
+     * @return The {@link RecordType}.
+     */
     public static RecordType convert( short value )
     {
         return map.get( value );
     }
 
 
+    /**
+     * Returns whether a given {@link RecordType} is a {@link ResourceRecord}.
+     *
+     * @param resourceType
+     * @return true of the {@link RecordType} is a {@link ResourceRecord}.
+     */
     public static boolean isResourceRecord( RecordType resourceType )
     {
         switch ( resourceType )

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/messages/ResourceRecordModifier.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/messages/ResourceRecordModifier.java?view=diff&rev=547524&r1=547523&r2=547524
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/messages/ResourceRecordModifier.java
(original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/messages/ResourceRecordModifier.java
Thu Jun 14 21:42:26 2007
@@ -23,11 +23,6 @@
 import java.util.HashMap;
 import java.util.Map;
 
-import org.apache.directory.server.dns.messages.RecordClass;
-import org.apache.directory.server.dns.messages.RecordType;
-import org.apache.directory.server.dns.messages.ResourceRecord;
-import org.apache.directory.server.dns.messages.ResourceRecordImpl;
-
 
 /**
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
@@ -43,6 +38,11 @@
     private Map<String, String> attributes = new HashMap<String, String>();
 
 
+    /**
+     * Returns the {@link ResourceRecord} built by this {@link ResourceRecordModifier}.
+     *
+     * @return The {@link ResourceRecord}.
+     */
     public ResourceRecord getEntry()
     {
         return new ResourceRecordImpl( dnsName, dnsType, dnsClass, dnsTtl, attributes );

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/messages/ResponseCode.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/messages/ResponseCode.java?view=diff&rev=547524&r1=547523&r2=547524
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/messages/ResponseCode.java
(original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/messages/ResponseCode.java
Thu Jun 14 21:42:26 2007
@@ -66,6 +66,12 @@
     }
 
 
+    /**
+     * Converts an ordinal value into a {@link ResponseCode}.
+     *
+     * @param value
+     * @return The {@link ResponseCode}.
+     */
     public static ResponseCode convert( byte value )
     {
         return map.get( value );

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/messages/ServiceType.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/messages/ServiceType.java?view=diff&rev=547524&r1=547523&r2=547524
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/messages/ServiceType.java
(original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/messages/ServiceType.java
Thu Jun 14 21:42:26 2007
@@ -288,6 +288,12 @@
     }
 
 
+    /**
+     * Converts an ordinal value into a {@link ServiceType}.
+     *
+     * @param value
+     * @return The {@link ServiceType}.
+     */
     public static ServiceType convert( byte value )
     {
         return map.get( value );

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/store/JndiRecordStoreImpl.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/store/JndiRecordStoreImpl.java?view=diff&rev=547524&r1=547523&r2=547524
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/store/JndiRecordStoreImpl.java
(original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/store/JndiRecordStoreImpl.java
Thu Jun 14 21:42:26 2007
@@ -26,6 +26,7 @@
 
 import org.apache.directory.server.dns.DnsConfiguration;
 import org.apache.directory.server.dns.messages.QuestionRecord;
+import org.apache.directory.server.dns.messages.ResourceRecord;
 
 
 /**
@@ -61,7 +62,7 @@
     }
 
 
-    public Set getRecords( QuestionRecord question ) throws Exception
+    public Set<ResourceRecord> getRecords( QuestionRecord question ) throws Exception
     {
         return strategy.getRecords( question );
     }

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/store/MultiBaseSearch.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/store/MultiBaseSearch.java?view=diff&rev=547524&r1=547523&r2=547524
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/store/MultiBaseSearch.java
(original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/store/MultiBaseSearch.java
Thu Jun 14 21:42:26 2007
@@ -32,6 +32,7 @@
 
 import org.apache.directory.server.dns.DnsConfiguration;
 import org.apache.directory.server.dns.messages.QuestionRecord;
+import org.apache.directory.server.dns.messages.ResourceRecord;
 import org.apache.directory.server.dns.store.operations.GetRecords;
 import org.apache.directory.server.protocol.shared.ServiceConfigurationException;
 import org.apache.directory.server.protocol.shared.catalog.Catalog;
@@ -81,7 +82,7 @@
     }
 
 
-    public Set getRecords( QuestionRecord question ) throws Exception
+    public Set<ResourceRecord> getRecords( QuestionRecord question ) throws Exception
     {
         env.put( Context.PROVIDER_URL, catalog.getBaseDn( question.getDomainName() ) );
 

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/store/SearchStrategy.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/store/SearchStrategy.java?view=diff&rev=547524&r1=547523&r2=547524
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/store/SearchStrategy.java
(original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/store/SearchStrategy.java
Thu Jun 14 21:42:26 2007
@@ -24,6 +24,7 @@
 import java.util.Set;
 
 import org.apache.directory.server.dns.messages.QuestionRecord;
+import org.apache.directory.server.dns.messages.ResourceRecord;
 
 
 /**
@@ -36,5 +37,12 @@
  */
 interface SearchStrategy
 {
-    Set getRecords( QuestionRecord question ) throws Exception;
+    /**
+     * Returns a set of {@link ResourceRecord}s, given a DNS {@link QuestionRecord}.
+     *
+     * @param question
+     * @return The set of {@link ResourceRecord}s.
+     * @throws Exception
+     */
+    Set<ResourceRecord> getRecords( QuestionRecord question ) throws Exception;
 }

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/store/SingleBaseSearch.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/store/SingleBaseSearch.java?view=diff&rev=547524&r1=547523&r2=547524
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/store/SingleBaseSearch.java
(original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/store/SingleBaseSearch.java
Thu Jun 14 21:42:26 2007
@@ -31,6 +31,7 @@
 
 import org.apache.directory.server.dns.DnsConfiguration;
 import org.apache.directory.server.dns.messages.QuestionRecord;
+import org.apache.directory.server.dns.messages.ResourceRecord;
 import org.apache.directory.server.dns.store.operations.GetRecords;
 import org.apache.directory.server.protocol.shared.ServiceConfigurationException;
 import org.apache.directory.server.protocol.shared.store.ContextOperation;
@@ -67,7 +68,7 @@
     }
 
 
-    public Set getRecords( QuestionRecord question ) throws Exception
+    public Set<ResourceRecord> getRecords( QuestionRecord question ) throws Exception
     {
         return ( Set ) execute( new GetRecords( question ) );
     }

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/store/operations/GetFlatRecord.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/store/operations/GetFlatRecord.java?view=diff&rev=547524&r1=547523&r2=547524
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/store/operations/GetFlatRecord.java
(original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/store/operations/GetFlatRecord.java
Thu Jun 14 21:42:26 2007
@@ -55,6 +55,8 @@
 
     /**
      * Creates the action to be used against the embedded JNDI provider.
+     * 
+     * @param question 
      */
     public GetFlatRecord( QuestionRecord question )
     {

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/store/operations/GetRecords.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/store/operations/GetRecords.java?view=diff&rev=547524&r1=547523&r2=547524
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/store/operations/GetRecords.java
(original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/store/operations/GetRecords.java
Thu Jun 14 21:42:26 2007
@@ -64,6 +64,8 @@
 
     /**
      * Creates the action to be used against the embedded JNDI provider.
+     * 
+     * @param question 
      */
     public GetRecords( QuestionRecord question )
     {
@@ -134,7 +136,7 @@
 
         NamingEnumeration list = ctx.search( transformDomainName( name ), filter, controls
);
 
-        Set set = new HashSet();
+        Set<ResourceRecord> set = new HashSet<ResourceRecord>();
 
         while ( list.hasMore() )
         {

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/util/EnumConverter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/util/EnumConverter.java?view=diff&rev=547524&r1=547523&r2=547524
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/util/EnumConverter.java
(original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/util/EnumConverter.java
Thu Jun 14 21:42:26 2007
@@ -33,10 +33,16 @@
  *   public static Enum convert (K value);
  * </code>
  * 
+ * @param <K> 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
 public interface EnumConverter<K>
 {
+    /**
+     * Convert the enum to another type.
+     *
+     * @return The other type.
+     */
     K convert();
 }

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/util/ReverseEnumMap.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/util/ReverseEnumMap.java?view=diff&rev=547524&r1=547523&r2=547524
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/util/ReverseEnumMap.java
(original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/util/ReverseEnumMap.java
Thu Jun 14 21:42:26 2007
@@ -30,6 +30,8 @@
  * <a href="http://www.javaspecialists.co.za/archive/newsletter.do?issue=113">
  * The JavaSpecialists newsletter</a>.
  * 
+ * @param <K> 
+ * @param <E> 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
@@ -38,6 +40,11 @@
     private Map<K, E> reverseMap = new HashMap<K, E>();
 
 
+    /**
+     * Creates a new instance of ReverseEnumMap.
+     *
+     * @param enumType
+     */
     public ReverseEnumMap( Class<E> enumType )
     {
         for ( E e : enumType.getEnumConstants() )
@@ -47,6 +54,12 @@
     }
 
 
+    /**
+     * Return the enum given an ordinal value.
+     *
+     * @param value
+     * @return The enum.
+     */
     public E get( K value )
     {
         E e = reverseMap.get( value );



Mime
View raw message