From 6193854e5e7bfa2aa3c1d00d3bee6590fd88f8cd Mon Sep 17 00:00:00 2001 From: mka Date: Thu, 8 Nov 2012 14:28:53 +0000 Subject: [PATCH] Tiles is added --- .../WebContent/WEB-INF/tiles/tiles-defs.xml | 95 ++++++++++- Workspace/Siman/WebContent/jsp/exception.jsp | 16 ++ .../Siman/WebContent/jsp/presentationpane.jsp | 8 +- .../Siman/WebContent/layout/baseLayout.jsp | 40 +++++ .../layout/baseLayoutWithoutTitleBar.jsp | 38 +++++ .../Siman/WebContent/layout/homeLayout.jsp | 34 ++++ .../Siman/WebContent/layout/layoutLogin.jsp | 3 +- .../Siman/WebContent/layout/welcomeLayout.jsp | 30 ++++ .../Siman/WebContent/sadmin/displayUser.jsp | 20 +-- .../Siman/WebContent/sadmin/indexStudies.jsp | 21 +-- Workspace/Siman/WebContent/sadmin/upload.jsp | 24 +-- .../WebContent/study/displayKnowledge.jsp | 32 +--- .../study/displayStudyProperties.jsp | 33 +--- .../WebContent/study/displayStudyStep.jsp | 27 +-- .../study/editScenarioProperties.jsp | 30 +--- .../WebContent/study/editStudyProperties.jsp | 71 ++++---- Workspace/Siman/WebContent/study/error.jsp | 77 ++------- .../Siman/WebContent/study/importDocument.jsp | 21 --- .../Siman/WebContent/study/importError.jsp | 40 +---- .../Siman/WebContent/study/newScenario.jsp | 32 +--- Workspace/Siman/WebContent/study/newStudy.jsp | 34 +--- .../WebContent/study/searchKnowledge.jsp | 33 +--- .../Siman/WebContent/study/searchStudy.jsp | 33 +--- Workspace/Siman/WebContent/study/upload.jsp | 21 --- .../WebContent/study/versionDocument.jsp | 21 --- Workspace/Siman/WebContent/welcome.jsp | 26 --- Workspace/Siman/src/labels_en.properties | 2 +- .../Siman/src/org/splat/simer/Action.java | 19 +++ .../src/org/splat/simer/ConnectionAction.java | 3 +- .../org/splat/simer/ImportDocumentAction.java | 48 +++--- .../org/splat/simer/NewScenarioAction.java | 26 +-- .../src/org/splat/simer/NewStudyAction.java | 1 + .../splat/simer/NotYetImplementedAction.java | 8 +- .../splat/simer/StudyPropertiesAction.java | 50 ++++-- .../src/org/splat/simer/UploadAction.java | 26 +-- .../splat/simer/VersionDocumentAction.java | 10 +- Workspace/Siman/src/struts.xml | 160 ++++++++++-------- 37 files changed, 549 insertions(+), 664 deletions(-) create mode 100644 Workspace/Siman/WebContent/jsp/exception.jsp create mode 100644 Workspace/Siman/WebContent/layout/baseLayout.jsp create mode 100644 Workspace/Siman/WebContent/layout/baseLayoutWithoutTitleBar.jsp create mode 100644 Workspace/Siman/WebContent/layout/homeLayout.jsp create mode 100644 Workspace/Siman/WebContent/layout/welcomeLayout.jsp diff --git a/Workspace/Siman/WebContent/WEB-INF/tiles/tiles-defs.xml b/Workspace/Siman/WebContent/WEB-INF/tiles/tiles-defs.xml index 7a322b3..4d1b001 100644 --- a/Workspace/Siman/WebContent/WEB-INF/tiles/tiles-defs.xml +++ b/Workspace/Siman/WebContent/WEB-INF/tiles/tiles-defs.xml @@ -7,19 +7,110 @@ - + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Workspace/Siman/WebContent/jsp/exception.jsp b/Workspace/Siman/WebContent/jsp/exception.jsp new file mode 100644 index 0000000..4cd64ae --- /dev/null +++ b/Workspace/Siman/WebContent/jsp/exception.jsp @@ -0,0 +1,16 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@ taglib prefix="s" uri="/struts-tags" %> + + + + + rel="stylesheet" type="text/css"> + + +
+ + + +
+ + \ No newline at end of file diff --git a/Workspace/Siman/WebContent/jsp/presentationpane.jsp b/Workspace/Siman/WebContent/jsp/presentationpane.jsp index f986ff8..eb08e95 100644 --- a/Workspace/Siman/WebContent/jsp/presentationpane.jsp +++ b/Workspace/Siman/WebContent/jsp/presentationpane.jsp @@ -1,8 +1,6 @@ <%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1" -%><%@ - taglib prefix="s" uri="/struts-tags" -%> + pageEncoding="ISO-8859-1" %> +<%@ taglib prefix="s" uri="/struts-tags" %> @@ -11,6 +9,6 @@ rel="stylesheet" type="text/css"> -

Simple body text

+

\ No newline at end of file diff --git a/Workspace/Siman/WebContent/layout/baseLayout.jsp b/Workspace/Siman/WebContent/layout/baseLayout.jsp new file mode 100644 index 0000000..d4d0726 --- /dev/null +++ b/Workspace/Siman/WebContent/layout/baseLayout.jsp @@ -0,0 +1,40 @@ +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> +<%@ taglib prefix="s" uri="/struts-tags"%> +<%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles"%> + + + + + + + + + <s:property value="%{getText(#request.title)}"/> + + rel="stylesheet" type="text/css"> + + + + + + + + + + +

+ +
+ + +
+ + +
+ +
+ + + \ No newline at end of file diff --git a/Workspace/Siman/WebContent/layout/baseLayoutWithoutTitleBar.jsp b/Workspace/Siman/WebContent/layout/baseLayoutWithoutTitleBar.jsp new file mode 100644 index 0000000..8db8fbf --- /dev/null +++ b/Workspace/Siman/WebContent/layout/baseLayoutWithoutTitleBar.jsp @@ -0,0 +1,38 @@ +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> +<%@ taglib prefix="s" uri="/struts-tags"%> +<%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles"%> + + + + + + + + + <s:property value="%{getText(#request.title)}"/> + + rel="stylesheet" type="text/css"> + + + + + + +
+ + +
+ +
+ +
+ + +
+ +
+ + + \ No newline at end of file diff --git a/Workspace/Siman/WebContent/layout/homeLayout.jsp b/Workspace/Siman/WebContent/layout/homeLayout.jsp new file mode 100644 index 0000000..fd331cb --- /dev/null +++ b/Workspace/Siman/WebContent/layout/homeLayout.jsp @@ -0,0 +1,34 @@ +<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%> +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> +<%@ taglib prefix="s" uri="/struts-tags"%> +<%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles"%> + + + + + + + + + <s:property value="%{getText(#request.title)}"/> + + rel="stylesheet" type="text/css"> + + + + + + + + + + + +
+ + + +
+ + + \ No newline at end of file diff --git a/Workspace/Siman/WebContent/layout/layoutLogin.jsp b/Workspace/Siman/WebContent/layout/layoutLogin.jsp index 8bd8119..384dece 100644 --- a/Workspace/Siman/WebContent/layout/layoutLogin.jsp +++ b/Workspace/Siman/WebContent/layout/layoutLogin.jsp @@ -17,9 +17,8 @@ + - -
diff --git a/Workspace/Siman/WebContent/layout/welcomeLayout.jsp b/Workspace/Siman/WebContent/layout/welcomeLayout.jsp new file mode 100644 index 0000000..02d9153 --- /dev/null +++ b/Workspace/Siman/WebContent/layout/welcomeLayout.jsp @@ -0,0 +1,30 @@ +<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%> +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> +<%@ taglib prefix="s" uri="/struts-tags"%> +<%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles"%> + + + + + + + + + + <s:property value="%{getText(#request.title)}"/> + + rel="stylesheet" type="text/css"> + + + + + + + + +
+ +
+ + + \ No newline at end of file diff --git a/Workspace/Siman/WebContent/sadmin/displayUser.jsp b/Workspace/Siman/WebContent/sadmin/displayUser.jsp index 05970dc..6ffb7c7 100644 --- a/Workspace/Siman/WebContent/sadmin/displayUser.jsp +++ b/Workspace/Siman/WebContent/sadmin/displayUser.jsp @@ -7,26 +7,8 @@ - - - <s:text name="name.module"/> - rel="stylesheet" type="text/css"> - + rel="stylesheet" type="text/css"> - - -
- - -
- -
- -
- - -
- - -
- -
- -
diff --git a/Workspace/Siman/WebContent/sadmin/upload.jsp b/Workspace/Siman/WebContent/sadmin/upload.jsp index 282bec3..9fc7ce9 100644 --- a/Workspace/Siman/WebContent/sadmin/upload.jsp +++ b/Workspace/Siman/WebContent/sadmin/upload.jsp @@ -1,15 +1,9 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1" -%> -<%@ - taglib prefix="s" uri="/struts-tags" -%> +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> +<%@ taglib prefix="s" uri="/struts-tags"%> - - <s:text name="name.module"/> rel="stylesheet" type="text/css"> - - -
- - -
- -
- -
- - - - - - -
- -
- - -
diff --git a/Workspace/Siman/WebContent/study/displayStudyProperties.jsp b/Workspace/Siman/WebContent/study/displayStudyProperties.jsp index ff3ac0a..f845a5d 100644 --- a/Workspace/Siman/WebContent/study/displayStudyProperties.jsp +++ b/Workspace/Siman/WebContent/study/displayStudyProperties.jsp @@ -1,38 +1,11 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1" -%> -<%@ - taglib prefix="s" uri="/struts-tags" -%> +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> +<%@ taglib prefix="s" uri="/struts-tags"%> - - - <s:text name="name.module"/> - rel="stylesheet" type="text/css"> - + rel="stylesheet" type="text/css"> - - - - - - - -
- -
- - -
- - - - - - -
- -
- - -
diff --git a/Workspace/Siman/WebContent/study/editScenarioProperties.jsp b/Workspace/Siman/WebContent/study/editScenarioProperties.jsp index 114a110..ab046b2 100644 --- a/Workspace/Siman/WebContent/study/editScenarioProperties.jsp +++ b/Workspace/Siman/WebContent/study/editScenarioProperties.jsp @@ -1,16 +1,11 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1" -%> -<%@ - taglib prefix="s" uri="/struts-tags" -%> +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> +<%@ taglib prefix="s" uri="/struts-tags"%> - - <s:text name="name.module"/> rel="stylesheet" type="text/css"> + - - - - - - - -
- -
- - -
-<% String message = request.getParameter("message"); - String value = request.getParameter("value"); -%> -<%=message%> - - - <s:text name="name.module"/> - rel="stylesheet" type="text/css"> - + rel="stylesheet" type="text/css"> - - - - - - - -
- -
- - -
- - - - - -
- -
- - -
+ - -
- - -
- -
- -
-<% String action = request.getParameter("action"); - +<% ApplicationRights rights = (ApplicationRights)session.getAttribute("user.rights"); ResourceBundle locale = ResourceBundle.getBundle("som", ApplicationSettings.getCurrentLocale()); String format = locale.getString("date.format"); @@ -27,33 +26,17 @@ if (rights.getUser() != null) connected = true; if (session.getAttribute("search.result") == null) result = "obsolete"; %> -<%=action%> + <%=connected%> <%=format%> <%=tostring.format(java.util.Calendar.getInstance().getTime())%> - - - <s:text name="name.module"/> - rel="stylesheet" type="text/css"> - - - - - -
+ rel="stylesheet" type="text/css"> + + - -
- -
- -
+
@@ -195,7 +178,7 @@ - + " border="none" title="" onClick="cancel()" />  @@ -216,7 +199,7 @@ - + diff --git a/Workspace/Siman/WebContent/study/upload.jsp b/Workspace/Siman/WebContent/study/upload.jsp index ea03b0a..5b04c9d 100644 --- a/Workspace/Siman/WebContent/study/upload.jsp +++ b/Workspace/Siman/WebContent/study/upload.jsp @@ -6,8 +6,6 @@ - - <s:text name="name.module"/> rel="stylesheet" type="text/css"> - - - - - - - -
- -
- - -
- - - - - - -
- -
- - -
- - - - -
- - - \ No newline at end of file diff --git a/Workspace/Siman/src/labels_en.properties b/Workspace/Siman/src/labels_en.properties index fe4d72d..cb44990 100644 --- a/Workspace/Siman/src/labels_en.properties +++ b/Workspace/Siman/src/labels_en.properties @@ -49,7 +49,7 @@ menu.admin.context = The simulation contexts menu.admin.knowledge = The knowledges menu.admin.study = The studies - +title.application = SIMAN title.login = Enter your login identification title.criteria = Search criteria title.newstudy = Define your study diff --git a/Workspace/Siman/src/org/splat/simer/Action.java b/Workspace/Siman/src/org/splat/simer/Action.java index e2446fe..40ee111 100644 --- a/Workspace/Siman/src/org/splat/simer/Action.java +++ b/Workspace/Siman/src/org/splat/simer/Action.java @@ -69,6 +69,10 @@ public class Action extends ActionSupport implements ServletRequestAware, * Error code. */ private String _errorCode; + /** + * ActionType for specifying the type of the operaion. + */ + private String _actionType; /** * Current open study facade object. */ @@ -686,5 +690,20 @@ public class Action extends ActionSupport implements ServletRequestAware, public void setLeftMenuSettings(final LeftMenuSettings leftMenuSettings) { _leftMenuSettings = leftMenuSettings; } + + /** + * Get the actionType. + * @return the actionType + */ + public String getActionType() { + return _actionType; + } + /** + * Set the actionType. + * @param actionType the actionType to set + */ + public void setActionType(final String actionType) { + _actionType = actionType; + } } \ No newline at end of file diff --git a/Workspace/Siman/src/org/splat/simer/ConnectionAction.java b/Workspace/Siman/src/org/splat/simer/ConnectionAction.java index 2838c97..3cb190f 100644 --- a/Workspace/Siman/src/org/splat/simer/ConnectionAction.java +++ b/Workspace/Siman/src/org/splat/simer/ConnectionAction.java @@ -30,7 +30,7 @@ public class ConnectionAction extends Action { * User password. */ private String _password = null; - private transient String _backmenu = null; + private String _backmenu = null; private String _menuProperty; @@ -48,6 +48,7 @@ public class ConnectionAction extends Action { * * @see javax.security.auth.callback.CallbackHandler#handle(javax.security.auth.callback.Callback[]) */ + @Override public void handle(final Callback[] callbacks) throws IOException, UnsupportedCallbackException { for (int i = 0; i < callbacks.length; i++) { diff --git a/Workspace/Siman/src/org/splat/simer/ImportDocumentAction.java b/Workspace/Siman/src/org/splat/simer/ImportDocumentAction.java index 32ffa8c..beabeaa 100644 --- a/Workspace/Siman/src/org/splat/simer/ImportDocumentAction.java +++ b/Workspace/Siman/src/org/splat/simer/ImportDocumentAction.java @@ -147,7 +147,7 @@ public class ImportDocumentAction extends UploadBaseNextAction { Document slot = getDocumentService().selectDocument(fileref, new Revision().toString()); if (slot == null) { - setErrorCode("reference.undefined"); + setErrorCode("message.error.reference.undefined"); setToolProperty("none"); initializationFullScreenContext(_menuProperty, _titleProperty, _editDisabledProperty, _toolProperty, _leftMenuProperty); @@ -155,7 +155,7 @@ public class ImportDocumentAction extends UploadBaseNextAction { return ERROR; } else { if (!slot.isUndefined()) { - setErrorCode("reference.duplicate"); + setErrorCode("message.error.reference.duplicate"); setToolProperty("none"); initializationFullScreenContext(_menuProperty, _titleProperty, _editDisabledProperty, _toolProperty, _leftMenuProperty); @@ -178,7 +178,7 @@ public class ImportDocumentAction extends UploadBaseNextAction { state = ProgressState.inCHECK; docver = version.toString(); } catch (ParseException e) { - setErrorCode("format.version"); + setErrorCode("message.error.format.version"); setToolProperty("none"); initializationFullScreenContext(_menuProperty, _titleProperty, _editDisabledProperty, _toolProperty, _leftMenuProperty); @@ -195,7 +195,7 @@ public class ImportDocumentAction extends UploadBaseNextAction { try { check.parse(date); } catch (ParseException e) { - setErrorCode("format.date"); + setErrorCode("message.error.format.date"); setToolProperty("none"); initializationFullScreenContext(_menuProperty, _titleProperty, _editDisabledProperty, _toolProperty, _leftMenuProperty); @@ -238,7 +238,7 @@ public class ImportDocumentAction extends UploadBaseNextAction { if (action == ToDo.cancel) return "cancel"; if (doctype == 0) { - setErrorCode("import.type"); + setErrorCode("message.error.import.type"); setToolProperty("none"); setLeftMenuProperty("study"); @@ -330,10 +330,10 @@ public class ImportDocumentAction extends UploadBaseNextAction { return SUCCESS; } catch (FileNotFoundException error) { LOG.error("Reason:", error); - setErrorCode("import.file"); + setErrorCode("message.error.import.file"); } catch (Exception error) { LOG.error("Reason:", error); - setErrorCode("internal"); + setErrorCode("message.error.internal"); } setToolProperty("none"); @@ -372,45 +372,45 @@ public class ImportDocumentAction extends UploadBaseNextAction { return docver; } - public void setDocumentDate(String date) { + public void setDocumentDate(final String date) { // ----------------------------------------- this.date = date; } - public void setDocumentName(String name) { + public void setDocumentName(final String name) { // ----------------------------------------- this.docname = name; // Name entered by the user if enabled } - public void setDocumentTitle(String name) { // Called even if DocumentName is enabled + public void setDocumentTitle(final String name) { // Called even if DocumentName is enabled // ----------------------------------------- if (this.docname == null) this.docname = name; } - public void setDocumentType(String value) { + public void setDocumentType(final String value) { // ------------------------------------------ this.doctype = Integer.valueOf(value); } - public void setDefaultDocumentState(String state) { // Called even if DocumentState is enabled + public void setDefaultDocumentState(final String state) { // Called even if DocumentState is enabled // -------------------------------------------------- if (this.state == null) this.state = ProgressState.valueOf(state); } - public void setDefaultDocumentType(String value) { // Called even if DocumentType is enabled + public void setDefaultDocumentType(final String value) { // Called even if DocumentType is enabled // -------------------------------------------------- if (this.doctype == 0) this.doctype = Integer.valueOf(value); } - public void setReference(String value) { + public void setReference(final String value) { // --------------------------------------- this.docref = value; } - public void setVersion(String value) { + public void setVersion(final String value) { // ------------------------------------- this.docver = value; } @@ -430,7 +430,7 @@ public class ImportDocumentAction extends UploadBaseNextAction { * @param projectSettingsService * project settings service */ - public void setProjectSettings(ProjectSettingsService projectSettingsService) { + public void setProjectSettings(final ProjectSettingsService projectSettingsService) { _projectSettingsService = projectSettingsService; } @@ -449,7 +449,7 @@ public class ImportDocumentAction extends UploadBaseNextAction { * @param publicationService * the publicationService to set */ - public void setPublicationService(PublicationService publicationService) { + public void setPublicationService(final PublicationService publicationService) { _publicationService = publicationService; } @@ -465,7 +465,7 @@ public class ImportDocumentAction extends UploadBaseNextAction { * Set the stepService. * @param stepService the stepService to set */ - public void setStepService(StepService stepService) { + public void setStepService(final StepService stepService) { _stepService = stepService; } @@ -481,7 +481,7 @@ public class ImportDocumentAction extends UploadBaseNextAction { * Set the documentService. * @param documentService the documentService to set */ - public void setDocumentService(DocumentService documentService) { + public void setDocumentService(final DocumentService documentService) { _documentService = documentService; } @@ -497,7 +497,7 @@ public class ImportDocumentAction extends UploadBaseNextAction { * Set the repositoryService. * @param repositoryService the repositoryService to set */ - public void setRepositoryService(RepositoryService repositoryService) { + public void setRepositoryService(final RepositoryService repositoryService) { _repositoryService = repositoryService; } @@ -513,7 +513,7 @@ public class ImportDocumentAction extends UploadBaseNextAction { * Set the documentTypeService. * @param documentTypeService the documentTypeService to set */ - public void setDocumentTypeService(DocumentTypeService documentTypeService) { + public void setDocumentTypeService(final DocumentTypeService documentTypeService) { _documentTypeService = documentTypeService; } @@ -529,7 +529,7 @@ public class ImportDocumentAction extends UploadBaseNextAction { * Set the menuProperty. * @param menuProperty the menuProperty to set */ - public void setMenuProperty(String menuProperty) { + public void setMenuProperty(final String menuProperty) { this._menuProperty = menuProperty; } @@ -545,7 +545,7 @@ public class ImportDocumentAction extends UploadBaseNextAction { * Set the _titleProperty. * @param _titleProperty the titleProperty to set */ - public void setTitleProperty(String titleProperty) { + public void setTitleProperty(final String titleProperty) { _titleProperty = titleProperty; } @@ -561,7 +561,7 @@ public class ImportDocumentAction extends UploadBaseNextAction { * Set the editDisabledProperty. * @param editDisabledProperty the editDisabledProperty to set */ - public final void setEditDisabledProperty(String editDisabledProperty) { + public final void setEditDisabledProperty(final String editDisabledProperty) { _editDisabledProperty = editDisabledProperty; } diff --git a/Workspace/Siman/src/org/splat/simer/NewScenarioAction.java b/Workspace/Siman/src/org/splat/simer/NewScenarioAction.java index c20b83d..024b5fd 100644 --- a/Workspace/Siman/src/org/splat/simer/NewScenarioAction.java +++ b/Workspace/Siman/src/org/splat/simer/NewScenarioAction.java @@ -105,6 +105,8 @@ public class NewScenarioAction extends Action { setToolProperty("none"); setLeftMenuProperty("scenario"); initializationFullScreenContext(_menuProperty, _titleProperty, _editDisabledProperty, _toolProperty, _leftMenuProperty); + + setActionType("focus"); return SUCCESS; } @@ -128,6 +130,8 @@ public class NewScenarioAction extends Action { setLeftMenuProperty("scenario"); initializationFullScreenContext(_menuProperty, _titleProperty, _editDisabledProperty, _toolProperty, _leftMenuProperty); + setActionType("none"); + return SUCCESS; } @@ -212,23 +216,23 @@ public class NewScenarioAction extends Action { return mytitle; } - public void setCancel (boolean cancel) { + public void setCancel (final boolean cancel) { // -------------------------------------- action = ToDo.cancel; } - public void setSave (boolean save) { + public void setSave (final boolean save) { // ---------------------------------- action = ToDo.save; } - public void setSelectedScenario (String index) { + public void setSelectedScenario (final String index) { // ---------------------------------------------- scindex = Integer.valueOf(index); } - public void setSelection (String step) { + public void setSelection (final String step) { // -------------------------------------- selection = step; } - public void setTitle (String title) { + public void setTitle (final String title) { // ----------------------------------- mytitle = title; } @@ -252,7 +256,7 @@ public class NewScenarioAction extends Action { * the projectElementService to set */ public void setProjectElementService( - ProjectElementService projectElementService) { + final ProjectElementService projectElementService) { _projectElementService = projectElementService; } @@ -268,7 +272,7 @@ public class NewScenarioAction extends Action { * Set the menu. * @param menu the menu to set */ - public void setMenu(Menu menu) { + public void setMenu(final Menu menu) { _menu = menu; } @@ -284,7 +288,7 @@ public class NewScenarioAction extends Action { * Set the scenarioService. * @param scenarioService the scenarioService to set */ - public void setScenarioService(ScenarioService scenarioService) { + public void setScenarioService(final ScenarioService scenarioService) { _scenarioService = scenarioService; } @@ -300,7 +304,7 @@ public class NewScenarioAction extends Action { * Set the menuProperty. * @param menuProperty the menuProperty to set */ - public void setMenuProperty(String menuProperty) { + public void setMenuProperty(final String menuProperty) { this._menuProperty = menuProperty; } @@ -316,7 +320,7 @@ public class NewScenarioAction extends Action { * Set the _titleProperty. * @param _titleProperty the titleProperty to set */ - public void setTitleProperty(String titleProperty) { + public void setTitleProperty(final String titleProperty) { _titleProperty = titleProperty; } @@ -332,7 +336,7 @@ public class NewScenarioAction extends Action { * Set the _editDisabledProperty. * @param _editDisabledProperty the _editDisabledProperty to set */ - public void setEditDisabledProperty(String _editDisabledProperty) { + public void setEditDisabledProperty(final String _editDisabledProperty) { this._editDisabledProperty = _editDisabledProperty; } diff --git a/Workspace/Siman/src/org/splat/simer/NewStudyAction.java b/Workspace/Siman/src/org/splat/simer/NewStudyAction.java index 40ae3ff..8020aff 100644 --- a/Workspace/Siman/src/org/splat/simer/NewStudyAction.java +++ b/Workspace/Siman/src/org/splat/simer/NewStudyAction.java @@ -162,6 +162,7 @@ public class NewStudyAction extends Action { return SUCCESS; } catch (Exception error) { LOG.error("Unable to save the study, reason:", error); + setErrorCode("message.error.newstudy"); setMenuProperty("none"); initializationScreenContext(_menuProperty); return ERROR; diff --git a/Workspace/Siman/src/org/splat/simer/NotYetImplementedAction.java b/Workspace/Siman/src/org/splat/simer/NotYetImplementedAction.java index a2a4f66..5e21197 100644 --- a/Workspace/Siman/src/org/splat/simer/NotYetImplementedAction.java +++ b/Workspace/Siman/src/org/splat/simer/NotYetImplementedAction.java @@ -52,6 +52,8 @@ public class NotYetImplementedAction extends Action { setToolProperty("none"); setLeftMenuProperty("study"); initializationFullScreenContext(_menuProperty, _titleProperty, _editDisabledProperty, _toolProperty, _leftMenuProperty); + + setErrorCode("message.error.notyetimplemented"); return SUCCESS; } @@ -68,7 +70,7 @@ public class NotYetImplementedAction extends Action { * Set the menuProperty. * @param menuProperty the menuProperty to set */ - public void setMenuProperty(String menuProperty) { + public void setMenuProperty(final String menuProperty) { this._menuProperty = menuProperty; } @@ -84,7 +86,7 @@ public class NotYetImplementedAction extends Action { * Set the _titleProperty. * @param _titleProperty the titleProperty to set */ - public void setTitleProperty(String titleProperty) { + public void setTitleProperty(final String titleProperty) { _titleProperty = titleProperty; } @@ -100,7 +102,7 @@ public class NotYetImplementedAction extends Action { * Set the editDisabledProperty. * @param editDisabledProperty the editDisabledProperty to set */ - public final void setEditDisabledProperty(String editDisabledProperty) { + public final void setEditDisabledProperty(final String editDisabledProperty) { _editDisabledProperty = editDisabledProperty; } diff --git a/Workspace/Siman/src/org/splat/simer/StudyPropertiesAction.java b/Workspace/Siman/src/org/splat/simer/StudyPropertiesAction.java index 452ee07..00efb1d 100644 --- a/Workspace/Siman/src/org/splat/simer/StudyPropertiesAction.java +++ b/Workspace/Siman/src/org/splat/simer/StudyPropertiesAction.java @@ -192,6 +192,7 @@ public class StudyPropertiesAction extends DisplayStudyStepAction { setToolProperty("back"); setLeftMenuProperty("open"); initializationFullScreenContext(_menuProperty, _titleProperty, _editDisabledProperty, _toolProperty, _leftMenuProperty); + setActionType("edititle"); return SUCCESS; } @@ -238,6 +239,7 @@ public class StudyPropertiesAction extends DisplayStudyStepAction { setLeftMenuProperty("open"); initializationFullScreenContext(_menuProperty, _titleProperty, _editDisabledProperty, _toolProperty, _leftMenuProperty); + setActionType("edibutor"); return SUCCESS; } @@ -289,6 +291,8 @@ public class StudyPropertiesAction extends DisplayStudyStepAction { setLeftMenuProperty("open"); initializationFullScreenContext(_menuProperty, _titleProperty, _editDisabledProperty, _toolProperty, _leftMenuProperty); + setActionType("edicycle"); + return SUCCESS; } @@ -435,57 +439,57 @@ public class StudyPropertiesAction extends DisplayStudyStepAction { // Setters // ============================================================================================================================== - public void setCandidates(String indices) { + public void setCandidates(final String indices) { // ------------------------------------------ candidates = indices; } - public void setCycle(String type) { + public void setCycle(final String type) { // ---------------------------------- edicycle = type; } - public void setMembers(String indices) { + public void setMembers(final String indices) { // --------------------------------------- contributors = indices; } - public void setDocumentType(String index) { + public void setDocumentType(final String index) { // ------------------------------------------ type = Integer.valueOf(index); } - public void setApprover(String index) { + public void setApprover(final String index) { // -------------------------------------- approver = Integer.valueOf(index); } - public void setPublisher(String index) { + public void setPublisher(final String index) { // --------------------------------------- publisher = Integer.valueOf(index); } - public void setReviewer(String index) { + public void setReviewer(final String index) { // -------------------------------------- reviewer = Integer.valueOf(index); } - public void setTitle(String title) { + public void setTitle(final String title) { // ----------------------------------- stitle = title; } - public void setSaveTitle(String save) { + public void setSaveTitle(final String save) { // -------------------------------------- tosave = Save.title; } - public void setSaveContributors(String save) { + public void setSaveContributors(final String save) { // --------------------------------------------- tosave = Save.contributor; } - public void setSaveCycle(String save) { + public void setSaveCycle(final String save) { // -------------------------------------- tosave = Save.cycle; } @@ -495,6 +499,7 @@ public class StudyPropertiesAction extends DisplayStudyStepAction { * * @return the studyService */ + @Override public StudyService getStudyService() { return _studyService; } @@ -505,7 +510,8 @@ public class StudyPropertiesAction extends DisplayStudyStepAction { * @param studyService * the studyService to set */ - public void setStudyService(StudyService studyService) { + @Override + public void setStudyService(final StudyService studyService) { _studyService = studyService; } @@ -524,7 +530,7 @@ public class StudyPropertiesAction extends DisplayStudyStepAction { * @param documentTypeService * the documentTypeService to set */ - public void setDocumentTypeService(DocumentTypeService documentTypeService) { + public void setDocumentTypeService(final DocumentTypeService documentTypeService) { _documentTypeService = documentTypeService; } @@ -540,7 +546,7 @@ public class StudyPropertiesAction extends DisplayStudyStepAction { * Set the userService. * @param userService the userService to set */ - public void setUserService(UserService userService) { + public void setUserService(final UserService userService) { _userService = userService; } @@ -548,6 +554,7 @@ public class StudyPropertiesAction extends DisplayStudyStepAction { * Get the menuProperty. * @return the menuProperty */ + @Override public String getMenuProperty() { return _menuProperty; } @@ -556,7 +563,8 @@ public class StudyPropertiesAction extends DisplayStudyStepAction { * Set the menuProperty. * @param menuProperty the menuProperty to set */ - public void setMenuProperty(String menuProperty) { + @Override + public void setMenuProperty(final String menuProperty) { this._menuProperty = menuProperty; } @@ -564,6 +572,7 @@ public class StudyPropertiesAction extends DisplayStudyStepAction { * Get the _titleProperty. * @return the _titleProperty */ + @Override public String getTitleProperty() { return _titleProperty; } @@ -572,7 +581,8 @@ public class StudyPropertiesAction extends DisplayStudyStepAction { * Set the _titleProperty. * @param _titleProperty the titleProperty to set */ - public void setTitleProperty(String titleProperty) { + @Override + public void setTitleProperty(final String titleProperty) { _titleProperty = titleProperty; } @@ -580,6 +590,7 @@ public class StudyPropertiesAction extends DisplayStudyStepAction { * Get the editDisabledProperty. * @return the editDisabledProperty */ + @Override public final String getEditDisabledProperty() { return _editDisabledProperty; } @@ -588,7 +599,8 @@ public class StudyPropertiesAction extends DisplayStudyStepAction { * Set the editDisabledProperty. * @param editDisabledProperty the editDisabledProperty to set */ - public final void setEditDisabledProperty(String editDisabledProperty) { + @Override + public final void setEditDisabledProperty(final String editDisabledProperty) { _editDisabledProperty = editDisabledProperty; } @@ -596,6 +608,7 @@ public class StudyPropertiesAction extends DisplayStudyStepAction { * Get the toolProperty. * @return the toolProperty */ + @Override public String getToolProperty() { return _toolProperty; } @@ -604,6 +617,7 @@ public class StudyPropertiesAction extends DisplayStudyStepAction { * Set the toolProperty. * @param toolProperty the toolProperty to set */ + @Override public void setToolProperty(final String toolProperty) { _toolProperty = toolProperty; } @@ -612,6 +626,7 @@ public class StudyPropertiesAction extends DisplayStudyStepAction { * Get the leftMenuProperty. * @return the leftMenuProperty */ + @Override public String getLeftMenuProperty() { return _leftMenuProperty; } @@ -620,6 +635,7 @@ public class StudyPropertiesAction extends DisplayStudyStepAction { * Set the leftMenuProperty. * @param leftMenuProperty the leftMenuProperty to set */ + @Override public void setLeftMenuProperty(final String leftMenuProperty) { _leftMenuProperty = leftMenuProperty; } diff --git a/Workspace/Siman/src/org/splat/simer/UploadAction.java b/Workspace/Siman/src/org/splat/simer/UploadAction.java index 4965126..b9a6e6f 100644 --- a/Workspace/Siman/src/org/splat/simer/UploadAction.java +++ b/Workspace/Siman/src/org/splat/simer/UploadAction.java @@ -101,6 +101,8 @@ public class UploadAction extends Action { setToolProperty("none"); setLeftMenuProperty("study"); initializationFullScreenContext(_menuProperty, _titleProperty, _editDisabledProperty, _toolProperty, _leftMenuProperty); + + setErrorCode("message.error.outofmemory"); return "outofmemory"; } @@ -126,31 +128,31 @@ public class UploadAction extends Action { return next; } - public void setCancel (boolean back) { + public void setCancel (final boolean back) { // ------------------------------------ this.action = ToDo.cancel; } - public void setDoIt (boolean upload) { + public void setDoIt (final boolean upload) { // -------------------------------- this.action = ToDo.upload; } - public void setIndex (String index) { + public void setIndex (final String index) { // ----------------------------------- this.index = index; } - public void setNextAction (String next) { + public void setNextAction (final String next) { // --------------------------------------- this.next = next; } - public void setUpload (File upload) { + public void setUpload (final File upload) { // ----------------------------------- this.upload = upload; } - public void setUploadFileName (String name) { + public void setUploadFileName (final String name) { // ------------------------------------------- this.uploadFileName = name; } - public void setUploadContentType (String mime) { + public void setUploadContentType (final String mime) { // ---------------------------------------------- this.uploadMimeType = mime; } @@ -167,7 +169,7 @@ public class UploadAction extends Action { * Set the repositoryService. * @param repositoryService the repositoryService to set */ - public void setRepositoryService(RepositoryService repositoryService) { + public void setRepositoryService(final RepositoryService repositoryService) { _repositoryService = repositoryService; } @@ -183,7 +185,7 @@ public class UploadAction extends Action { * Set the menuProperty. * @param menuProperty the menuProperty to set */ - public void setMenuProperty(String menuProperty) { + public void setMenuProperty(final String menuProperty) { this._menuProperty = menuProperty; } @@ -197,9 +199,9 @@ public class UploadAction extends Action { /** * Set the _titleProperty. - * @param _titleProperty the titleProperty to set + * @param titleProperty the titleProperty to set */ - public void setTitleProperty(String titleProperty) { + public void setTitleProperty(final String titleProperty) { _titleProperty = titleProperty; } @@ -215,7 +217,7 @@ public class UploadAction extends Action { * Set the _editDisabledProperty. * @param _editDisabledProperty the _editDisabledProperty to set */ - public void setEditDisabledProperty(String _editDisabledProperty) { + public void setEditDisabledProperty(final String _editDisabledProperty) { this._editDisabledProperty = _editDisabledProperty; } diff --git a/Workspace/Siman/src/org/splat/simer/VersionDocumentAction.java b/Workspace/Siman/src/org/splat/simer/VersionDocumentAction.java index f962e76..ac94f13 100644 --- a/Workspace/Siman/src/org/splat/simer/VersionDocumentAction.java +++ b/Workspace/Siman/src/org/splat/simer/VersionDocumentAction.java @@ -201,7 +201,7 @@ public class VersionDocumentAction extends UploadBaseNextAction { } _version = newver.toString(); } catch (Exception e) { - setErrorCode("version.mismatch"); + setErrorCode("message.error.version.mismatch"); res = false; } } @@ -218,13 +218,13 @@ public class VersionDocumentAction extends UploadBaseNextAction { try { check.parse(_date); } catch (ParseException e) { - setErrorCode("format.date"); + setErrorCode("message.error.format.date"); res = false; } } } } else { - setErrorCode("reference.mismatch"); + setErrorCode("message.error.reference.mismatch"); res = false; } } @@ -276,10 +276,10 @@ public class VersionDocumentAction extends UploadBaseNextAction { res = SUCCESS; } catch (FileNotFoundException error) { LOG.error("Reason:", error); - setErrorCode("import.file"); + setErrorCode("message.error.import.file"); } catch (Exception error) { LOG.error("Reason:", error); - setErrorCode("internal"); + setErrorCode("message.error.internal"); } if (!SUCCESS.equals(res)) { setToolProperty(Constants.NONE); diff --git a/Workspace/Siman/src/struts.xml b/Workspace/Siman/src/struts.xml index e044706..50f5fd1 100644 --- a/Workspace/Siman/src/struts.xml +++ b/Workspace/Siman/src/struts.xml @@ -23,26 +23,26 @@ - /welcome.jsp - /error.jsp?error=initialization + page.welcome + page.exception - /home.jsp + page.home select?menu=search study/step-study study/step-knowledge - page.login - /home.jsp?error=login + page.login + page.home - /home.jsp - /home.jsp + page.home + page.home select?menu=search study/step-study study/step-knowledge - /home.jsp - /home.jsp + page.home + page.home study/new-empty @@ -61,42 +61,46 @@ + + + + - /study/error.jsp?message=notyetimplemented + page.error.study - /study/newStudy.jsp + page.newstudy open-study?selection=0.1 - /study/newStudy.jsp - /home.jsp?error=newstudy + page.newstudy + page.home - /study/searchStudy.jsp - /home.jsp + page.searchstudy + page.home - /study/searchStudy.jsp?action=setContext - /study/searchStudy.jsp - /study/searchStudy.jsp + page.searchstudy + page.searchstudy + page.searchstudy search-study - /study/searchKnowledge.jsp + page.searchknowledge - /study/searchKnowledge.jsp?action=setContext - /study/searchKnowledge.jsp - /study/searchKnowledge.jsp + page.searchknowledge + page.searchknowledge + page.searchknowledge search-knowledge @@ -107,79 +111,79 @@ - /study/displayStudyStep.jsp + page.displaystudy - /study/displayStudyStep.jsp + page.displaystudy - /study/displayStudyStep.jsp + page.displaystudy - /study/displayStudyStep.jsp + page.displaystudy - /home.jsp + page.home - /study/displayStudyProperties.jsp - /study/editStudyProperties.jsp + page.displaystudyproperties + page.editstudyproperties - /study/displayKnowledge.jsp + page.displayknowledge - /study/displayKnowledge.jsp + page.displayknowledge - /study/displayKnowledge.jsp + page.displayknowledge - /study/displayKnowledge.jsp + page.displayknowledge - /home.jsp + page.home - /study/displayStudyStep.jsp + page.displaystudy - /study/newScenario.jsp?init=focus + page.newscenario - /study/editStudyProperties.jsp?action=edititle + page.editstudyproperties - /study/editStudyProperties.jsp?action=edibutor + page.editstudyproperties - /study/editStudyProperties.jsp?action=edicycle + page.editstudyproperties - /study/newScenario.jsp + page.newscenario step-study step-study - /study/displayStudyStep.jsp?error=addScenario + page.displaystudy - /study/editStudyProperties.jsp + page.editstudyproperties - /study/editScenarioProperties.jsp + page.editscenarioproperties - /study/displayStudyStep.jsp + page.displaystudy - /study/upload.jsp + page.uploadstudy step-study import-document?fileName=%{fileName} version-document?index=%{index}&fileName=%{fileName} attach-document?index=%{index}&fileName=%{fileName} - /study/error.jsp?message=outofmemory + page.error.study - /study/importDocument.jsp - /study/importError.jsp?message=%{errorCode} + page.importdocument + page.importerror step-study step-study - /study/importError.jsp?message=%{errorCode}&action=back + page.importerror - /study/versionDocument.jsp - /study/importError.jsp?message=%{errorCode} + page.versiondocument + page.importerror step-study step-study - /study/importError.jsp?message=%{errorCode}&action=back + page.importerror - /study/displayStudyStep.jsp?action=display + page.displaystudy - /study/displayStudyStep.jsp + page.displaystudy - /study/displayStudyStep.jsp?action=display + page.displaystudy - /study/displayStudyStep.jsp - /study/displayStudyStep.jsp?error=removeDocument + page.displaystudy + page.displaystudy - /sadmin/indexStudies.jsp + page.indexstudies ../study/search-study - /sadmin/upload.jsp + page.uploadsadmin importuser?fileName=%{fileName} - /sadmin/displayUser.jsp + page.displayuser