directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r963765 - in /directory/studio/trunk/ldapservers/src/main/java/org/apache/directory/studio/ldapservers: LdapServersManager.java model/LdapServer.java wizards/NewServerWizard.java
Date Tue, 13 Jul 2010 15:43:08 GMT
Author: pamarcelot
Date: Tue Jul 13 15:43:08 2010
New Revision: 963765

URL: http://svn.apache.org/viewvc?rev=963765&view=rev
Log:
Fixed typo and created the server folder at the end of the wizard.

Modified:
    directory/studio/trunk/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/LdapServersManager.java
    directory/studio/trunk/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/model/LdapServer.java
    directory/studio/trunk/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/wizards/NewServerWizard.java

Modified: directory/studio/trunk/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/LdapServersManager.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/LdapServersManager.java?rev=963765&r1=963764&r2=963765&view=diff
==============================================================================
--- directory/studio/trunk/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/LdapServersManager.java
(original)
+++ directory/studio/trunk/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/LdapServersManager.java
Tue Jul 13 15:43:08 2010
@@ -47,6 +47,8 @@ import org.eclipse.core.runtime.IPath;
  */
 public class LdapServersManager
 {
+    private static final String SERVERS = "servers";
+
     /** The default instance */
     private static LdapServersManager instance;
 
@@ -418,4 +420,31 @@ public class LdapServersManager
     {
         return serversIdMap.get( id );
     }
+
+
+    /**
+     * Get the path to the servers folder.
+     *
+     * @return
+     *      the path to the server folder
+     */
+    public static IPath getServersFolder()
+    {
+        return LdapServersPlugin.getDefault().getStateLocation().append( SERVERS );
+    }
+
+
+    /**
+    * Creates a new server folder for the given id.
+    *
+    * @param id
+    *      the id of the server
+    */
+    public static void createNewServerFolder( LdapServer server )
+    {
+        // Creating the server folder
+        IPath serverFolderPath = getServersFolder().append( server.getId() );
+        File serverFolder = new File( serverFolderPath.toOSString() );
+        serverFolder.mkdir();
+    }
 }

Modified: directory/studio/trunk/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/model/LdapServer.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/model/LdapServer.java?rev=963765&r1=963764&r2=963765&view=diff
==============================================================================
--- directory/studio/trunk/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/model/LdapServer.java
(original)
+++ directory/studio/trunk/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/model/LdapServer.java
Tue Jul 13 15:43:08 2010
@@ -43,7 +43,7 @@ public class LdapServer implements IAdap
     /** The status of the server */
     private LdapServerStatus status = LdapServerStatus.STOPPED;
 
-    /** The LDAP Server Adapater Extension */
+    /** The LDAP Server Adapter Extension */
     private LdapServerAdapterExtension ldapServerAdapterExtension;
 
 

Modified: directory/studio/trunk/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/wizards/NewServerWizard.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/wizards/NewServerWizard.java?rev=963765&r1=963764&r2=963765&view=diff
==============================================================================
--- directory/studio/trunk/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/wizards/NewServerWizard.java
(original)
+++ directory/studio/trunk/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/wizards/NewServerWizard.java
Tue Jul 13 15:43:08 2010
@@ -62,8 +62,8 @@ public class NewServerWizard extends Wiz
         // Adding the new server to the servers handler
         LdapServersManager.getDefault().addServer( server );
 
-        // Creating the complete folder structure for the new server
-        //ApacheDsPluginUtils.createNewServerFolder( server.getId() ); // TODO
+        // Creating the folder for the new server
+        LdapServersManager.createNewServerFolder( server );
 
         return true;
     }



Mime
View raw message