directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r661268 [2/2] - in /directory/studio/branches/apacheds-plugin-branch/apacheds: ./ src/main/java/org/apache/directory/studio/apacheds/ src/main/java/org/apache/directory/studio/apacheds/actions/ src/main/java/org/apache/directory/studio/apac...
Date Thu, 29 May 2008 09:20:52 GMT
Modified: directory/studio/branches/apacheds-plugin-branch/apacheds/src/main/java/org/apache/directory/studio/apacheds/views/ServersView.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/apacheds-plugin-branch/apacheds/src/main/java/org/apache/directory/studio/apacheds/views/ServersView.java?rev=661268&r1=661267&r2=661268&view=diff
==============================================================================
--- directory/studio/branches/apacheds-plugin-branch/apacheds/src/main/java/org/apache/directory/studio/apacheds/views/ServersView.java
(original)
+++ directory/studio/branches/apacheds-plugin-branch/apacheds/src/main/java/org/apache/directory/studio/apacheds/views/ServersView.java
Thu May 29 02:20:51 2008
@@ -22,13 +22,13 @@
 
 import org.apache.directory.studio.apacheds.ApacheDsPluginConstants;
 import org.apache.directory.studio.apacheds.actions.DeleteAction;
-import org.apache.directory.studio.apacheds.actions.NewServerInstanceAction;
+import org.apache.directory.studio.apacheds.actions.NewServerAction;
 import org.apache.directory.studio.apacheds.actions.OpenAction;
 import org.apache.directory.studio.apacheds.actions.PropertiesAction;
 import org.apache.directory.studio.apacheds.actions.RenameAction;
 import org.apache.directory.studio.apacheds.actions.RunAction;
 import org.apache.directory.studio.apacheds.actions.StopAction;
-import org.apache.directory.studio.apacheds.model.ServerInstance;
+import org.apache.directory.studio.apacheds.model.Server;
 import org.apache.directory.studio.apacheds.model.ServersHandler;
 import org.apache.directory.studio.apacheds.model.ServersHandlerListener;
 import org.eclipse.jface.action.IMenuListener;
@@ -92,7 +92,7 @@
     protected int[] columnWidths;
 
     // Actions
-    private NewServerInstanceAction newServer;
+    private NewServerAction newServer;
     private RunAction run;
     private StopAction stop;
     private PropertiesAction properties;
@@ -104,27 +104,27 @@
     private ServersHandlerListener serversHandlerListener = new ServersHandlerListener()
     {
         /* (non-Javadoc)
-         * @see org.apache.directory.studio.apacheds.model.ServersHandlerListener#serverInstanceAdded(org.apache.directory.studio.apacheds.model.ServerInstance)
+         * @see org.apache.directory.studio.apacheds.model.ServersHandlerListener#serverAdded(org.apache.directory.studio.apacheds.model.Server)
          */
-        public void serverInstanceAdded( ServerInstance serverInstance )
+        public void serverAdded( Server server )
         {
             tableViewer.refresh();
         }
 
 
         /* (non-Javadoc)
-         * @see org.apache.directory.studio.apacheds.model.ServersHandlerListener#serverInstanceRemoved(org.apache.directory.studio.apacheds.model.ServerInstance)
+         * @see org.apache.directory.studio.apacheds.model.ServersHandlerListener#serverRemoved(org.apache.directory.studio.apacheds.model.Server)
          */
-        public void serverInstanceRemoved( ServerInstance serverInstance )
+        public void serverRemoved( Server server )
         {
             tableViewer.refresh();
         }
 
 
         /* (non-Javadoc)
-         * @see org.apache.directory.studio.apacheds.model.ServersHandlerListener#serverInstanceUpdated(org.apache.directory.studio.apacheds.model.ServerInstance)
+         * @see org.apache.directory.studio.apacheds.model.ServersHandlerListener#serverUpdated(org.apache.directory.studio.apacheds.model.Server)
          */
-        public void serverInstanceUpdated( ServerInstance serverInstance )
+        public void serverUpdated( Server server )
         {
             tableViewer.refresh();
         }
@@ -249,7 +249,7 @@
      */
     private void initActions()
     {
-        newServer = new NewServerInstanceAction();
+        newServer = new NewServerAction();
 
         run = new RunAction( this );
         run.setEnabled( false );
@@ -450,9 +450,9 @@
 
         if ( !selection.isEmpty() )
         {
-            ServerInstance serverInstance = ( ServerInstance ) selection.getFirstElement();
+            Server server = ( Server ) selection.getFirstElement();
 
-            switch ( serverInstance.getState() )
+            switch ( server.getState() )
             {
                 case STARTED:
                     run.setEnabled( false );

Modified: directory/studio/branches/apacheds-plugin-branch/apacheds/src/main/java/org/apache/directory/studio/apacheds/views/ServersViewContentProvider.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/apacheds-plugin-branch/apacheds/src/main/java/org/apache/directory/studio/apacheds/views/ServersViewContentProvider.java?rev=661268&r1=661267&r2=661268&view=diff
==============================================================================
--- directory/studio/branches/apacheds-plugin-branch/apacheds/src/main/java/org/apache/directory/studio/apacheds/views/ServersViewContentProvider.java
(original)
+++ directory/studio/branches/apacheds-plugin-branch/apacheds/src/main/java/org/apache/directory/studio/apacheds/views/ServersViewContentProvider.java
Thu May 29 02:20:51 2008
@@ -40,7 +40,7 @@
     public Object[] getElements( Object inputElement )
     {
         ServersHandler serversHandler = ServersHandler.getDefault();
-        return serversHandler.getServerInstancesList().toArray();
+        return serversHandler.getServersList().toArray();
     }
 
 

Modified: directory/studio/branches/apacheds-plugin-branch/apacheds/src/main/java/org/apache/directory/studio/apacheds/views/ServersViewLabelProvider.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/apacheds-plugin-branch/apacheds/src/main/java/org/apache/directory/studio/apacheds/views/ServersViewLabelProvider.java?rev=661268&r1=661267&r2=661268&view=diff
==============================================================================
--- directory/studio/branches/apacheds-plugin-branch/apacheds/src/main/java/org/apache/directory/studio/apacheds/views/ServersViewLabelProvider.java
(original)
+++ directory/studio/branches/apacheds-plugin-branch/apacheds/src/main/java/org/apache/directory/studio/apacheds/views/ServersViewLabelProvider.java
Thu May 29 02:20:51 2008
@@ -22,7 +22,7 @@
 
 import org.apache.directory.studio.apacheds.ApacheDsPlugin;
 import org.apache.directory.studio.apacheds.ApacheDsPluginConstants;
-import org.apache.directory.studio.apacheds.model.ServerInstance;
+import org.apache.directory.studio.apacheds.model.Server;
 import org.apache.directory.studio.apacheds.model.ServerStateEnum;
 import org.eclipse.jface.viewers.ITableLabelProvider;
 import org.eclipse.jface.viewers.LabelProvider;
@@ -48,16 +48,16 @@
      */
     public String getColumnText( Object element, int columnIndex )
     {
-        if ( element instanceof ServerInstance )
+        if ( element instanceof Server )
         {
-            ServerInstance serverInstance = ( ServerInstance ) element;
+            Server server = ( Server ) element;
             if ( columnIndex == 0 )
             {
-                return serverInstance.getName();
+                return server.getName();
             }
             else if ( columnIndex == 1 )
             {
-                ServerStateEnum state = ( ( ServerInstance ) element ).getState();
+                ServerStateEnum state = ( ( Server ) element ).getState();
                 switch ( state )
                 {
                     case STARTED:
@@ -101,7 +101,7 @@
      */
     public Image getColumnImage( Object element, int columnIndex )
     {
-        if ( element instanceof ServerInstance )
+        if ( element instanceof Server )
         {
             if ( columnIndex == 0 )
             {
@@ -109,7 +109,7 @@
             }
             else if ( columnIndex == 1 )
             {
-                switch ( ( ( ServerInstance ) element ).getState() )
+                switch ( ( ( Server ) element ).getState() )
                 {
                     case STARTED:
                         return ApacheDsPlugin.getDefault().getImage( ApacheDsPluginConstants.IMG_SERVER_STARTED
);
@@ -151,6 +151,9 @@
     }
 
 
+    /**
+     * Increase the counter of the animation.
+     */
     public void animate()
     {
         count++;

Copied: directory/studio/branches/apacheds-plugin-branch/apacheds/src/main/java/org/apache/directory/studio/apacheds/wizards/NewServerWizard.java
(from r661232, directory/studio/branches/apacheds-plugin-branch/apacheds/src/main/java/org/apache/directory/studio/apacheds/wizards/NewServerInstanceWizard.java)
URL: http://svn.apache.org/viewvc/directory/studio/branches/apacheds-plugin-branch/apacheds/src/main/java/org/apache/directory/studio/apacheds/wizards/NewServerWizard.java?p2=directory/studio/branches/apacheds-plugin-branch/apacheds/src/main/java/org/apache/directory/studio/apacheds/wizards/NewServerWizard.java&p1=directory/studio/branches/apacheds-plugin-branch/apacheds/src/main/java/org/apache/directory/studio/apacheds/wizards/NewServerInstanceWizard.java&r1=661232&r2=661268&rev=661268&view=diff
==============================================================================
--- directory/studio/branches/apacheds-plugin-branch/apacheds/src/main/java/org/apache/directory/studio/apacheds/wizards/NewServerInstanceWizard.java
(original)
+++ directory/studio/branches/apacheds-plugin-branch/apacheds/src/main/java/org/apache/directory/studio/apacheds/wizards/NewServerWizard.java
Thu May 29 02:20:51 2008
@@ -21,7 +21,7 @@
 
 
 import org.apache.directory.studio.apacheds.ApacheDsPluginUtils;
-import org.apache.directory.studio.apacheds.model.ServerInstance;
+import org.apache.directory.studio.apacheds.model.Server;
 import org.apache.directory.studio.apacheds.model.ServersHandler;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.wizard.Wizard;
@@ -30,15 +30,15 @@
 
 
 /**
- * This class implements the new server instance wizard.
+ * This class implements the new server wizard.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class NewServerInstanceWizard extends Wizard implements INewWizard
+public class NewServerWizard extends Wizard implements INewWizard
 {
     /** The wizard page */
-    private NewServerInstanceWizardPage page;
+    private NewServerWizardPage page;
 
 
     /* (non-Javadoc)
@@ -46,7 +46,7 @@
      */
     public void addPages()
     {
-        page = new NewServerInstanceWizardPage();
+        page = new NewServerWizardPage();
         addPage( page );
     }
 
@@ -56,14 +56,14 @@
      */
     public boolean performFinish()
     {
-        // Creating the new server instance
-        ServerInstance serverInstance = new ServerInstance( page.getServerInstanceName()
);
+        // Creating the new server
+        Server server = new Server( page.getServerName() );
 
-        // Adding the new server instance to the servers handler
-        ServersHandler.getDefault().addServerInstance( serverInstance );
+        // Adding the new server to the servers handler
+        ServersHandler.getDefault().addServer( server );
 
-        // Creating the complete folder structure for the new server instance
-        ApacheDsPluginUtils.createNewInstanceFolder( serverInstance.getId() );
+        // Creating the complete folder structure for the new server
+        ApacheDsPluginUtils.createNewServerFolder( server.getId() );
 
         return true;
     }

Copied: directory/studio/branches/apacheds-plugin-branch/apacheds/src/main/java/org/apache/directory/studio/apacheds/wizards/NewServerWizardPage.java
(from r661232, directory/studio/branches/apacheds-plugin-branch/apacheds/src/main/java/org/apache/directory/studio/apacheds/wizards/NewServerInstanceWizardPage.java)
URL: http://svn.apache.org/viewvc/directory/studio/branches/apacheds-plugin-branch/apacheds/src/main/java/org/apache/directory/studio/apacheds/wizards/NewServerWizardPage.java?p2=directory/studio/branches/apacheds-plugin-branch/apacheds/src/main/java/org/apache/directory/studio/apacheds/wizards/NewServerWizardPage.java&p1=directory/studio/branches/apacheds-plugin-branch/apacheds/src/main/java/org/apache/directory/studio/apacheds/wizards/NewServerInstanceWizardPage.java&r1=661232&r2=661268&rev=661268&view=diff
==============================================================================
--- directory/studio/branches/apacheds-plugin-branch/apacheds/src/main/java/org/apache/directory/studio/apacheds/wizards/NewServerInstanceWizardPage.java
(original)
+++ directory/studio/branches/apacheds-plugin-branch/apacheds/src/main/java/org/apache/directory/studio/apacheds/wizards/NewServerWizardPage.java
Thu May 29 02:20:51 2008
@@ -35,12 +35,12 @@
 
 
 /**
- * This class implements the wizard page for the new server instance wizard.
+ * This class implements the wizard page for the new server wizard.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class NewServerInstanceWizardPage extends WizardPage
+public class NewServerWizardPage extends WizardPage
 {
     /** The servers handler */
     private ServersHandler serversHandler;
@@ -50,11 +50,11 @@
 
 
     /**
-     * Creates a new instance of NewServerInstanceWizardPage.
+     * Creates a new instance of NewServerWizardPage.
      */
-    public NewServerInstanceWizardPage()
+    public NewServerWizardPage()
     {
-        super( NewServerInstanceWizardPage.class.getCanonicalName() );
+        super( NewServerWizardPage.class.getCanonicalName() );
         setTitle( "Create a Server" );
         setDescription( "Please specify a name to create a new server." );
         setImageDescriptor( ApacheDsPlugin.getDefault().getImageDescriptor(
@@ -127,12 +127,12 @@
 
 
     /**
-     * Gets the name of the server instance.
+     * Gets the name of the server.
      *
      * @return
-     *      the name of the server instance
+     *      the name of the server
      */
-    public String getServerInstanceName()
+    public String getServerName()
     {
         return nameText.getText();
     }



Mime
View raw message