directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r494023 - /directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/
Date Mon, 08 Jan 2007 11:04:49 GMT
Author: pamarcelot
Date: Mon Jan  8 03:04:47 2007
New Revision: 494023

URL: http://svn.apache.org/viewvc?view=rev&rev=494023
Log:
Adding Javadoc to Browser Core classes (DIRSTUDIO-19).

Modified:
    directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/BookmarkManager.java
    directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/BrowserCoreConstants.java
    directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/BrowserCoreMessages.java
    directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/BrowserCorePlugin.java
    directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/BrowserCorePreferences.java
    directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/BrowserCorePreferencesInitializer.java
    directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/ConnectionManager.java
    directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/SearchManager.java

Modified: directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/BookmarkManager.java
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/BookmarkManager.java?view=diff&rev=494023&r1=494022&r2=494023
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/BookmarkManager.java
(original)
+++ directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/BookmarkManager.java
Mon Jan  8 03:04:47 2007
@@ -32,9 +32,14 @@
 import org.eclipse.osgi.util.NLS;
 
 
+/**
+ * This class is used to manage Bookmarks.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public class BookmarkManager implements Serializable
 {
-
     private static final long serialVersionUID = 7605293576518974531L;
 
     private List<IBookmark> bookmarkList;
@@ -42,6 +47,12 @@
     private IConnection connection;
 
 
+    /**
+     * Creates a new instance of BookmarkManager.
+     *
+     * @param connection
+     *      the attached Connection
+     */
     public BookmarkManager( IConnection connection )
     {
         this.connection = connection;
@@ -49,30 +60,49 @@
     }
 
 
+    /**
+     * Gets the Connection
+     *
+     * @return
+     *      the Connection
+     */
     public IConnection getConnection()
     {
         return connection;
     }
 
 
+    /**
+     * Adds a Bookmark
+     *
+     * @param bookmark
+     *      the Bookmark to add
+     */
     public void addBookmark( IBookmark bookmark )
     {
         addBookmark( bookmarkList.size(), bookmark );
     }
 
 
+    /**
+     * Adds a Bookmark at a specified position.
+     *
+     * @param index
+     *      the index at which the specified element is to be inserted.
+     * @param bookmark
+     *      the Bookmark to add
+     */
     public void addBookmark( int index, IBookmark bookmark )
     {
         if ( getBookmark( bookmark.getName() ) != null )
         {
             String newBookmarkName = NLS.bind( BrowserCoreMessages.copy_n_of_s, "", bookmark.getName()
); //$NON-NLS-1$
-            
+
             for ( int i = 2; this.getBookmark( newBookmarkName ) != null; i++ )
             {
-                newBookmarkName = NLS.bind( BrowserCoreMessages.copy_n_of_s,
-                    i + " ", bookmark.getName() ); //$NON-NLS-1$
+                newBookmarkName = NLS.bind( BrowserCoreMessages.copy_n_of_s, i + " ", bookmark.getName()
); //$NON-NLS-1$
             }
-            
+
             bookmark.setName( newBookmarkName );
         }
 
@@ -82,9 +112,17 @@
     }
 
 
+    /**
+     * Gets a Bookmark
+     *
+     * @param name
+     *      the name of the Bookmark
+     * @return
+     *      the corresponding Bookmark
+     */
     public IBookmark getBookmark( String name )
     {
-        for ( IBookmark bookmark:bookmarkList )
+        for ( IBookmark bookmark : bookmarkList )
         {
             if ( bookmark.getName().equals( name ) )
             {
@@ -96,12 +134,26 @@
     }
 
 
+    /**
+     * Returns the index in the Bookmarks list of the first occurrence of the specified Bookmark
+     *
+     * @param bookmark
+     *      the bookmark to search for
+     * @return
+     *      the index in the Bookmarks list of the first occurrence of the specified Bookmark
+     */
     public int indexOf( IBookmark bookmark )
     {
         return bookmarkList.indexOf( bookmark );
     }
 
 
+    /**
+     * Removes a Bookmark
+     *
+     * @param bookmark
+     *      the Bookmark to remove
+     */
     public void removeBookmark( IBookmark bookmark )
     {
         bookmarkList.remove( bookmark );
@@ -110,21 +162,38 @@
     }
 
 
+    /**
+     * Removes a Bookmark
+     *
+     * @param name
+     *      the name of the Bookmark to remove
+     */
     public void removeBookmark( String name )
     {
         this.removeBookmark( this.getBookmark( name ) );
     }
 
 
+    /**
+     * Gets an array containing all Bookmarks
+     *
+     * @return
+     *      an array containing all Bookmarks
+     */
     public IBookmark[] getBookmarks()
     {
         return bookmarkList.toArray( new IBookmark[0] );
     }
 
 
+    /**
+     * Gets the number of Bookmarks
+     *
+     * @return
+     *      the number of Bookmarjs
+     */
     public int getBookmarkCount()
     {
         return bookmarkList.size();
     }
-
 }

Modified: directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/BrowserCoreConstants.java
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/BrowserCoreConstants.java?view=diff&rev=494023&r1=494022&r2=494023
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/BrowserCoreConstants.java
(original)
+++ directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/BrowserCoreConstants.java
Mon Jan  8 03:04:47 2007
@@ -25,9 +25,14 @@
 import java.io.OutputStreamWriter;
 
 
+/**
+ * This class contains all the constants used by the Browser Core Plugin
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public interface BrowserCoreConstants
 {
-
     public static final String PREFERENCE_BINARY_SYNTAXES = "binarySyntaxes"; //$NON-NLS-1$
 
     public static final String PREFERENCE_BINARY_ATTRIBUTES = "binaryAttributes"; //$NON-NLS-1$
@@ -89,5 +94,4 @@
     public static final int SORT_ORDER_ASCENDING = 1;
 
     public static final int SORT_ORDER_DESCENDING = 2;
-
 }

Modified: directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/BrowserCoreMessages.java
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/BrowserCoreMessages.java?view=diff&rev=494023&r1=494022&r2=494023
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/BrowserCoreMessages.java
(original)
+++ directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/BrowserCoreMessages.java
Mon Jan  8 03:04:47 2007
@@ -24,12 +24,21 @@
 import org.eclipse.osgi.util.NLS;
 
 
+/**
+ * This class contains most of the Strings used by the Plugin
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public class BrowserCoreMessages extends NLS
 {
     private static final String BUNDLE_NAME = "org.apache.directory.ldapstudio.browser.core.browsercoremessages";
//$NON-NLS-1$
 
-
-    private BrowserCoreMessages()
+	
+	/**
+	 * Creates a new instance of BrowserCoreMessages.
+	 */
+	private BrowserCoreMessages()
     {
     }
 
@@ -410,6 +419,4 @@
     public static String model_filter_missing_closing_parenthesis;
 
     public static String model_filter_missing_filter_expression;
-
-    // BrowserCoreMessages.bind(BrowserCoreMessages.xxx, new String[]{});
 }

Modified: directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/BrowserCorePlugin.java
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/BrowserCorePlugin.java?view=diff&rev=494023&r1=494022&r2=494023
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/BrowserCorePlugin.java
(original)
+++ directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/BrowserCorePlugin.java
Mon Jan  8 03:04:47 2007
@@ -34,28 +34,30 @@
  */
 public class BrowserCorePlugin extends Plugin
 {
-
-    // The plugin ID
+    /** The plugin ID */
     public static final String PLUGIN_ID = "org.apache.directory.ldapstudio.browser.core";
//$NON-NLS-1$
 
-    // The shared instance.
+    /** The shared instance. */
     private static BrowserCorePlugin plugin;
 
-    // The connection manager
+    /** The connection manager */
     private ConnectionManager connectionManager;
 
-    // The credential provider
+    /** The credential provider */
     private IAuthHandler authHandler;
 
-    // The connection provider
+    /** The connection provider */
     private IReferralHandler referralHandler;
 
-    // The preferences
+    /** The preferences */
     private BrowserCorePreferences preferences;
 
     private EventPerformanceMeter eventPerformanceMeter;
 
 
+    /**
+     * Creates a new instance of BrowserCorePlugin.
+     */
     public BrowserCorePlugin()
     {
         super();
@@ -65,6 +67,9 @@
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void start( BundleContext context ) throws Exception
     {
         super.start( context );
@@ -78,6 +83,9 @@
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void stop( BundleContext context ) throws Exception
     {
         super.stop( context );
@@ -108,7 +116,10 @@
 
 
     /**
-     * @return The connection mamanger
+     * Gets the Connection Manager
+     * 
+     * @return 
+     *      the connection manager
      */
     public ConnectionManager getConnectionManager()
     {
@@ -126,27 +137,50 @@
     }
 
 
+    /**
+     * Gets the AuthHandler
+     *
+     * @return
+     *      the AuthHandler
+     */
     public IAuthHandler getAuthHandler()
     {
         return authHandler;
     }
 
 
+    /**
+     * Sets the AuthHandler
+     *
+     * @param authHandler
+     *      the authHandler to set
+     */
     public void setAuthHandler( IAuthHandler authHandler )
     {
         this.authHandler = authHandler;
     }
 
 
+    /**
+     * Gets the ReferralHanlder
+     * 
+     * @return
+     *      the ReferralHandler
+     */
     public IReferralHandler getReferralHandler()
     {
         return referralHandler;
     }
 
 
+    /**
+     * Sets the ReferralHandler
+     * 
+     * @param referralHandler
+     *      the ReferralHandler to set
+     */
     public void setReferralHandler( IReferralHandler referralHandler )
     {
         this.referralHandler = referralHandler;
     }
-
 }

Modified: directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/BrowserCorePreferences.java
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/BrowserCorePreferences.java?view=diff&rev=494023&r1=494022&r2=494023
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/BrowserCorePreferences.java
(original)
+++ directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/BrowserCorePreferences.java
Mon Jan  8 03:04:47 2007
@@ -30,12 +30,25 @@
 import org.eclipse.core.runtime.Preferences;
 
 
+/**
+ * This class is used to manage and access the preferences of the Browser Core Plugin
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public class BrowserCorePreferences
 {
-
     private Set binaryAttributeCache;
 
+    private Set binarySyntaxCache;
+
 
+    /**
+     * Gets the oids and names of the binary attributes
+     *
+     * @return
+     *      the oids and names of the binary attributes
+     */
     public Set getBinaryAttributeOidsAndNames()
     {
         if ( this.binaryAttributeCache == null )
@@ -62,6 +75,12 @@
     }
 
 
+    /**
+     * Gets an array containing the binary attributes
+     * 
+     * @return
+     *      an array containing the binary attributes
+     */
     public BinaryAttribute[] getBinaryAttributes()
     {
         BinaryAttribute[] binaryAttributes = ( BinaryAttribute[] ) load( BrowserCoreConstants.PREFERENCE_BINARY_ATTRIBUTES
);
@@ -69,6 +88,12 @@
     }
 
 
+    /**
+     * Sets the binary attributes
+     *
+     * @param binaryAttributes
+     *      the binary attributes to set
+     */
     public void setBinaryAttributes( BinaryAttribute[] binaryAttributes )
     {
         store( BrowserCoreConstants.PREFERENCE_BINARY_ATTRIBUTES, binaryAttributes );
@@ -76,6 +101,12 @@
     }
 
 
+    /**
+     * Gets the default binary attributes
+     *
+     * @return
+     *      the default binary attributes
+     */
     public BinaryAttribute[] getDefaultBinaryAttributes()
     {
         BinaryAttribute[] binaryAttributes = ( BinaryAttribute[] ) loadDefault( BrowserCoreConstants.PREFERENCE_BINARY_ATTRIBUTES
);
@@ -83,13 +114,17 @@
     }
 
 
+    /**
+     * Sets the default binary attributes
+     *
+     * @param defaultBinaryAttributes
+     *      the default binary attributes to set
+     */
     public void setDefaultBinaryAttributes( BinaryAttribute[] defaultBinaryAttributes )
     {
         storeDefault( BrowserCoreConstants.PREFERENCE_BINARY_ATTRIBUTES, defaultBinaryAttributes
);
     }
 
-    private Set binarySyntaxCache;
-
 
     public Set getBinarySyntaxOids()
     {
@@ -109,6 +144,12 @@
     }
 
 
+    /**
+     * Gets the binary syntaxes
+     *
+     * @return
+     *      the binary syntaxes
+     */
     public BinarySyntax[] getBinarySyntaxes()
     {
         BinarySyntax[] binarySyntaxes = ( BinarySyntax[] ) load( BrowserCoreConstants.PREFERENCE_BINARY_SYNTAXES
);
@@ -116,6 +157,12 @@
     }
 
 
+    /**
+     * Sets the binary syntaxes
+     *
+     * @param binarySyntaxes
+     *      the binary syntaxes to set
+     */
     public void setBinarySyntaxes( BinarySyntax[] binarySyntaxes )
     {
         store( BrowserCoreConstants.PREFERENCE_BINARY_SYNTAXES, binarySyntaxes );
@@ -123,6 +170,12 @@
     }
 
 
+    /**
+     * Gets the default binary syntaxes
+     *
+     * @return
+     *      the default binary syntaxes
+     */
     public BinarySyntax[] getDefaultBinarySyntaxes()
     {
         BinarySyntax[] binarySyntaxes = ( BinarySyntax[] ) loadDefault( BrowserCoreConstants.PREFERENCE_BINARY_SYNTAXES
);
@@ -130,12 +183,26 @@
     }
 
 
+    /**
+     * Sets the default binary syntaxes
+     *
+     * @param defaultBinarySyntaxes
+     *      the default binary syntaxes to set
+     */
     public void setDefaultBinarySyntaxes( BinarySyntax[] defaultBinarySyntaxes )
     {
         storeDefault( BrowserCoreConstants.PREFERENCE_BINARY_SYNTAXES, defaultBinarySyntaxes
);
     }
 
 
+    /**
+     * Loads the current value of the string-valued property with the given name.
+     *
+     * @param key
+     *      the name of the property
+     * @return
+     *      the corresponding object
+     */
     private static Object load( String key )
     {
         Preferences store = BrowserCorePlugin.getDefault().getPluginPreferences();
@@ -144,6 +211,14 @@
     }
 
 
+    /**
+     * Stores the current value of the string-valued property with the given name.
+     *
+     * @param key
+     *      the name of the property
+     * @param o
+     *      the new current value of the property
+     */
     private static void store( String key, Object o )
     {
         Preferences store = BrowserCorePlugin.getDefault().getPluginPreferences();
@@ -153,6 +228,14 @@
     }
 
 
+    /**
+     * Loads the default value for the string-valued property with the given name.
+     *
+     * @param key
+     *      the name of the property
+     * @return
+     *      the default value of the named property
+     */
     private static Object loadDefault( String key )
     {
         Preferences store = BrowserCorePlugin.getDefault().getPluginPreferences();
@@ -161,6 +244,14 @@
     }
 
 
+    /**
+     * Stores the default value for the string-valued property with the given name.
+     *
+     * @param key
+     *      the name of the property
+     * @param o
+     *      the new default value for the property
+     */
     private static void storeDefault( String key, Object o )
     {
         Preferences store = BrowserCorePlugin.getDefault().getPluginPreferences();
@@ -168,5 +259,4 @@
         store.setDefault( key, s );
         BrowserCorePlugin.getDefault().savePluginPreferences();
     }
-
 }

Modified: directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/BrowserCorePreferencesInitializer.java
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/BrowserCorePreferencesInitializer.java?view=diff&rev=494023&r1=494022&r2=494023
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/BrowserCorePreferencesInitializer.java
(original)
+++ directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/BrowserCorePreferencesInitializer.java
Mon Jan  8 03:04:47 2007
@@ -27,12 +27,19 @@
 import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
 
 
+/**
+ * This class is used to set default preference values.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public class BrowserCorePreferencesInitializer extends AbstractPreferenceInitializer
 {
-
+    /**
+     * {@inheritDoc}
+     */
     public void initializeDefaultPreferences()
     {
-
         Preferences store = BrowserCorePlugin.getDefault().getPluginPreferences();
 
         store.setDefault( BrowserCoreConstants.PREFERENCE_CHECK_FOR_CHILDREN, true );
@@ -113,7 +120,5 @@
             // //$NON-NLS-1$
             };
         BrowserCorePlugin.getDefault().getCorePreferences().setDefaultBinarySyntaxes( defaultBinarySyntaxes
);
-
     }
-
 }

Modified: directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/ConnectionManager.java
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/ConnectionManager.java?view=diff&rev=494023&r1=494022&r2=494023
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/ConnectionManager.java
(original)
+++ directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/ConnectionManager.java
Mon Jan  8 03:04:47 2007
@@ -58,12 +58,20 @@
 import org.eclipse.core.runtime.IPath;
 
 
+/**
+ * This class is used to manage Connections.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public class ConnectionManager implements ConnectionUpdateListener, SearchUpdateListener,
BookmarkUpdateListener
 {
-
     private List connectionList;
 
 
+    /**
+     * Creates a new instance of ConnectionManager.
+     */
     public ConnectionManager()
     {
         this.connectionList = new ArrayList();
@@ -74,6 +82,14 @@
     }
 
 
+    /**
+     * Gets the Schema Cache filename for the corresponding Connection name.
+     *
+     * @param connectionName
+     *      the connection name
+     * @return
+     *      the Schema Cache filename for the corresponding Connection name
+     */
     public static final String getSchemaCacheFileName( String connectionName )
     {
         return BrowserCorePlugin.getDefault().getStateLocation().append(
@@ -81,6 +97,14 @@
     }
 
 
+    /**
+     * Gets the Modification Log filename for the corresponding Connection name.
+     *
+     * @param connectionName
+     *      the connection name
+     * @return
+     *      the Modification Log filename
+     */
     public static final String getModificationLogFileName( String connectionName )
     {
         IPath p = BrowserCorePlugin.getDefault().getStateLocation().append( "logs" ); //$NON-NLS-1$
@@ -93,17 +117,32 @@
     }
 
 
+    /**
+     * Gets the filename of the Connection Store.
+     *
+     * @return
+     *      the filename of the Connection Store
+     */
     public static final String getConnectionStoreFileName()
     {
         return BrowserCorePlugin.getDefault().getStateLocation().append( "connections.xml"
).toOSString(); //$NON-NLS-1$
     }
 
 
+    /**
+     * Converts a String into a Saveable String.
+     *
+     * @param s
+     *      the String to convert
+     * @return
+     *      the converted String
+     */
     private static String toSaveString( String s )
     {
-
         if ( s == null )
+        {
             return null;
+        }
 
         byte[] b = LdifUtils.utf8encode( s );
         StringBuffer sb = new StringBuffer();
@@ -171,6 +210,14 @@
     }
 
 
+    /**
+     * Gets a connection from its name.
+     *
+     * @param name
+     *      the name of the Connection
+     * @return
+     *      the corresponding Connection
+     */
     public IConnection getConnection( String name )
     {
         for ( Iterator it = this.connectionList.iterator(); it.hasNext(); )
@@ -185,12 +232,26 @@
     }
 
 
+    /**
+     * Gets the index in the Connection list of the first occurrence of the specified Connection.
+     *
+     * @param connection
+     *      the Connection to search for
+     * @return
+     *      the index in the Connection list of the first occurrence of the specified Connection
+     */
     public int indexOf( IConnection connection )
     {
         return this.connectionList.indexOf( connection );
     }
 
 
+    /**
+     * Removes the given Connection from the Connection list.
+     *
+     * @param conn
+     *      the connection to remove
+     */
     public void removeConnection( IConnection conn )
     {
         this.connectionList.remove( conn );
@@ -199,18 +260,33 @@
     }
 
 
+    /**
+     * Gets an array containing all the Connections.
+     *
+     * @return
+     *      an array containing all the Connections
+     */
     public IConnection[] getConnections()
     {
         return ( IConnection[] ) this.connectionList.toArray( new IConnection[0] );
     }
 
 
+    /**
+     * Gets the number of Connections.
+     *
+     * @return
+     *      the number of Connections
+     */
     public int getConnectionCount()
     {
         return this.connectionList.size();
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void connectionUpdated( ConnectionUpdateEvent connectionUpdateEvent )
     {
         if ( connectionUpdateEvent.getDetail() == ConnectionUpdateEvent.CONNECTION_ADDED
@@ -249,6 +325,9 @@
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void searchUpdated( SearchUpdateEvent searchUpdateEvent )
     {
         if ( searchUpdateEvent.getDetail() == SearchUpdateEvent.SEARCH_ADDED
@@ -261,6 +340,9 @@
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void bookmarkUpdated( BookmarkUpdateEvent bookmarkUpdateEvent )
     {
         if ( bookmarkUpdateEvent.getDetail() == BookmarkUpdateEvent.BOOKMARK_ADDED
@@ -272,6 +354,9 @@
     }
 
 
+    /**
+     * Saves the Connections
+     */
     private void saveConnections()
     {
         Object[][] object = new Object[connectionList.size()][3];
@@ -308,6 +393,12 @@
     }
 
 
+    /**
+     * Saves the Schema of the Connection
+     *
+     * @param connection
+     *      the Connection
+     */
     private void saveSchema( IConnection connection )
     {
         try
@@ -326,6 +417,9 @@
     }
 
 
+    /**
+     * Loads the Connections
+     */
     private void loadConnections()
     {
         try
@@ -399,6 +493,14 @@
     }
 
 
+    /**
+     * Loads an Object from an XML file
+     *
+     * @param filename
+     *      the filename of the XML file
+     * @return
+     *      the deserialized Object
+     */
     private synchronized Object load( String filename )
     {
         try
@@ -421,6 +523,14 @@
     }
 
 
+    /**
+     * Saves an Object into a serialized XML file
+     *
+     * @param object
+     *      the object to save
+     * @param filename
+     *      the filename to save to
+     */
     private synchronized void save( Object object, String filename )
     {
         XMLEncoder encoder = null;
@@ -453,5 +563,4 @@
             }
         }
     }
-
 }

Modified: directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/SearchManager.java
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/SearchManager.java?view=diff&rev=494023&r1=494022&r2=494023
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/SearchManager.java
(original)
+++ directory/trunks/ldapstudio/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/SearchManager.java
Mon Jan  8 03:04:47 2007
@@ -32,6 +32,12 @@
 import org.eclipse.osgi.util.NLS;
 
 
+/**
+ * This class is used to manage Searches
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public class SearchManager implements Serializable
 {
 
@@ -42,11 +48,20 @@
     private IConnection connection;
 
 
+    /**
+     * Creates a new instance of SearchManager.
+     */
     protected SearchManager()
     {
     }
 
 
+    /**
+     * Creates a new instance of SearchManager.
+     *
+     * @param connection
+     *      the attached Connection
+     */
     public SearchManager( IConnection connection )
     {
         this.connection = connection;
@@ -54,18 +69,38 @@
     }
 
 
+    /**
+     * Gets the Connection.
+     *
+     * @return
+     *      the Connection
+     */
     public IConnection getConnection()
     {
         return this.connection;
     }
 
 
+    /**
+     * Adds a Search.
+     *
+     * @param search
+     *      the Search to add
+     */
     public void addSearch( ISearch search )
     {
         this.addSearch( this.searchList.size(), search );
     }
 
 
+    /**
+     * Adds a Search at a specified position.
+     *
+     * @param index
+     *      index at which the specified Search is to be inserted.
+     * @param search
+     *      the Search to be inserted
+     */
     public void addSearch( int index, ISearch search )
     {
         if ( getSearch( search.getName() ) != null )
@@ -85,6 +120,14 @@
     }
 
 
+    /**
+     * Gets a Search.
+     *
+     * @param name
+     *      the name of the Search
+     * @return
+     *      the corresponding Search
+     */
     public ISearch getSearch( String name )
     {
         for ( ISearch search:searchList )
@@ -99,12 +142,26 @@
     }
 
 
+    /**
+     * Returns the index in the Searches list of the first occurrence of the specified Search.
+     *
+     * @param search
+     *      the Search to search for
+     * @return
+     *      the index in the Searches list of the first occurrence of the specified Search
+     */
     public int indexOf( ISearch search )
     {
         return searchList.indexOf( search );
     }
 
 
+    /**
+     * Removes a Search
+     *
+     * @param search
+     *      the Search to remove
+     */
     public void removeSearch( ISearch search )
     {
         searchList.remove( search );
@@ -112,21 +169,38 @@
     }
 
 
+    /**
+     * Removes a Search
+     *
+     * @param name
+     *      the name of the Search to remove
+     */
     public void removeSearch( String name )
     {
         this.removeSearch( this.getSearch( name ) );
     }
 
 
+    /**
+     * Gets an array containing all the Searches
+     *
+     * @return
+     *      an array containing all the Searches
+     */
     public ISearch[] getSearches()
     {
         return searchList.toArray( new ISearch[0] );
     }
 
 
+    /**
+     * Gets the number of Searches
+     *
+     * @return
+     *      the number of Searches
+     */
     public int getSearchCount()
     {
         return searchList.size();
     }
-
 }



Mime
View raw message