]> SALOME platform Git repositories - tools/siman.git/blobdiff - Workspace/Siman/src/org/splat/simer/StartAction.java
Salome HOME
Siman codebase is refactored. Spring beans are introduced in the context.
[tools/siman.git] / Workspace / Siman / src / org / splat / simer / StartAction.java
index 89133a5575e2e0576e9ff4d0d63b0b4dfa788661..9d432b5f6c7af3ca69dd645b244bcbf4fea835be 100644 (file)
@@ -9,13 +9,16 @@ import org.hibernate.HibernateException;
 import org.hibernate.Session;
 import org.hibernate.Transaction;
 import org.splat.som.ApplicationRights;
-import org.splat.som.Database;
-import org.splat.som.ProjectSettings;
+import org.splat.dal.dao.som.Database;
+import org.splat.service.technical.ProjectSettingsService;
 
 
 public class StartAction extends Action implements ServletRequestAware {
 
     private HttpServletRequest  request = null;
+
+       private ProjectSettingsService _projectSettingsService;
+       private ApplicationSettings _ApplicationSettings;
     
        private static final long   serialVersionUID = 5875058140682652964L;
 
@@ -31,8 +34,8 @@ public class StartAction extends Action implements ServletRequestAware {
 
       logger.info( new StringBuffer("Initializing ").append(wappurl).append("...").toString() );
          try {
-               ProjectSettings     project = ProjectSettings.getMe();
-        ApplicationSettings wapp    = new ApplicationSettings(wappurl.toString(), this.getLocale());
+               ProjectSettingsService project = getProjectSettings();
+        ApplicationSettings wapp    = getApplicationSettings().init(wappurl.toString(), this.getLocale());
         String              root    = wapp.getApplicationRootPath();
 
 //      Database configuration
@@ -74,4 +77,36 @@ public class StartAction extends Action implements ServletRequestAware {
 //  ----------------------------------------------------------
       this.request = request;
        }
+    /**
+     * Get project settings.
+        * @return Project settings service
+        */
+       private ProjectSettingsService getProjectSettings() {
+               return _projectSettingsService;
+       }
+
+       /**
+        * Set project settings service.
+        * @param projectSettingsService project settings service
+        */
+       public void setProjectSettings(
+                       ProjectSettingsService projectSettingsService) {
+               _projectSettingsService = projectSettingsService;
+       }
+
+       /**
+        * Get the applicationSettings.
+        * @return the applicationSettings
+        */
+       public ApplicationSettings getApplicationSettings() {
+               return _ApplicationSettings;
+       }
+
+       /**
+        * Set the applicationSettings.
+        * @param applicationSettings the applicationSettings to set
+        */
+       public void setApplicationSettings(ApplicationSettings applicationSettings) {
+               _ApplicationSettings = applicationSettings;
+       }
 }
\ No newline at end of file