From aa02c1b619810727cdd4fea24ffcdeb276d1296c Mon Sep 17 00:00:00 2001 From: mka Date: Thu, 31 Jan 2013 14:35:35 +0000 Subject: [PATCH] Rename the scenario functionality is implemented --- .../org/splat/service/ScenarioService.java | 6 +++ .../splat/service/ScenarioServiceImpl.java | 10 ++++ .../study/editScenarioProperties.jsp | 11 +++-- .../org/splat/simer/ApplicationSettings.java | 1 - .../simer/EditScenarioPropertiesAction.java | 49 +++++++++++++++++-- Workspace/Siman/src/struts.xml | 10 ++++ 6 files changed, 79 insertions(+), 8 deletions(-) diff --git a/Workspace/Siman-Common/src/org/splat/service/ScenarioService.java b/Workspace/Siman-Common/src/org/splat/service/ScenarioService.java index 939a0ef..200d3a9 100644 --- a/Workspace/Siman-Common/src/org/splat/service/ScenarioService.java +++ b/Workspace/Siman-Common/src/org/splat/service/ScenarioService.java @@ -200,4 +200,10 @@ public interface ScenarioService { * @return true if removal succeeded */ boolean removeKnowledgeElement(Scenario scenario, KnowledgeElement kelm); + + /** + * Rename the scenario. + * @param scenario - the scenario with a new title. + */ + void renameScenario(final Scenario scenario); } diff --git a/Workspace/Siman-Common/src/org/splat/service/ScenarioServiceImpl.java b/Workspace/Siman-Common/src/org/splat/service/ScenarioServiceImpl.java index 75bcac1..ad4af9f 100644 --- a/Workspace/Siman-Common/src/org/splat/service/ScenarioServiceImpl.java +++ b/Workspace/Siman-Common/src/org/splat/service/ScenarioServiceImpl.java @@ -958,6 +958,16 @@ public class ScenarioServiceImpl implements ScenarioService { } return isOk; } + + /** + * + * {@inheritDoc} + * @see org.splat.service.ScenarioService#renameScenario(java.lang.String) + */ + @Transactional + public void renameScenario(final Scenario scenario) { + getScenarioDAO().merge(scenario); + } /** * Get the knowledgeElementDAO. diff --git a/Workspace/Siman/WebContent/study/editScenarioProperties.jsp b/Workspace/Siman/WebContent/study/editScenarioProperties.jsp index 35a2a63..0913a60 100644 --- a/Workspace/Siman/WebContent/study/editScenarioProperties.jsp +++ b/Workspace/Siman/WebContent/study/editScenarioProperties.jsp @@ -1,5 +1,8 @@ <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <%@ taglib prefix="s" uri="/struts-tags"%> + + +