directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r498307 - in /directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core: internal/model/ model/
Date Sun, 21 Jan 2007 13:15:58 GMT
Author: seelmann
Date: Sun Jan 21 05:15:57 2007
New Revision: 498307

URL: http://svn.apache.org/viewvc?view=rev&rev=498307
Log:
Added Javadocs, code cleaning.

Modified:
    directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/internal/model/Bookmark.java
    directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/internal/model/Credentials.java
    directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/internal/model/JNDIConnectionProvider.java
    directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/model/Control.java
    directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/model/IAuthHandler.java
    directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/model/IBookmark.java
    directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/model/ICredentials.java
    directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/model/IEntry.java
    directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/model/IReferralHandler.java
    directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/model/IRootDSE.java

Modified: directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/internal/model/Bookmark.java
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/internal/model/Bookmark.java?view=diff&rev=498307&r1=498306&r2=498307
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/internal/model/Bookmark.java
(original)
+++ directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/internal/model/Bookmark.java
Sun Jan 21 05:15:57 2007
@@ -32,23 +32,42 @@
 import org.eclipse.search.ui.ISearchPageScoreComputer;
 
 
+/**
+ * Default implementation if IBookmark.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public class Bookmark implements IBookmark
 {
 
+    /** The serialVersionUID. */
     private static final long serialVersionUID = 2914726541167255499L;
 
+    /** The connection. */
     private IConnection connection;
 
+    /** The bookmark parameter. */
     private BookmarkParameter bookmarkParameter;
 
+    /** The bookmark entry. */
     private DelegateEntry bookmarkEntry;
 
 
+    /**
+     * Creates a new instance of Bookmark.
+     */
     protected Bookmark()
     {
     }
 
 
+    /**
+     * Creates a new instance of Bookmark.
+     *
+     * @param connection the connection
+     * @param bookmarkParameter the bookmark parameter
+     */
     public Bookmark( IConnection connection, BookmarkParameter bookmarkParameter )
     {
         this.connection = connection;
@@ -57,6 +76,13 @@
     }
 
 
+    /**
+     * Creates a new instance of Bookmark.
+     *
+     * @param connection the connection
+     * @param dn the target DN
+     * @param name the symbolic name
+     */
     public Bookmark( IConnection connection, DN dn, String name )
     {
         this.connection = connection;
@@ -65,12 +91,18 @@
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public DN getDn()
     {
         return this.bookmarkParameter.getDn();
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void setDn( DN dn )
     {
         this.bookmarkParameter.setDn( dn );
@@ -78,12 +110,18 @@
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public String getName()
     {
         return this.bookmarkParameter.getName();
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void setName( String name )
     {
         this.bookmarkParameter.setName( name );
@@ -91,24 +129,29 @@
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public Object getAdapter( Class adapter )
     {
-        if ( adapter.isAssignableFrom( ISearchPageScoreComputer.class ) )
+        Class<?> clazz = ( Class<?> ) adapter;
+        if ( clazz.isAssignableFrom( ISearchPageScoreComputer.class ) )
         {
             return new LdapSearchPageScoreComputer();
         }
-        if ( adapter == IConnection.class )
+        if ( clazz.isAssignableFrom( IConnection.class ) )
         {
-            return this.connection;
+            return getConnection();
         }
-        if ( adapter == IEntry.class )
+        if ( clazz.isAssignableFrom( IEntry.class ) )
         {
-            return this.bookmarkEntry;
+            return getEntry();
         }
-        if ( adapter == IBookmark.class )
+        if ( clazz.isAssignableFrom( IBookmark.class ) )
         {
             return this;
         }
+
         return null;
     }
 
@@ -121,36 +164,45 @@
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public BookmarkParameter getBookmarkParameter()
     {
         return bookmarkParameter;
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void setBookmarkParameter( BookmarkParameter bookmarkParameter )
     {
         this.bookmarkParameter = bookmarkParameter;
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public IConnection getConnection()
     {
         return this.connection;
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public IEntry getEntry()
     {
         return this.bookmarkEntry;
     }
 
 
-    public IBookmark getBookmark()
-    {
-        return this;
-    }
-
-
+    /**
+     * {@inheritDoc}
+     */
     public String toString()
     {
         return this.getName();

Modified: directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/internal/model/Credentials.java
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/internal/model/Credentials.java?view=diff&rev=498307&r1=498306&r2=498307
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/internal/model/Credentials.java
(original)
+++ directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/internal/model/Credentials.java
Sun Jan 21 05:15:57 2007
@@ -25,36 +25,61 @@
 import org.apache.directory.ldapstudio.browser.core.model.ICredentials;
 
 
+/**
+ * Default implementation of ICredentials.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public class Credentials implements ICredentials
 {
 
-    private String bindDN;
+    /** The bind principal. */
+    private String bindPrincipal;
 
+    /** The bind password. */
     private String bindPassword;
 
+    /** The connection parameter. */
     private ConnectionParameter connectionParameter;
 
 
-    public Credentials( String bindDN, String bindPassword, ConnectionParameter connectionParameter
)
+    /**
+     * Creates a new instance of Credentials.
+     *
+     * @param bindPrincipal the bind principal, typically a DN
+     * @param bindPassword the bind password
+     * @param connectionParameter the connection parameter
+     */
+    public Credentials( String bindPrincipal, String bindPassword, ConnectionParameter connectionParameter
)
     {
-        this.bindDN = bindDN;
+        this.bindPrincipal = bindPrincipal;
         this.bindPassword = bindPassword;
         this.connectionParameter = connectionParameter;
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public ConnectionParameter getConnectionParameter()
     {
         return connectionParameter;
     }
 
 
-    public String getBindDN()
+    /**
+     * {@inheritDoc}
+     */
+    public String getBindPrincipal()
     {
-        return bindDN;
+        return bindPrincipal;
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public String getBindPassword()
     {
         return bindPassword;

Modified: directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/internal/model/JNDIConnectionProvider.java
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/internal/model/JNDIConnectionProvider.java?view=diff&rev=498307&r1=498306&r2=498307
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/internal/model/JNDIConnectionProvider.java
(original)
+++ directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/internal/model/JNDIConnectionProvider.java
Sun Jan 21 05:15:57 2007
@@ -103,9 +103,9 @@
         {
             if ( parameter.getAuthMethod() == IConnection.AUTH_SIMPLE )
             {
-                String bindDN = credentials.getBindDN();
+                String bindPrincipal = credentials.getBindPrincipal();
                 String bindPassword = credentials.getBindPassword();
-                this.context.bindSimple( bindDN, bindPassword, monitor );
+                this.context.bindSimple( bindPrincipal, bindPassword, monitor );
             }
             else if ( parameter.getAuthMethod() == IConnection.AUTH_ANONYMOUS )
             {

Modified: directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/model/Control.java
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/model/Control.java?view=diff&rev=498307&r1=498306&r2=498307
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/model/Control.java
(original)
+++ directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/model/Control.java
Sun Jan 21 05:15:57 2007
@@ -26,30 +26,60 @@
 import org.apache.directory.ldapstudio.browser.core.model.ldif.lines.LdifControlLine;
 
 
+/**
+ * The Control class represents a LDAP control as defined in RFC 4511
+ * <pre>
+ * Control ::= SEQUENCE {
+ *     controlType             LDAPOID,
+ *     criticality             BOOLEAN DEFAULT FALSE,
+ *     controlValue            OCTET STRING OPTIONAL }
+ * </pre>
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public class Control implements Serializable
 {
 
+    /** The serialVersionUID. */
     private static final long serialVersionUID = -1289018814649849178L;
 
+    /**
+     * The subentries control as defined in RFC 3672.
+     */
     public static final Control SUBENTRIES_CONTROL = new Control( "Subentries Control", "1.3.6.1.4.1.4203.1.10.1",
         false, new byte[]
             { 0x01, 0x01, ( byte ) 0xFF } );
 
+    /** The symbolic name. */
     private String name;
 
+    /** The oid. */
     private String oid;
 
+    /** The critical. */
     private boolean critical;
 
+    /** The control value. */
     private transient byte[] controlValue;
 
 
+    /**
+     * Creates a new instance of Control.
+     */
     public Control()
     {
-
     }
 
 
+    /**
+     * Creates a new instance of Control.
+     *
+     * @param name the symbolic name
+     * @param oid the oid
+     * @param critical the criticality
+     * @param controlValue the control value
+     */
     public Control( String name, String oid, boolean critical, byte[] controlValue )
     {
         super();
@@ -60,64 +90,53 @@
     }
 
 
-    // public static Control parseControl(String controlLdif) throws
-    // ParseException {
-    //		
-    // if("".equals(controlLdif)) {
-    // return NONE_CONTOL;
-    // }
-    //		
-    // try {
-    // String ldif =
-    // "dn: cn=dummy" +
-    // BrowserCoreConstants.LINE_SEPARATOR +
-    // "control: " +
-    // controlLdif +
-    // BrowserCoreConstants.LINE_SEPARATOR
-    // ;
-    //			
-    // LdifParser parser = new LdifParser();
-    // LdifFile model = parser.parse(ldif);
-    // LdifPart part = model.getLastContainer().getLastPart();
-    // LdifControlLine ldifControlLine = (LdifControlLine)part;
-    // if(!ldifControlLine.isValid()) {
-    // throw new Exception(ldifControlLine.getInvalidString());
-    // }
-    //			
-    // Control control = new Control("", ldifControlLine.getUnfoldedOid(),
-    // ldifControlLine.isCritical(),
-    // ldifControlLine.getControlValueAsBinary());
-    // return control;
-    // }
-    // catch (Exception e) {
-    // throw new ParseException(e.getMessage(), 0);
-    // }
-    // }
-
+    /**
+     * Gets the control value.
+     * 
+     * @return the control value
+     */
     public byte[] getControlValue()
     {
         return controlValue;
     }
 
 
+    /**
+     * Gets the oid.
+     * 
+     * @return the oid
+     */
     public String getOid()
     {
         return oid;
     }
 
 
+    /**
+     * Checks if is critical.
+     * 
+     * @return true, if is critical
+     */
     public boolean isCritical()
     {
         return critical;
     }
 
 
+    /**
+     * Gets the symbolic name.
+     * 
+     * @return the name
+     */
     public String getName()
     {
         return name;
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public String toString()
     {
 
@@ -138,30 +157,53 @@
     }
 
 
+    /**
+     * Sets the control value.
+     * 
+     * @param controlValue the control value
+     */
     public void setControlValue( byte[] controlValue )
     {
         this.controlValue = controlValue;
     }
 
 
+    /**
+     * Sets the critical.
+     * 
+     * @param critical the critical
+     */
     public void setCritical( boolean critical )
     {
         this.critical = critical;
     }
 
 
+    /**
+     * Sets the symbolic name.
+     * 
+     * @param name the name
+     */
     public void setName( String name )
     {
         this.name = name;
     }
 
 
+    /**
+     * Sets the oid.
+     * 
+     * @param oid the oid
+     */
     public void setOid( String oid )
     {
         this.oid = oid;
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public boolean equals( Object obj )
     {
         if ( obj == null || !( obj instanceof Control ) )

Modified: directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/model/IAuthHandler.java
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/model/IAuthHandler.java?view=diff&rev=498307&r1=498306&r2=498307
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/model/IAuthHandler.java
(original)
+++ directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/model/IAuthHandler.java
Sun Jan 21 05:15:57 2007
@@ -21,9 +21,24 @@
 package org.apache.directory.ldapstudio.browser.core.model;
 
 
+/**
+ * Callback interface to request credentials from a 
+ * higher-level layer (from the UI plugin).
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public interface IAuthHandler
 {
 
+    /**
+     * Gets credentials from this authentication handler. 
+     * The credentials are used to bind to the given connection. 
+     * The authentication handler may display a dialog to the user.
+     * 
+     * @param connectionParameter the connection to bind to
+     * @return the credentials
+     */
     public ICredentials getCredentials( ConnectionParameter connectionParameter );
 
 }

Modified: directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/model/IBookmark.java
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/model/IBookmark.java?view=diff&rev=498307&r1=498306&r2=498307
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/model/IBookmark.java
(original)
+++ directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/model/IBookmark.java
Sun Jan 21 05:15:57 2007
@@ -29,31 +29,78 @@
 import org.eclipse.core.runtime.IAdaptable;
 
 
+/**
+ * An IBookmark is used as shortcut to an entry in the DIT.
+ * The target entry is defined by a connection a DN.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public interface IBookmark extends Serializable, IAdaptable, BookmarkPropertyPageProvider,
EntryPropertyPageProvider,
     ConnectionPropertyPageProvider
 {
 
+    /**
+     * Gets the target DN.
+     * 
+     * @return the DN
+     */
     public DN getDn();
 
 
+    /**
+     * Sets the target DN.
+     * 
+     * @param dn the DN
+     */
     public void setDn( DN dn );
 
 
+    /**
+     * Gets the symbolic name.
+     * 
+     * @return the name
+     */
     public String getName();
 
 
+    /**
+     * Sets the symbolic name.
+     * 
+     * @param name the name
+     */
     public void setName( String name );
 
 
+    /**
+     * Gets the connection.
+     * 
+     * @return the connection
+     */
     public IConnection getConnection();
 
 
+    /**
+     * Gets the entry.
+     * 
+     * @return the entry
+     */
     public IEntry getEntry();
 
 
+    /**
+     * Gets the bookmark parameter.
+     * 
+     * @return the bookmark parameter
+     */
     public BookmarkParameter getBookmarkParameter();
 
 
+    /**
+     * Sets the bookmark parameter.
+     * 
+     * @param bookmarkParameter the bookmark parameter
+     */
     public void setBookmarkParameter( BookmarkParameter bookmarkParameter );
 
 }

Modified: directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/model/ICredentials.java
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/model/ICredentials.java?view=diff&rev=498307&r1=498306&r2=498307
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/model/ICredentials.java
(original)
+++ directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/model/ICredentials.java
Sun Jan 21 05:15:57 2007
@@ -21,15 +21,36 @@
 package org.apache.directory.ldapstudio.browser.core.model;
 
 
+/**
+ * An ICredential holds authentication information for a connection. 
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public interface ICredentials
 {
 
+    /**
+     * Gets the connection parameter.
+     * 
+     * @return the connection parameter
+     */
     public ConnectionParameter getConnectionParameter();
 
 
-    public String getBindDN();
+    /**
+     * Gets the bind principal, typically a DN.
+     * 
+     * @return the bind principal
+     */
+    public String getBindPrincipal();
 
 
+    /**
+     * Gets the bind password.
+     * 
+     * @return the bind password
+     */
     public String getBindPassword();
 
 }

Modified: directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/model/IEntry.java
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/model/IEntry.java?view=diff&rev=498307&r1=498306&r2=498307
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/model/IEntry.java
(original)
+++ directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/model/IEntry.java
Sun Jan 21 05:15:57 2007
@@ -30,6 +30,12 @@
 import org.eclipse.core.runtime.IAdaptable;
 
 
+/**
+ * An IEntry represents an LDAP entry.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public interface IEntry extends Serializable, IAdaptable, EntryPropertyPageProvider, ConnectionPropertyPageProvider
 {
 
@@ -86,7 +92,7 @@
 
 
     /**
-     * Checks if the entry with its attributes is consistent. The following
+     * Checks if this entry with its attributes is consistent. The following
      * conditions must be fulfilled:
      * 
      * <ul>
@@ -95,105 +101,172 @@
      * <li>There mustn't be any empty value</li>
      * </ul>
      * 
-     * @return true if the entry is consistent
+     * @return true if this entry is consistent
      */
     public abstract boolean isConsistent();
 
 
     /**
-     * Indicates wheater the entry was created from directory. Otherwise it
-     * was created from the user.
+     * TODO: still needed?
      * 
-     * @return true it the entry is a directory entry
+     * Indicates wheter this entry exists in directory. Otherwise it
+     * is a new entry created from the user and not still written to directory.
+     * 
+     * @return true it this entry is a directory entry
      */
     public abstract boolean isDirectoryEntry();
 
 
     /**
+     * TODO: still needed?
      * 
+     * Sets wheter this entry exists in directory.
      * 
      * @param isDirectoryEntry
-     *                true if the entry is created from directory.
+     *                true if this entry exists in directory.
      */
     public abstract void setDirectoryEntry( boolean isDirectoryEntry );
 
 
+    /**
+     * Indicates wheter this entry is an alias entry.
+     * 
+     * An entry is an alias entry if it has the object class 'alias'.
+     * 
+     * Even if the object class attribute is not initialized an entry
+     * is supposed to be an alias entry if the alias flag is set.
+     * 
+     * @return true, if this entry is an alias entry
+     */
     public abstract boolean isAlias();
 
 
+    /**
+     * Sets a flag wheter this entry is an alias entry.
+     * 
+     * This method is called during a search if the initialization
+     * of the alias flag is requested. 
+     * 
+     * @param b the alias flag
+     */
     public abstract void setAlias( boolean b );
 
 
+    /**
+     * Indicates wheter this entry is a referral entry.
+     * 
+     * An entry is a referral entry if it has the objectClass 'referral'.
+     * 
+     * Even if the object class attribute is not initialized an entry
+     * is supposed to be a referral entry if the referral flag is set.
+     * 
+     * @return true, if this entry is a referral entry
+     */
     public abstract boolean isReferral();
 
 
+    /**
+     * Sets a flag wheter this entry is a referral entry.
+     * 
+     * This method is called during a search if the initialization
+     * fo the referral hint is requested. 
+     * 
+     * @param b the referral flag
+     */
     public abstract void setReferral( boolean b );
 
 
+    /**
+     * Indicates wheter this entry is a subentry.
+     * 
+     * An entry is a subentry if it has the objectClass 'subentry'.
+     * 
+     * Even if the object class attribute is not initialized an entry
+     * is supposed to be a subentry if the subentry flag is set.
+     * 
+     * @return true, if this entry is a subentry entry
+     */
     public abstract boolean isSubentry();
 
 
+    /**
+     * Sets a flag wheter this entry is a subentry.
+     * 
+     * This method is called during a search if the initialization
+     * fo the subentry is requested. 
+     * 
+     * @param b the subentry flag
+     */
     public abstract void setSubentry( boolean b );
 
 
     /**
-     * Returns the DN of the entry, never null.
+     * Gets the DN of this entry, never null.
      * 
-     * @return the DN of the entry, never null.
+     * @return the DN of this entry, never null.
      */
     public abstract DN getDn();
 
 
     /**
-     * Returns the RDN of the entry, never null.
+     * Gets the RDN of this entry, never null.
      * 
-     * @return the RDN of the entry, never null.
+     * @return the RDN of this entry, never null.
      */
     public abstract RDN getRdn();
 
 
     /**
-     * Indicates wheater the attributes were initialized from directory.
+     * Indicates wheater this entry's attributes are initialized.
+     * 
+     * True means that the entry's attributes are completely initialized
+     * and getAttributes() will return all attributes.
      * 
-     * @return true if the attributes were initialized from directory.
+     * False means that the attributes are not or only partially
+     * initialized. The getAttributes() method will return null
+     * or only a part of the entry's attributes.  
+     * 
+     * @return true if this entry's attributes are initialized
      */
     public abstract boolean isAttributesInitialized();
 
 
     /**
-     * Sets if the attributes of this entry are initialized.
+     * Sets a flag wheter this entry's attributes are initialized.
      * 
-     * @param b
+     * @param b the attributes initialized flag
      */
     public abstract void setAttributesInitialized( boolean b, ModelModifier source );
 
 
     /**
-     * Returns the attributes of the entry.
+     * Gets the attributes of the entry.
      * 
-     * @return The attributes of the entry or null if the attributes arn't
-     *         initialized
+     * If isAttributesInitialized() returns false the returned attributes 
+     * may only be a subset of the attributes in directory.
+     * 
+     * @return The attributes of the entry or null if no attribute was added yet
      */
     public abstract IAttribute[] getAttributes();
 
 
     /**
-     * Returns the attribute of the entry.
+     * Gets the attribute of the entry.
      * 
-     * @param attributeDescription
+     * @param attributeDescription the attribute description
      * @return The attributes of the entry or null if the attribute doesn't
-     *         exist or if the attributes arn't initialized.
+     *         exist or if the attributes aren't initialized
      */
     public abstract IAttribute getAttribute( String attributeDescription );
 
 
     /**
-     * Returns a AttributeHierachie containing the requested attribute and
+     * Gets a AttributeHierachie containing the requested attribute and
      * all its subtypes.
      * 
-     * @param attributeDescription
+     * @param attributeDescription the attribute description
      * @return The attributes of the entry or null if the attribute doesn't
-     *         exist or if the attributes arn't initialized.
+     *         exist or if the attributes aren't initialized
      */
     public abstract AttributeHierarchy getAttributeWithSubtypes( String attributeDescription
);
 
@@ -202,23 +275,30 @@
      * Returns the subschema of the entry.
      * 
      * @return The subschema of the entry or null if the attributes aren't
-     *         initialized.
+     *         initialized
      */
     public abstract Subschema getSubschema();
 
 
     /**
-     * Indicates wheater the children were initialized from directory.
+     * Indicates wheater the entry's children are initialized.
+     * 
+     * True means that the entry's children are completely initialized
+     * and getChildren() will return all children.
      * 
-     * @return true if the children were initialized from directory.
+     * False means that the children are not or only partially
+     * initialized. The getChildren() method will return null
+     * or only a part of the entry's children.  
+     * 
+     * @return true if this entry's children are initialized
      */
     public abstract boolean isChildrenInitialized();
 
 
     /**
-     * Sets if the children of this entry are initialized from directory.
+     *  Sets a flag wheter this entry's children are initialized..
      * 
-     * @param b
+     * @param b the children initialized flag
      */
     public abstract void setChildrenInitialized( boolean b, ModelModifier source );
 
@@ -232,52 +312,53 @@
 
 
     /**
-     * Sets if the entry has children.
+     * Sets a hint wheter this entry has children.
      * 
-     * @param b
+     * @param b the has children hint
      */
     public abstract void setHasChildrenHint( boolean b, ModelModifier source );
 
 
     /**
-     * Returns the children of the entry.
+     * Gets the children of the entry.
      * 
-     * @return The children of the entry or null if the children arn't
-     *         initialized
+     * If isChildrenInitialized() returns false the returned children 
+     * may only be a subset of the children in directory.
+     * 
+     * @return The children of the entry or null if no child was added yet.
      */
     public abstract IEntry[] getChildren();
 
 
     /**
-     * Returns the number of children of the entry.
+     * Gets the number of children of the entry.
      * 
-     * @return The number of children of the entry or -1 if the children
-     *         arn't initialized
+     * @return The number of children of the entry or -1 if no child was added yet
      */
     public abstract int getChildrenCount();
 
 
     /**
      * Indicates wheather this entry has more children than
-     * getChildrenCount() returns. This occurs when the count or time limit
-     * of the LDAP connection exeeded while fetching children.
+     * getChildrenCount() returns. This occurs if the count or time limit
+     * was exceeded while fetching children.
      * 
-     * @return true if this entry has (maybe) more children than the given.
+     * @return true if this entry has (maybe) more children.
      */
     public abstract boolean hasMoreChildren();
 
 
     /**
-     * Sets if the entry has more children in the directory.
+     * Sets a flag wheter this entry more children.
      * 
-     * @param b
+     * @param b the has more children flag
      */
     public abstract void setHasMoreChildren( boolean b, ModelModifier source );
 
 
     /**
      * Indicates wheather this entry has a parent entry. Each entry except
-     * the root DSE and the base entry should have a parent entry.
+     * the root DSE and the base entries should have a parent entry.
      * 
      * @return true if the entry has a parent entry.
      */
@@ -285,27 +366,42 @@
 
 
     /**
-     * Return the parent entry.
+     * Gets the parent entry.
      * 
      * @return the parent entry or null if this entry hasn't a parent.
      */
     public abstract IEntry getParententry();
 
 
+    /**
+     * Gets the children filter or null if none is set
+     *
+     * @return the children filter or null if none is set
+     */
     public abstract String getChildrenFilter();
 
 
+    /**
+     * Sets the children filter. Null clears the filter.
+     * 
+     * @param filter the children filter
+     */
     public abstract void setChildrenFilter( String filter );
 
 
     /**
-     * Return the connection of this entry, never null.
+     * Gets the connection of this entry.
      * 
      * @return the connection of this entry, never null.
      */
     public abstract IConnection getConnection();
 
 
+    /**
+     * Gets the LDAP URL of this entry.
+     * 
+     * @return the  LDAP URL of this entry
+     */
     public abstract URL getUrl();
 
 }

Modified: directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/model/IReferralHandler.java
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/model/IReferralHandler.java?view=diff&rev=498307&r1=498306&r2=498307
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/model/IReferralHandler.java
(original)
+++ directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/model/IReferralHandler.java
Sun Jan 21 05:15:57 2007
@@ -21,9 +21,25 @@
 package org.apache.directory.ldapstudio.browser.core.model;
 
 
+/**
+ * Callback interface to request the target connection 
+ * of a referral from a higher-level layer (from the UI plugin).
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public interface IReferralHandler
 {
 
+    /**
+     * Gets the connection from this referral handler.
+     * The connection is used to continue a LDAP request.
+     * The referral handler may display a dialog to the user
+     * to select a proper connection.
+     * 
+     * @param referralURL the referral URL
+     * @return the target connection
+     */
     public IConnection getReferralConnection( URL referralURL );
 
 }

Modified: directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/model/IRootDSE.java
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/model/IRootDSE.java?view=diff&rev=498307&r1=498306&r2=498307
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/model/IRootDSE.java
(original)
+++ directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/model/IRootDSE.java
Sun Jan 21 05:15:57 2007
@@ -21,38 +21,70 @@
 package org.apache.directory.ldapstudio.browser.core.model;
 
 
+/**
+ * An IRootDSE represents a Root DSE of an LDAP server.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public interface IRootDSE extends IEntry
 {
 
+    /** The namingContexts attribute */
     public static final String ROOTDSE_ATTRIBUTE_NAMINGCONTEXTS = "namingContexts"; //$NON-NLS-1$
 
+    /** The subschemaSubentry attribute */
     public static final String ROOTDSE_ATTRIBUTE_SUBSCHEMASUBENTRY = "subschemaSubentry";
//$NON-NLS-1$
 
+    /** The monitorContext attribute */
     public static final String ROOTDSE_ATTRIBUTE_MONITORCONTEXT = "monitorContext"; //$NON-NLS-1$
 
+    /** The configContext attribute */
     public static final String ROOTDSE_ATTRIBUTE_CONFIGCONTEXT = "configContext"; //$NON-NLS-1$
 
+    /** The dsaName attribute */
     public static final String ROOTDSE_ATTRIBUTE_DSANAME = "dsaName"; //$NON-NLS-1$
 
+    /** The supportedExtension attribute */
     public static final String ROOTDSE_ATTRIBUTE_SUPPORTEDEXTENSION = "supportedExtension";
//$NON-NLS-1$
 
+    /** The supportedControl attribute */
     public static final String ROOTDSE_ATTRIBUTE_SUPPORTEDCONTROL = "supportedControl"; //$NON-NLS-1$
 
+    /** The supportedFeatures attribute */
     public static final String ROOTDSE_ATTRIBUTE_SUPPORTEDFEATURES = "supportedFeatures";
//$NON-NLS-1$
 
+    /** The supportedLDAPVersion attribute */
     public static final String ROOTDSE_ATTRIBUTE_SUPPORTEDLDAPVERSION = "supportedLDAPVersion";
//$NON-NLS-1$
 
+    /** The altServer attribute */
     public static final String ROOTDSE_ATTRIBUTE_ALTSERVER = "altServer"; //$NON-NLS-1$
 
+    /** The supportedSASLMechanisms attribute */
     public static final String ROOTDSE_ATTRIBUTE_SUPPORTEDSASLMECHANISM = "supportedSASLMechanisms";
//$NON-NLS-1$
 
 
+    /**
+     * Gets the supported extensions.
+     * 
+     * @return the supported extensions
+     */
     public String[] getSupportedExtensions();
 
 
+    /**
+     * Gets the supported controls.
+     * 
+     * @return the supported controls
+     */
     public String[] getSupportedControls();
 
 
+    /**
+     * Gets the supported features.
+     * 
+     * @return the supported features
+     */
     public String[] getSupportedFeatures();
 
 }



Mime
View raw message