]> SALOME platform Git repositories - tools/siman.git/commitdiff
Salome HOME
ProjectSettings are now configured when the bean is created (without call to a struts...
authorrkv <rkv@opencascade.com>
Wed, 13 Mar 2013 06:31:25 +0000 (06:31 +0000)
committerrkv <rkv@opencascade.com>
Wed, 13 Mar 2013 06:31:25 +0000 (06:31 +0000)
19 files changed:
Workspace/Siman-Common/src/org/splat/dal/bo/som/Relations.hbm.xml
Workspace/Siman-Common/src/org/splat/service/ProjectElementServiceImpl.java
Workspace/Siman-Common/src/org/splat/service/technical/ProjectSettingsService.java
Workspace/Siman-Common/src/org/splat/service/technical/ProjectSettingsServiceImpl.java
Workspace/Siman-Common/src/org/splat/service/technical/StepsConfigService.java [new file with mode: 0644]
Workspace/Siman-Common/src/org/splat/service/technical/StepsConfigServiceImpl.java [new file with mode: 0644]
Workspace/Siman-Common/src/spring/businessServiceContext.xml
Workspace/Siman-Common/src/spring/technicalServiceContext.xml
Workspace/Siman-Common/src/test/siman.properties
Workspace/Siman-Common/src/test/splat/dao/TestStudyDAO.java
Workspace/Siman-Common/src/test/splat/service/TestProjectSettingsService.java
Workspace/Siman-Common/src/test/splat/service/TestPublicationService.java
Workspace/Siman-Common/src/test/splat/service/TestScenarioService.java
Workspace/Siman-Common/src/test/splat/service/TestSearchService.java
Workspace/Siman-Common/src/test/splat/service/TestStepService.java
Workspace/Siman-Common/src/test/splat/service/TestStudyService.java
Workspace/Siman/src/org/splat/simer/SearchStudyAction.java
Workspace/Siman/src/org/splat/simer/StartAction.java
Workspace/Siman/src/spring/applicationContext.xml

index 5dd0fb7dd2cc957d49342e239b913a06629aab50..9a42aa9f3ecf862b7d9dd95c73fe9515bf30b362 100644 (file)
 
 <hibernate-mapping>
 
-<!-- Uses relation
+<!-- Uses relation: Document to Document
   -->
     <union-subclass name="org.splat.dal.bo.som.UsesRelation" extends="org.splat.dal.bo.kernel.Relation" table="uses_rel">
                <many-to-one cascade="merge" name="refer" column="refer" access="field" not-null="true" />
     </union-subclass>
 
-<!-- UsedBy relation
+<!-- UsedBy relation: Document to Document
   -->
     <union-subclass name="org.splat.dal.bo.som.UsedByRelation" extends="org.splat.dal.bo.kernel.Relation" table="usedby_rel">
                <many-to-one cascade="merge" name="refer" column="refer" access="field" not-null="true" />
     </union-subclass>
 
-<!-- Versions relation
+<!-- Versions relation: Document to Document
   -->
     <union-subclass name="org.splat.dal.bo.som.VersionsRelation" extends="org.splat.dal.bo.kernel.Relation" table="versions_rel">
         <many-to-one cascade="merge" name="refer" column="refer" access="field" not-null="true" />
     </union-subclass>
 
-<!-- Converts relation
+<!-- Converts relation: Document to File
   -->
     <union-subclass name="org.splat.dal.bo.som.ConvertsRelation" extends="org.splat.dal.bo.kernel.Relation" table="converts_rel">
-        <many-to-one cascade="merge" name="refer" column="refer" access="field" not-null="true" />
+        <many-to-one cascade="all-delete-orphan" name="refer" unique="true" column="refer" access="field" not-null="true" />
     </union-subclass>
 
-<!-- Contributor actor relation
+<!-- Contributor actor relation: Study to User
   -->
     <union-subclass name="org.splat.dal.bo.som.ContributorRelation" extends="org.splat.dal.bo.kernel.Relation" table="contributor_rel">
         <many-to-one cascade="merge" name="refer" column="refer" access="field" not-null="true" />
     </union-subclass>
 
-<!-- ValidationCycle relation
+<!-- ValidationCycle relation: Study to ValidationCycle
   -->
     <union-subclass name="org.splat.dal.bo.som.ValidationCycleRelation" extends="org.splat.dal.bo.kernel.Relation" table="cycle_rel">
-<!--       <many-to-one name="refer" column="refer" unique="true" cascade="all-delete-orphan" access="field" not-null="true" />-->
-               <many-to-one cascade="merge" name="refer" column="refer" unique="true" access="field" not-null="true" />
+        <many-to-one name="refer" column="refer" unique="true" cascade="all-delete-orphan" access="field" not-null="true" />
+               <!-- <many-to-one cascade="merge" name="refer" column="refer" unique="true" access="field" not-null="true" />-->
     </union-subclass>
 
-<!-- Stamp relation
+<!-- Stamp relation: Document to Timestamp
   -->
     <union-subclass name="org.splat.dal.bo.som.StampRelation" extends="org.splat.dal.bo.kernel.Relation" table="stamp_rel">
-<!--      <many-to-one name="refer" column="refer" unique="true" cascade="all-delete-orphan" access="field" not-null="true" />-->
-               <many-to-one cascade="merge" name="refer" column="refer" unique="true" access="field" not-null="true" />
+        <many-to-one name="refer" column="refer" unique="true" cascade="all-delete-orphan" access="field" not-null="true" />
+               <!-- <many-to-one cascade="merge" name="refer" column="refer" unique="true" access="field" not-null="true" />-->
     </union-subclass>
 
 </hibernate-mapping>
\ No newline at end of file
index f5ec91e9abdbd1d0891ef60e416a38f512abde61..fda1d9d75db5d34258e965ec86253e621b7a5bd8 100644 (file)
@@ -16,6 +16,7 @@ import org.splat.dal.bo.som.ProjectElement;
 import org.splat.dal.bo.som.Publication;
 import org.splat.dal.dao.som.ProjectElementDAO;
 import org.splat.service.technical.ProjectSettingsService;
+import org.splat.service.technical.StepsConfigService;
 import org.splat.som.Step;
 import org.springframework.transaction.annotation.Transactional;
 
@@ -30,7 +31,7 @@ public class ProjectElementServiceImpl implements ProjectElementService {
        /**
         * Injected project settings service.
         */
-       private ProjectSettingsService _projectSettings;
+       private StepsConfigService _stepsConfigService;
        /**
         * Injected project element DAO.
         */
@@ -57,7 +58,7 @@ public class ProjectElementServiceImpl implements ProjectElementService {
         */
        public Step[] getSteps(final ProjectElement elem) {
                if (elem.getFolders() == null) {
-                       List<ProjectSettingsService.Step> steps = getProjectSettings()
+                       List<ProjectSettingsService.Step> steps = getStepsConfigService()
                                        .getStepsOf(elem.getClass());
                        Iterator<ProjectSettingsService.Step> nstep = steps.iterator();
 
@@ -91,22 +92,22 @@ public class ProjectElementServiceImpl implements ProjectElementService {
        }
 
        /**
-        * Get project settings.
+        * Get steps config.
         * 
-        * @return Project settings service
+        * @return steps config service
         */
-       private ProjectSettingsService getProjectSettings() {
-               return _projectSettings;
+       private StepsConfigService getStepsConfigService() {
+               return _stepsConfigService;
        }
 
        /**
-        * Set project settings service.
+        * Set steps config service.
         * 
-        * @param projectSettingsService
-        *            project settings service
+        * @param stepsConfigService
+        *            steps config service
         */
-       public void setProjectSettings(final ProjectSettingsService projectSettingsService) {
-               _projectSettings = projectSettingsService;
+       public void setStepsConfigService(final StepsConfigService stepsConfigService) {
+               _stepsConfigService = stepsConfigService;
        }
 
        /**
index 16a446c1579e72bebfc7fe26f5623e65df8bd9c4..da1f48a7e1d0bb3f481b50a3ad722c424060adce 100644 (file)
@@ -245,16 +245,6 @@ public interface ProjectSettingsService {
         */
        void configure(String filename) throws IOException, SQLException;
 
-       /**
-        * Get steps of the given project element (study or scenario).
-        * 
-        * @param level
-        *            the project element (study or scenario)
-        * @return the list of steps
-        */
-       List<ProjectSettingsService.Step> getStepsOf(
-                       Class<? extends ProjectElement> level);
-
        /**
         * Check if a file of the given format should be imported during check-in of a document of the given type.
         * 
index 88a779e22122e348703cf7650dd2e55a16fa29d8..f079a5afd2c5a16ebbccebaf452e1163e50dc286 100644 (file)
@@ -37,6 +37,9 @@ import org.splat.manox.XDOM;
 import org.splat.service.DocumentTypeService;
 import org.splat.service.KnowledgeElementTypeService;
 import org.splat.service.SimulationContextTypeService;
+import org.springframework.context.ResourceLoaderAware;
+import org.springframework.core.io.Resource;
+import org.springframework.core.io.ResourceLoader;
 import org.springframework.transaction.annotation.Transactional;
 import org.w3c.dom.Element;
 import org.w3c.dom.NamedNodeMap;
@@ -46,7 +49,8 @@ import org.w3c.dom.NodeList;
 /**
  * SIMAN workflow configuration data service.
  */
-public class ProjectSettingsServiceImpl implements ProjectSettingsService {
+public class ProjectSettingsServiceImpl implements ProjectSettingsService,
+               ResourceLoaderAware {
 
        /**
         * The logger for the service.
@@ -59,6 +63,20 @@ public class ProjectSettingsServiceImpl implements ProjectSettingsService {
         */
        private final static String TYPE_ATTR = "type";
 
+       /**
+        * Steps configuration storage.
+        */
+       private StepsConfigService _stepsConfigService;
+       /**
+        * Resource loader injected by Spring.
+        */
+       private ResourceLoader _resourceLoader;
+
+       /**
+        * Configuration resource injected by Spring.
+        */
+       private Resource _config;
+
        // Non persistent configuration information
        /**
         * Repository settings.
@@ -76,10 +94,6 @@ public class ProjectSettingsServiceImpl implements ProjectSettingsService {
         * Pattern of the presentation of version numbers.
         */
        private transient String _versioning;
-       /**
-        * Ordered list of (transient) study steps.
-        */
-       private transient final List<ProjectSettingsService.Step> _steps = new ArrayList<ProjectSettingsService.Step>();
        /**
         * Configuration document validation cycles.
         */
@@ -217,7 +231,24 @@ public class ProjectSettingsServiceImpl implements ProjectSettingsService {
        // ==============================================================================================================================
 
        /**
-        * Load workflow configuration from the given file. <br/> Create necessary default staff in the database if it is not initialized yet.
+        * Load workflow configuration from the file defined by config property. <BR>
+        * Create necessary default staff in the database if it is not initialized yet.
+        * 
+        * @throws IOException
+        *             if there is a file reading or index creation problem
+        * @throws SQLException
+        *             if there is a database population problem
+        */
+       @Transactional
+       public void configure() throws IOException, SQLException {
+               if (getConfig() != null) {
+                       configure("file:" + getConfig().getFile().getAbsolutePath());
+               }
+       }
+
+       /**
+        * Load workflow configuration from the given file. <BR>
+        * Create necessary default staff in the database if it is not initialized yet.
         * 
         * @param filename
         *            the workflow configuration file
@@ -229,12 +260,17 @@ public class ProjectSettingsServiceImpl implements ProjectSettingsService {
        @Transactional
        public void configure(final String filename) throws IOException,
                        SQLException {
-               if (!_steps.isEmpty()) {
+               if (!getStepsConfigService().getSteps().isEmpty()) {
                        return; // Project already configured
                }
 
                Database base = getDatabase().getCheckedDB();
-               File config = new File(filename);
+               if (LOG.isInfoEnabled()) {
+                       LOG.info("Loading configuration from: "
+                                       + getResource(filename).getFile().getAbsolutePath());
+                       LOG.info("Root: " + getResource("/").getURI());
+               }
+               File config = getResource(filename).getFile();
                if (config.exists()) {
                        loadCustomization(config);
                } else {
@@ -255,7 +291,7 @@ public class ProjectSettingsServiceImpl implements ProjectSettingsService {
         * @return the list of steps from project settings
         */
        public List<ProjectSettingsService.Step> getAllSteps() {
-               return _steps;
+               return getStepsConfigService().getSteps();
        }
 
        /**
@@ -305,8 +341,9 @@ public class ProjectSettingsServiceImpl implements ProjectSettingsService {
         */
        public ProjectSettingsService.Step getStep(final int number) {
                ProjectSettingsService.Step res = null;
-               for (int i = 0; i < _steps.size(); i++) {
-                       ProjectSettingsService.Step step = _steps.get(i);
+               for (int i = 0; i < getStepsConfigService().getSteps().size(); i++) {
+                       ProjectSettingsService.Step step = getStepsConfigService()
+                                       .getSteps().get(i);
                        if (step.getNumber() == number) {
                                res = step;
                                break;
@@ -315,26 +352,6 @@ public class ProjectSettingsServiceImpl implements ProjectSettingsService {
                return res;
        }
 
-       /**
-        * Get steps of the given project element (study or scenario).
-        * 
-        * @param level
-        *            the project element (study or scenario)
-        * @return the list of steps
-        */
-       public List<ProjectSettingsService.Step> getStepsOf(
-                       final Class<? extends ProjectElement> level) {
-               List<ProjectSettingsService.Step> result = new ArrayList<ProjectSettingsService.Step>();
-
-               for (int i = 0; i < _steps.size(); i++) {
-                       ProjectSettingsService.Step step = _steps.get(i);
-                       if (step.appliesTo(level)) {
-                               result.add(step);
-                       }
-               }
-               return result;
-       }
-
        /**
         * Check if a file of the given format should be imported during check-out of a document of the given type.
         * 
@@ -679,7 +696,7 @@ public class ProjectSettingsServiceImpl implements ProjectSettingsService {
                                step.setModule(module.getAttribute("name"));
                        }
 
-                       _steps.add(step);
+                       getStepsConfigService().getSteps().add(step);
                        res += 1;
                }
                return res;
@@ -764,7 +781,8 @@ public class ProjectSettingsServiceImpl implements ProjectSettingsService {
                String uses = null;
                for (Iterator<NamedNodeMap> i = _flows.iterator(); i.hasNext(); snum++) {
                        NamedNodeMap flow = i.next();
-                       ProjectSettingsService.Step step = _steps.get(snum);
+                       ProjectSettingsService.Step step = getStepsConfigService()
+                                       .getSteps().get(snum);
                        String[] contents = flow.getNamedItem("contents").getNodeValue()
                                        .split(",");
                        for (int j = 0; j < contents.length; j++) {
@@ -804,7 +822,7 @@ public class ProjectSettingsServiceImpl implements ProjectSettingsService {
                                                // Parse uses attribute
                                                String[] usesArr = uses.split(",");
                                                List<DocumentType> usesTypesList = new ArrayList<DocumentType>();
-                                               for (String usesType: usesArr) {
+                                               for (String usesType : usesArr) {
                                                        tdoc = maptype.get(usesType.trim());
                                                        if (tdoc == null) {
                                                                LOG.warn("Undefined \"" + usesType.trim()
@@ -815,7 +833,8 @@ public class ProjectSettingsServiceImpl implements ProjectSettingsService {
                                                                }
                                                        }
                                                }
-                                               tprop.setUses(usesTypesList.toArray(new DocumentType[]{}));
+                                               tprop.setUses(usesTypesList
+                                                               .toArray(new DocumentType[] {}));
                                        }
                                        if (step != null) {
                                                tprop.setResult(step);
@@ -876,7 +895,8 @@ public class ProjectSettingsServiceImpl implements ProjectSettingsService {
                                String[] clist = clatr.getNamedItem("context").getNodeValue()
                                                .split(",");
                                for (int j = 0; j < clist.length; j++) {
-                                       mapstep.put(clist[j], _steps.get(snum));
+                                       mapstep.put(clist[j], getStepsConfigService().getSteps()
+                                                       .get(snum));
                                }
                        }
                }
@@ -978,4 +998,64 @@ public class ProjectSettingsServiceImpl implements ProjectSettingsService {
                        final DocumentTypeService documentTypeService) {
                _documentTypeService = documentTypeService;
        }
+
+       /**
+        * {@inheritDoc}
+        * 
+        * @see org.springframework.context.ResourceLoaderAware#setResourceLoader(org.springframework.core.io.ResourceLoader)
+        */
+       @Override
+       public void setResourceLoader(final ResourceLoader resourceLoader) {
+               this._resourceLoader = resourceLoader;
+       }
+
+       /**
+        * Get resource by means of Spring resource loader.
+        * 
+        * @param location
+        *            the resource location
+        * @return the resource
+        */
+       public Resource getResource(final String location) {
+               return _resourceLoader.getResource(location);
+       }
+
+       /**
+        * Get the config.
+        * 
+        * @return the config
+        */
+       public Resource getConfig() {
+               return _config;
+       }
+
+       /**
+        * Set the config.
+        * 
+        * @param config
+        *            the config to set
+        */
+       public void setConfig(final Resource config) {
+               _config = config;
+       }
+
+       /**
+        * Get the stepsConfigService.
+        * 
+        * @return the stepsConfigService
+        */
+       public StepsConfigService getStepsConfigService() {
+               return _stepsConfigService;
+       }
+
+       /**
+        * Set the stepsConfigService.
+        * 
+        * @param stepsConfigService
+        *            the stepsConfigService to set
+        */
+       public void setStepsConfigService(
+                       final StepsConfigService stepsConfigService) {
+               _stepsConfigService = stepsConfigService;
+       }
 }
\ No newline at end of file
diff --git a/Workspace/Siman-Common/src/org/splat/service/technical/StepsConfigService.java b/Workspace/Siman-Common/src/org/splat/service/technical/StepsConfigService.java
new file mode 100644 (file)
index 0000000..b688c5e
--- /dev/null
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * Company         OPEN CASCADE
+ * Application     SIMAN
+ * File            $Id$ 
+ * Creation date   12.03.2013
+ * @author         $Author$
+ * @version        $Revision$
+ * @copyright      OPEN CASCADE 2012
+ *****************************************************************************/
+
+package org.splat.service.technical; 
+
+import java.util.List;
+
+import org.splat.dal.bo.som.ProjectElement;
+
+/**
+ * Study steps configuration service.
+ *
+ * @author <a href="mailto:roman.kozlov@opencascade.com">Roman Kozlov (RKV)</a>
+ */
+public interface StepsConfigService {
+
+       /**
+        * Get steps of the given project element (study or scenario).
+        * 
+        * @param level
+        *            the project element (study or scenario)
+        * @return the list of steps
+        */
+       List<ProjectSettingsService.Step> getStepsOf(
+                       Class<? extends ProjectElement> level);
+
+       /**
+        * Get the steps.
+        * 
+        * @return the steps
+        */
+       public List<ProjectSettingsService.Step> getSteps();
+
+}
diff --git a/Workspace/Siman-Common/src/org/splat/service/technical/StepsConfigServiceImpl.java b/Workspace/Siman-Common/src/org/splat/service/technical/StepsConfigServiceImpl.java
new file mode 100644 (file)
index 0000000..0776d94
--- /dev/null
@@ -0,0 +1,59 @@
+/*****************************************************************************
+ * Company         OPEN CASCADE
+ * Application     SIMAN
+ * File            $Id$ 
+ * Creation date   12.03.2013
+ * @author         $Author$
+ * @version        $Revision$
+ * @copyright      OPEN CASCADE 2012
+ *****************************************************************************/
+
+package org.splat.service.technical;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.splat.dal.bo.som.ProjectElement;
+
+/**
+ * Study steps configuration service.
+ * 
+ * @author <a href="mailto:roman.kozlov@opencascade.com">Roman Kozlov (RKV)</a>
+ */
+public class StepsConfigServiceImpl implements StepsConfigService {
+
+       /**
+        * Ordered list of (transient) study steps.
+        */
+       private transient final List<ProjectSettingsService.Step> _steps = new ArrayList<ProjectSettingsService.Step>();
+
+       /**
+        * Get steps of the given project element (study or scenario).
+        * 
+        * @param level
+        *            the project element (study or scenario)
+        * @return the list of steps
+        */
+       public List<ProjectSettingsService.Step> getStepsOf(
+                       final Class<? extends ProjectElement> level) {
+               List<ProjectSettingsService.Step> result = new ArrayList<ProjectSettingsService.Step>();
+
+               for (int i = 0; i < _steps.size(); i++) {
+                       ProjectSettingsService.Step step = _steps.get(i);
+                       if (step.appliesTo(level)) {
+                               result.add(step);
+                       }
+               }
+               return result;
+       }
+
+       /**
+        * Get the steps.
+        * 
+        * @return the steps
+        */
+       public List<ProjectSettingsService.Step> getSteps() {
+               return _steps;
+       }
+
+}
index bb1b461260218fa8c47f65aa6a15203506c4a54f..a08ebfae6737d530ac02b9dbf02513fac1bba519 100644 (file)
@@ -23,7 +23,7 @@ http://www.springframework.org/schema/tx/spring-tx-3.0.xsd">
        </bean>
        <bean id="projectElementService"
                class="org.splat.service.ProjectElementServiceImpl">
-               <property name="projectSettings" ref="projectSettings" />
+               <property name="stepsConfigService" ref="stepsConfigService" />
                <property name="projectElementDAO" ref="projectElementDAO" />
        </bean>
 
index 25da86b8b89f14e80d35144c0b5fdd94dedcf790..6def9c89c809f601e0e3c0ab2e60960fe3d24b73 100644 (file)
@@ -14,8 +14,14 @@ http://www.springframework.org/schema/tx/spring-tx-3.0.xsd">
        <bean id="repositoryService"
                class="org.splat.service.technical.RepositoryServiceImpl" />
 
+    <bean id="stepsConfigService"
+        class="org.splat.service.technical.StepsConfigServiceImpl"/>
+        
        <bean id="projectSettings"
-               class="org.splat.service.technical.ProjectSettingsServiceImpl">
+               class="org.splat.service.technical.ProjectSettingsServiceImpl"
+               init-method="configure">
+               <property name="config" value="${wapp.configuration}" />
+        <property name="stepsConfigService" ref="stepsConfigService" />
                <property name="database" ref="database" />
                <property name="simulationContextTypeService"
                        ref="simulationContextTypeService" />
index 057b3b56b85ce4613463f489025cb70e5d757584..535882fe8b11dcea395a0cade0f71a367a7eaec6 100644 (file)
@@ -2,7 +2,7 @@ schema.version     = D-0.3
 
 wapp.version       = D-0.5
 wapp.login         = conf/login.conf
-wapp.configuration = som.xml
+wapp.configuration = classpath:test/som.xml
 wapp.customization = conf/my.xml
 wapp.website       = http://www.salome-platform.org
 wapp.onlinehelp    = http://docs.salome-platform.org/salome_6_3_1/gui/GUI_index.html
index 60c48d0b1b6ec9e94ff10ed608b2735364da6fe1..9f887af755c44911150beb193645204fbd599727 100644 (file)
@@ -540,8 +540,7 @@ public class TestStudyDAO extends BaseTest {
                _projectSettings.getAllSteps().clear(); // Clear config to be able to load it again
                // Load workflow customization
                try {
-                       _projectSettings.configure(ClassLoader.getSystemResource(
-                                       "test/som.xml").getPath());
+                       _projectSettings.configure("classpath:test/som.xml");
                } catch (FileNotFoundException e) {
                        Assert.fail("Can't find som.xml: ", e);
                }
index 78d376b3564c0c1a395e2e05315fa28db8a39782..5d9e769c0a65881e7e6cc27d71fa7782976a644e 100644 (file)
@@ -22,6 +22,7 @@ import org.splat.service.DocumentTypeService;
 import org.splat.service.KnowledgeElementTypeService;
 import org.splat.service.SimulationContextService;
 import org.splat.service.technical.ProjectSettingsService;
+import org.splat.service.technical.StepsConfigService;
 import org.splat.service.technical.ProjectSettingsService.Step;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Qualifier;
@@ -52,6 +53,13 @@ public class TestProjectSettingsService extends BaseTest {
        @Qualifier("projectSettings")
        private transient ProjectSettingsService _projectSettings;
 
+       /**
+        * The StepsConfigService. Later injected by Spring.
+        */
+       @Autowired
+       @Qualifier("stepsConfigService")
+       private transient StepsConfigService _stepsConfigService;
+
        /**
         * The DocumentTypeService. Later injected by Spring.
         */
@@ -113,12 +121,11 @@ public class TestProjectSettingsService extends BaseTest {
                 */
                _projectSettings.getAllSteps().clear(); // Clear config to be able to load it again
                try {
-                       _projectSettings.configure(ClassLoader.getSystemResource(
-                                       "test/som.xml").getPath());
+                       _projectSettings.configure("classpath:test/som.xml");
                } catch (FileNotFoundException e) {
                        Assert.fail("Can't find configuration file: ", e);
                }
-               List<Step> steps = _projectSettings.getStepsOf(Scenario.class);
+               List<Step> steps = _stepsConfigService.getStepsOf(Scenario.class);
                Assert.assertTrue(steps.size() > 0, "No steps are created.");
                Assert.assertTrue(_projectSettings.doImport("geometry", "brep"));
                Assert.assertTrue(_projectSettings.doImport("model", "med"));
@@ -128,12 +135,11 @@ public class TestProjectSettingsService extends BaseTest {
                // ////// Load workflow customization with empty mappings
                _projectSettings.getAllSteps().clear(); // Clear config to be able to load it again
                try {
-                       _projectSettings.configure(ClassLoader.getSystemResource(
-                                       "test/som-without-mappings.xml").getPath());
+                       _projectSettings.configure("classpath:test/som-without-mappings.xml");
                } catch (FileNotFoundException e) {
                        Assert.fail("Can't find configuration file: ", e);
                }
-               steps = _projectSettings.getStepsOf(Scenario.class);
+               steps = _stepsConfigService.getStepsOf(Scenario.class);
                Assert.assertTrue(steps.size() > 0, "No steps are created.");
                Assert.assertFalse(_projectSettings.doImport("geometry", "brep"));
                Assert.assertFalse(_projectSettings.doImport("model", "med"));
@@ -143,9 +149,7 @@ public class TestProjectSettingsService extends BaseTest {
                // ////// Load workflow customization from not existing file
                _projectSettings.getAllSteps().clear(); // Clear config to be able to load it again
                try {
-                       _projectSettings.configure(ClassLoader.getSystemResource("/")
-                                       .getPath()
-                                       + "test/xxx.xml");
+                       _projectSettings.configure("classpath:test/xxx.xml");
                        Assert
                                        .fail("Customization loading must fail for not existing configuration file.");
                } catch (FileNotFoundException e) {
@@ -242,14 +246,13 @@ public class TestProjectSettingsService extends BaseTest {
                Database.getInstance().reset();
                _projectSettings.getAllSteps().clear(); // Clear config to be able to load it again
                try {
-                       _projectSettings.configure(ClassLoader.getSystemResource(
-                                       "test/som.xml").getPath());
+                       _projectSettings.configure("classpath:test/som.xml");
                } catch (FileNotFoundException e) {
                        Assert.fail("Can't find configuration file: ", e);
                }
                Assert.assertTrue(_documentTypeService.selectAllTypes().size() > 0,
                                "No document types are created.");
-               List<Step> steps = _projectSettings.getStepsOf(Scenario.class);
+               List<Step> steps = _stepsConfigService.getStepsOf(Scenario.class);
                Assert.assertTrue(steps.size() > 0, "No steps are created.");
 
                for (Step step : steps) {
@@ -401,12 +404,11 @@ public class TestProjectSettingsService extends BaseTest {
                // ////// Load workflow customization with empty mappings
                _projectSettings.getAllSteps().clear(); // Clear config to be able to load it again
                try {
-                       _projectSettings.configure(ClassLoader.getSystemResource(
-                                       "test/som-without-mappings.xml").getPath());
+                       _projectSettings.configure("classpath:test/som-without-mappings.xml");
                } catch (FileNotFoundException e) {
                        Assert.fail("Can't find configuration file: ", e);
                }
-               steps = _projectSettings.getStepsOf(Scenario.class);
+               steps = _stepsConfigService.getStepsOf(Scenario.class);
                Assert.assertTrue(steps.size() > 0, "No steps are created.");
                for (Step step : steps) {
                        List<String> defTypes = _projectSettings.getDefaultFormats(step);
@@ -436,9 +438,7 @@ public class TestProjectSettingsService extends BaseTest {
                // ////// Load workflow customization from not existing file
                _projectSettings.getAllSteps().clear(); // Clear config to be able to load it again
                try {
-                       _projectSettings.configure(ClassLoader.getSystemResource("/")
-                                       .getPath()
-                                       + "test/xxx.xml");
+                       _projectSettings.configure("classpath:test/xxx.xml");
                        Assert
                                        .fail("Customization loading must fail for not existing configuration file.");
                } catch (FileNotFoundException e) {
@@ -481,14 +481,13 @@ public class TestProjectSettingsService extends BaseTest {
                _projectSettings.getAllSteps().clear(); // Clear config to be able to load it again
                Database.getInstance().reset();
                try {
-                       _projectSettings.configure(ClassLoader.getSystemResource(
-                                       "test/som.xml").getPath());
+                       _projectSettings.configure("classpath:test/som.xml");
                } catch (FileNotFoundException e) {
                        Assert.fail("Can't find configuration file: ", e);
                }
 
                getHibernateTemplate().flush();
-               List<Step> steps = _projectSettings.getStepsOf(Scenario.class);
+               List<Step> steps = _stepsConfigService.getStepsOf(Scenario.class);
                Assert.assertTrue(steps.size() > 0, "No steps are created.");
                KnowledgeElementType ucase = _knowledgeElementTypeService.selectType("usecase");
                Assert.assertNotNull(ucase, "Knowledge type 'usecase' must be created in the database.");
@@ -500,12 +499,11 @@ public class TestProjectSettingsService extends BaseTest {
                Database.getInstance().reset();
                _projectSettings.getAllSteps().clear(); // Clear config to be able to load it again
                try {
-                       _projectSettings.configure(ClassLoader.getSystemResource(
-                                       "test/som.xml").getPath());
+                       _projectSettings.configure("classpath:test/som.xml");
                } catch (FileNotFoundException e) {
                        Assert.fail("Can't find configuration file: ", e);
                }
-               steps = _projectSettings.getStepsOf(Scenario.class);
+               steps = _stepsConfigService.getStepsOf(Scenario.class);
                Assert.assertTrue(steps.size() > 0, "No steps are created.");
                ucase = _knowledgeElementTypeService.selectType("usecase");
                Assert.assertNotNull(ucase, "Knowledge type 'usecase' must be created in the database.");
@@ -563,13 +561,13 @@ public class TestProjectSettingsService extends BaseTest {
                startNestedTransaction();
                // ///////////////////////////////////////////////////
                // ////// Load good workflow customization
+               getHibernateTemplate().bulkUpdate("delete from User");
                getHibernateTemplate().bulkUpdate("delete from Role");
                getHibernateTemplate().flush();
                Database.getInstance().reset();
                _projectSettings.getAllSteps().clear(); // Clear config to be able to load it again
                try {
-                       _projectSettings.configure(ClassLoader.getSystemResource(
-                                       "test/som.xml").getPath());
+                       _projectSettings.configure("classpath:test/som.xml");
                } catch (FileNotFoundException e) {
                        Assert.fail("Can't find configuration file: ", e);
                }
index 47f98104a3ff14db6a9c7cea266b5a035bdf2fe3..6fb04e4fd28542b0074f6e46095052f16f26321c 100644 (file)
@@ -150,8 +150,7 @@ public class TestPublicationService extends BaseTest {
                _projectSettings.getAllSteps().clear(); // Clear config to be able to load it again
                // Load workflow customization
                try {
-                       _projectSettings.configure(ClassLoader.getSystemResource(
-                                       "test/som.xml").getPath());
+                       _projectSettings.configure("classpath:test/som.xml");
                } catch (FileNotFoundException e) {
                        Assert.fail("Can't find som.xml: ", e);
                }
index 7661d628ef7ed10b0281dd87e922612b75d749cd..e70d404366c3eb9b2d5c026501a76bfb077049ee 100644 (file)
@@ -56,6 +56,7 @@ import org.splat.service.dto.FileDTO;
 import org.splat.service.dto.StepDTO;
 import org.splat.service.technical.ProjectSettingsService;
 import org.splat.service.technical.RepositoryService;
+import org.splat.service.technical.StepsConfigService;
 import org.splat.service.technical.ProjectSettingsService.Step;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Qualifier;
@@ -130,6 +131,13 @@ public class TestScenarioService extends BaseTest {
        @Qualifier("projectSettings")
        private transient ProjectSettingsService _projectSettings;
 
+       /**
+        * The StepsConfigService. Later injected by Spring.
+        */
+       @Autowired
+       @Qualifier("stepsConfigService")
+       private transient StepsConfigService _stepsConfigService;
+
        /**
         * The DocumentTypeService. Later injected by Spring.
         */
@@ -203,7 +211,7 @@ public class TestScenarioService extends BaseTest {
                Assert.assertNotNull(steps, "List of steps must not be null.");
                Assert.assertTrue(steps.size() > 0, "No steps are read.");
 
-               List<Step> projSteps = _projectSettings.getStepsOf(Scenario.class);
+               List<Step> projSteps = _stepsConfigService.getStepsOf(Scenario.class);
                Assert.assertEquals(steps.size(), projSteps.size(),
                                "Not all steps are listed.");
                int docIndex = 0;
@@ -361,8 +369,7 @@ public class TestScenarioService extends BaseTest {
                startNestedTransaction();
 
                _projectSettings.getAllSteps().clear(); // Clear config to be able to load it again
-               _projectSettings.configure(ClassLoader
-                               .getSystemResource("test/som.xml").getPath());
+               _projectSettings.configure("classpath:test/som.xml");
                getHibernateTemplate().flush();
                long scenarioId = createScenario();
                Scenario aScen = _scenarioDAO.get(scenarioId);
@@ -830,12 +837,11 @@ public class TestScenarioService extends BaseTest {
                _projectSettings.getAllSteps().clear(); // Clear config to be able to load it again
                // Load workflow customization
                try {
-                       _projectSettings.configure(ClassLoader.getSystemResource(
-                                       "test/som.xml").getPath());
+                       _projectSettings.configure("classpath:test/som.xml");
                } catch (FileNotFoundException e) {
                        Assert.fail("Can't find som.xml: ", e);
                }
-               List<Step> steps = _projectSettings.getStepsOf(Scenario.class);
+               List<Step> steps = _stepsConfigService.getStepsOf(Scenario.class);
                Assert.assertTrue(steps.size() > 0, "No steps are created.");
 
                // Create a test user
@@ -1060,8 +1066,7 @@ public class TestScenarioService extends BaseTest {
 
                Database.getInstance().reset();
                _projectSettings.getAllSteps().clear(); // Clear config to be able to load it again
-               _projectSettings.configure(ClassLoader
-                               .getSystemResource("test/som.xml").getPath());
+               _projectSettings.configure("classpath:test/som.xml");
 
                // Create a test user
                User.Properties uprop = new User.Properties();
@@ -1148,8 +1153,7 @@ public class TestScenarioService extends BaseTest {
 
                Database.getInstance().reset();
                _projectSettings.getAllSteps().clear(); // Clear config to be able to load it again
-               _projectSettings.configure(ClassLoader
-                               .getSystemResource("test/som.xml").getPath());
+               _projectSettings.configure("classpath:test/som.xml");
 
                // Create a test user
                User goodUser = TestEntitiesGenerator.getTestUser("goodUser");
index f9dc920bc57e3b31fa569c34825b8546252f13f9..458a1769aca252fa3357545d43ef528f7ab85396 100644 (file)
@@ -204,8 +204,7 @@ public class TestSearchService extends BaseTest {
                _projectSettings.getAllSteps().clear(); // Clear config to be able to load it again
                // Load workflow customization
                try {
-                       _projectSettings.configure(ClassLoader.getSystemResource(
-                                       "test/som.xml").getPath());
+                       _projectSettings.configure("classpath:test/som.xml");
                } catch (Exception e) {
                        Assert.fail("Can't load som.xml: ", e);
                }
@@ -418,8 +417,7 @@ public class TestSearchService extends BaseTest {
                _projectSettings.getAllSteps().clear(); // Clear config to be able to load it again
                // Load workflow customization
                try {
-                       _projectSettings.configure(ClassLoader.getSystemResource(
-                                       "test/som.xml").getPath());
+                       _projectSettings.configure("classpath:test/som.xml");
                } catch (Exception e) {
                        Assert.fail("Can't load som.xml: ", e);
                }
index 9ead1345b23373d70ca665eb37b217a0774b01f6..0003b00703063b60a112649fc219d173ae2b12f6 100644 (file)
@@ -180,8 +180,7 @@ public class TestStepService extends BaseTest {
                startNestedTransaction();
 
                _projectSettings.getAllSteps().clear(); // Clear config to be able to load it again
-               _projectSettings.configure(ClassLoader
-                               .getSystemResource("test/som.xml").getPath());
+               _projectSettings.configure("classpath:test/som.xml");
                HibernateTemplate ht = getHibernateTemplate();
                ht.flush();
                long scenarioId = createScenario();
@@ -460,8 +459,7 @@ public class TestStepService extends BaseTest {
                _projectSettings.getAllSteps().clear(); // Clear config to be able to load it again
                // Load workflow customization
                try {
-                       _projectSettings.configure(ClassLoader.getSystemResource(
-                                       "test/som.xml").getPath());
+                       _projectSettings.configure("classpath:test/som.xml");
                } catch (FileNotFoundException e) {
                        Assert.fail("Can't find som.xml: ", e);
                }
@@ -845,7 +843,7 @@ public class TestStepService extends BaseTest {
         * @param title the title
         * @throws InvalidParameterException if there is something wrong likely unrelated to the tested method
         */
-       private void testEdit(StepCommentAttribute comment, String value, String title)
+       private void testEdit(final StepCommentAttribute comment, final String value, final String title)
                        throws InvalidParameterException {
                String oldValue = comment.getValue();
                String oldTitle = comment.getTitle();
index d3a704b0399986bf31a248064f8d12881cb2890f..b54b62cbdb05fdb0a259643e09cf7a49606cd63c 100644 (file)
@@ -19,12 +19,12 @@ import java.util.Map;
 import org.splat.dal.bo.kernel.User;
 import org.splat.dal.bo.som.DescriptionAttribute;
 import org.splat.dal.bo.som.Document;
-import org.splat.dal.bo.som.Document.Properties;
 import org.splat.dal.bo.som.DocumentType;
 import org.splat.dal.bo.som.ProjectElement;
 import org.splat.dal.bo.som.Publication;
 import org.splat.dal.bo.som.Scenario;
 import org.splat.dal.bo.som.Study;
+import org.splat.dal.bo.som.Document.Properties;
 import org.splat.dal.dao.kernel.UserDAO;
 import org.splat.dal.dao.som.Database;
 import org.splat.dal.dao.som.StudyDAO;
@@ -137,8 +137,7 @@ public class TestStudyService extends BaseTest {
                _projectSettings.getAllSteps().clear(); // Clear config to be able to load it again
                // Load workflow customization
                try {
-                       _projectSettings.configure(ClassLoader.getSystemResource(
-                                       "test/som.xml").getPath());
+                       _projectSettings.configure("classpath:test/som.xml");
                } catch (FileNotFoundException e) {
                        Assert.fail("Can't find som.xml: ", e);
                }
index 61cbe0b72f2b42b042f586b7fc8a1f55e0c20c45..333fb73270c4f203fc6a335d930a2cfc322dda4e 100644 (file)
@@ -11,6 +11,7 @@ import org.splat.kernel.InvalidPropertyException;
 import org.splat.service.SearchService;
 import org.splat.service.dto.StudySearchFilterDTO;
 import org.splat.service.technical.ProjectSettingsService;
+import org.splat.service.technical.StepsConfigService;
 import org.splat.wapp.Constants;
 
 /**
@@ -27,7 +28,7 @@ public class SearchStudyAction extends
        /**
         * Injected project settings service.
         */
-       private ProjectSettingsService _projectSettings;
+       private StepsConfigService _stepsConfigService;
        /**
         * Injected search service.
         */
@@ -91,7 +92,7 @@ public class SearchStudyAction extends
         */
        @Override
        protected List<SimulationContextType> getInvolvedContexts() {
-               List<ProjectSettingsService.Step> steps = getProjectSettings()
+               List<ProjectSettingsService.Step> steps = getStepsConfigService()
                                .getStepsOf(Study.class);
                ProjectSettingsService.Step[] number = steps
                                .toArray(new ProjectSettingsService.Step[steps.size()]);
@@ -150,23 +151,23 @@ public class SearchStudyAction extends
        }
 
        /**
-        * Get project settings.
+        * Get StepsConfigService.
         * 
-        * @return Project settings service
+        * @return StepsConfigService
         */
-       private ProjectSettingsService getProjectSettings() {
-               return _projectSettings;
+       private StepsConfigService getStepsConfigService() {
+               return _stepsConfigService;
        }
 
        /**
-        * Set project settings service.
+        * Set StepsConfigService.
         * 
-        * @param projectSettingsService
-        *            project settings service
+        * @param stepsConfigService
+        *            StepsConfigService
         */
-       public void setProjectSettings(
-                       final ProjectSettingsService projectSettingsService) {
-               _projectSettings = projectSettingsService;
+       public void setStepsConfigService(
+                       final StepsConfigService stepsConfigService) {
+               _stepsConfigService = stepsConfigService;
        }
 
        /**
index 64a6ed507c4d6b8d7b40f86558982f53ebcf4e99..be27e295c660b845ffd8c5a9754c46eb1bebda7d 100644 (file)
@@ -2,12 +2,11 @@ package org.splat.simer;
 
 import java.util.Map;
 
-import org.splat.service.technical.ProjectSettingsService;
 import org.splat.som.ApplicationRights;
 import org.splat.wapp.Constants;
 
 /**
- * Start application action.
+ * Start application action. Initializes application settings.
  */
 public class StartAction extends Action {
        /**
@@ -15,11 +14,6 @@ public class StartAction extends Action {
         */
        private static final long serialVersionUID = 5875058140682652964L;
 
-       /**
-        * Injected project settings service.
-        */
-       private ProjectSettingsService _projectSettings;
-
        // ==============================================================================================================================
        // Action execution
        // ==============================================================================================================================
@@ -36,17 +30,11 @@ public class StartAction extends Action {
                LOG.info(new StringBuffer("Initializing ").append(wappurl)
                                .append("...").toString());
                try {
-                       ProjectSettingsService project = getProjectSettings();
                        ApplicationSettings wapp = getApplicationSettings();
                        wapp.setLocale(this.getLocale());
                        String root = ApplicationSettings.getApplicationRootPath();
                        LOG.debug("Application root: " + root);
 
-                       // Database configuration
-                       project.configure(root
-                                       + ApplicationSettings
-                                                       .getApplicationProperty("wapp.configuration"));
-
                        // Configure menus for the current user
                        wapp.configure();
 
@@ -71,28 +59,4 @@ public class StartAction extends Action {
                }
                return res;
        }
-
-       // ==============================================================================================================================
-       // Setter
-       // ==============================================================================================================================
-
-       /**
-        * Get project settings.
-        * 
-        * @return Project settings service
-        */
-       private ProjectSettingsService getProjectSettings() {
-               return _projectSettings;
-       }
-
-       /**
-        * Set project settings service.
-        * 
-        * @param projectSettingsService
-        *            project settings service
-        */
-       public void setProjectSettings(
-                       final ProjectSettingsService projectSettingsService) {
-               _projectSettings = projectSettingsService;
-       }
 }
\ No newline at end of file
index a7ce2df303515eec1ab9eff97b06b4f132df67ba..13d385d7d61481e4db2c2722f6caf11966d2e746 100644 (file)
@@ -25,8 +25,8 @@ http://www.springframework.org/schema/context/spring-context-3.0.xsd">
                class="org.springframework.context.support.ResourceBundleMessageSource">
                <property name="basenames">
                        <list>
-                <value>conf/log-messages</value>
-                <value>som</value>
+                               <value>conf/log-messages</value>
+                               <value>som</value>
                        </list>
                </property>
        </bean>
@@ -48,20 +48,16 @@ http://www.springframework.org/schema/context/spring-context-3.0.xsd">
        </bean>
 
        <bean id="menuBarSettings" class="org.splat.simer.MenuBarSettings"
-               scope="session">
-       </bean>
+               scope="session" />
 
        <bean id="titleBarSettings" class="org.splat.simer.TitleBarSettings"
-               scope="session">
-       </bean>
+               scope="session" />
 
        <bean id="toolBarSettings" class="org.splat.simer.ToolBarSettings"
-               scope="session">
-       </bean>
+               scope="session" />
 
        <bean id="leftMenuSettings" class="org.splat.simer.LeftMenuSettings"
-               scope="session">
-       </bean>
+               scope="session" />
 
        <bean id="slidMenu" scope="session" abstract="true">
                <property name="projectElementService"
@@ -83,7 +79,7 @@ http://www.springframework.org/schema/context/spring-context-3.0.xsd">
                <property name="projectSettings" ref="projectSettings" />
                <property name="knowledgeElementTypeService"
                        ref="knowledgeElementTypeService" />
-        <property name="publicationService" ref="publicationService" />
+               <property name="publicationService" ref="publicationService" />
        </bean>
 
        <bean id="openStudy" class="org.splat.simer.OpenStudy"
@@ -99,12 +95,12 @@ http://www.springframework.org/schema/context/spring-context-3.0.xsd">
        </bean>
 
        <bean id="openKnowledge" class="org.splat.simer.OpenKnowledge"
-               parent="openObject" scope="session">
-       </bean>
+               parent="openObject" scope="session" />
+
+       <bean id="invalidateAction"
+               class="org.splat.simer.InvalidateAction" />
 
-    <bean id="invalidateAction" class="org.splat.simer.InvalidateAction"/>
-    
-    <bean id="baseAction" class="org.splat.simer.Action"
+       <bean id="baseAction" class="org.splat.simer.Action"
                scope="prototype" abstract="true">
                <property name="applicationSettings" ref="applicationSettings" />
                <property name="openStudy" ref="openStudy" />
@@ -141,7 +137,7 @@ http://www.springframework.org/schema/context/spring-context-3.0.xsd">
        <bean id="importDocumentAction"
                class="org.splat.simer.ImportDocumentAction" scope="prototype"
                parent="baseAction">
-        <property name="studyService" ref="studyService" />
+               <property name="studyService" ref="studyService" />
                <property name="stepService" ref="stepService" />
                <property name="projectSettings" ref="projectSettings" />
                <property name="publicationService" ref="publicationService" />
@@ -156,10 +152,11 @@ http://www.springframework.org/schema/context/spring-context-3.0.xsd">
                <property name="studyService" ref="studyService" />
        </bean>
 
-    <bean id="removeStudyAction" class="org.splat.simer.RemoveStudyAction"
-        scope="prototype" parent="baseAction">
-        <property name="studyService" ref="studyService" />
-    </bean>
+       <bean id="removeStudyAction"
+               class="org.splat.simer.RemoveStudyAction" scope="prototype"
+               parent="baseAction">
+               <property name="studyService" ref="studyService" />
+       </bean>
 
        <!--========= Inherited from displayStudyStepAction ========= -->
 
@@ -170,10 +167,9 @@ http://www.springframework.org/schema/context/spring-context-3.0.xsd">
                <property name="userService" ref="userService" />
        </bean>
 
-    <bean id="editStudyAction" class="org.splat.simer.EditStudyAction"
-        scope="prototype" parent="displayStudyStepAction">
-    </bean>
-    
+       <bean id="editStudyAction" class="org.splat.simer.EditStudyAction"
+               scope="prototype" parent="displayStudyStepAction" />
+
        <bean id="editScenarioPropertiesAction"
                class="org.splat.simer.EditScenarioPropertiesAction" scope="prototype"
                parent="displayStudyStepAction">
@@ -209,49 +205,43 @@ http://www.springframework.org/schema/context/spring-context-3.0.xsd">
                        ref="knowledgeElementTypeService" />
                <property name="scenarioService" ref="scenarioService" />
        </bean>
-       
+
        <bean id="editStepCommentAction"
-        class="org.splat.simer.EditStepCommentAction" scope="prototype"
-        parent="displayStudyStepAction">
-        <property name="stepService" ref="stepService" />
-    </bean>
-    
-    <bean id="editStudyDescriptionAction"
-        class="org.splat.simer.EditStudyDescriptionAction" scope="prototype"
-        parent="displayStudyStepAction">
-    </bean>
-    
-    
-    <!-- bean id="CompareStudyAction"
-        class="org.splat.simer.CompareStudyAction" scope="prototype"
-        parent="displayStudyStepAction">
-        <property name="studyService" ref="studyService" />
-    </bean-->
+               class="org.splat.simer.EditStepCommentAction" scope="prototype"
+               parent="displayStudyStepAction">
+               <property name="stepService" ref="stepService" />
+       </bean>
+
+       <bean id="editStudyDescriptionAction"
+               class="org.splat.simer.EditStudyDescriptionAction" scope="prototype"
+               parent="displayStudyStepAction" />
+
+
+       <!-- bean id="CompareStudyAction"
+               class="org.splat.simer.CompareStudyAction" scope="prototype"
+               parent="displayStudyStepAction">
+               <property name="studyService" ref="studyService" />
+               </bean-->
 
        <!-- End of Inherited from displayStudyStepAction -->
 
        <bean id="startAction" class="org.splat.simer.StartAction"
-               scope="prototype" parent="baseAction">
-               <property name="applicationSettings" ref="applicationSettings" />
-               <property name="projectSettings" ref="projectSettings" />
-       </bean>
+               scope="prototype" parent="baseAction" />
+
        <bean id="connectionAction" class="org.splat.simer.ConnectionAction"
-               scope="prototype" parent="baseAction">
-       </bean>
+               scope="prototype" parent="baseAction" />
 
        <bean id="menuAction" class="org.splat.simer.MenuAction"
-               scope="prototype" parent="baseAction">
-       </bean>
+               scope="prototype" parent="baseAction" />
 
        <bean id="notYetImplementedAction"
                class="org.splat.simer.NotYetImplementedAction" scope="prototype"
-               parent="baseAction">
-       </bean>
+               parent="baseAction" />
 
        <bean id="searchStudyAction"
                class="org.splat.simer.SearchStudyAction" scope="prototype"
                parent="baseAction">
-               <property name="projectSettings" ref="projectSettings" />
+               <property name="stepsConfigService" ref="stepsConfigService" />
                <property name="searchService" ref="searchService" />
                <property name="simulationContextService"
                        ref="simulationContextService" />
@@ -270,8 +260,7 @@ http://www.springframework.org/schema/context/spring-context-3.0.xsd">
        </bean>
 
        <bean id="searchDocumentAction"
-               class="org.splat.simer.SearchDocumentAction" scope="prototype">
-       </bean>
+               class="org.splat.simer.SearchDocumentAction" scope="prototype" />
 
        <bean id="displayKnowledgeAction"
                class="org.splat.simer.DisplayKnowledgeAction" scope="prototype"
@@ -287,8 +276,7 @@ http://www.springframework.org/schema/context/spring-context-3.0.xsd">
 
        <bean id="uploadStudyAction"
                class="org.splat.simer.UploadStudyAction" scope="prototype"
-               parent="baseAction">
-       </bean>
+               parent="baseAction" />
 
        <bean id="versionDocumentAction"
                class="org.splat.simer.VersionDocumentAction" scope="prototype"
@@ -296,7 +284,7 @@ http://www.springframework.org/schema/context/spring-context-3.0.xsd">
                <property name="projectSettings" ref="projectSettings" />
                <property name="publicationService" ref="publicationService" />
                <property name="stepService" ref="stepService" />
-        <property name="studyService" ref="studyService" />
+               <property name="studyService" ref="studyService" />
                <property name="repositoryService" ref="repositoryService" />
        </bean>
 
@@ -326,7 +314,6 @@ http://www.springframework.org/schema/context/spring-context-3.0.xsd">
 
        <bean id="knowledgeElementAction"
                class="org.splat.simer.admin.KnowledgeElementAction"
-               scope="prototype">
-       </bean>
+               scope="prototype" />
 
 </beans>