*/
public enum ProgressState {
- inPROGRESS, // Represents inWORK, inDRAFT and inCHECK states for search purpose
- inWORK, inDRAFT, inCHECK, APPROVED,
- EXTERN, // Document-specific state representing documents produced outside studies
- TEMPLATE // Study-specific state qualifying typical reference studies
+ /**
+ * Represents inWORK, inDRAFT and inCHECK states for search purpose.
+ */
+ inPROGRESS,
+ inWORK,
+ inDRAFT,
+ inCHECK,
+ APPROVED,
+ /**
+ * Document-specific state representing documents produced outside studies.
+ */
+ EXTERN,
+ /**
+ * Study-specific state qualifying typical reference studies.
+ */
+ TEMPLATE;
}
\ No newline at end of file
<%@
taglib prefix="s" uri="/struts-tags"
%>
-<!-- Initialization of the context
- -->
-<% String type = request.getParameter("entity"); // Study or Knowledge Element
- String disabled = request.getParameter("disable"); // State of right buttons
- OpenObject entity = (OpenObject)session.getAttribute(type + ".open"); // Active entity (Proxy + getSelection())
-%>
-<s:set var="entitype"><%=type%></s:set>
-<s:set var="disabled"><%=disabled%></s:set>
-<s:set var="proxtate"><%=entity.getProgressState()%></s:set>
+
+<s:set var="entitype" value="titleBarSettings.entryType" />
+<s:set var="disabled" value="titleBarSettings.closeDisabledProperty" />
+<s:set var="proxtate" value="titleBarSettings.progressState" />
<s:url id="close" namespace="/study" action="close-%{#entitype}"></s:url>
<s:url id="refresh" namespace="/study" action="open-%{#entitype}">
- <s:param name="selection"><%=entity.getSelection()%></s:param>
+ <s:param name="selection" value="titleBarSettings.selectionState" />
</s:url>
<div id=title-bar>
</s:a>
</s:else>
</td>
- <td>
- <b><%=entity.getType()%>: </b><%=entity.getTitle()%>
+ <td>
+ <b><s:property value="titleBarSettings.entryType"/>: </b><s:property value="titleBarSettings.entryTitle"/>
</td>
<td align=right>
<table border="0" cellpadding="0" cellspacing="0" class="text">
<!-- Title-bar
=============================================================================================================================
-->
- <jsp:include page="/jsp/titlebar.jsp">
- <jsp:param name="entity" value="knowledge" />
- </jsp:include>
+ <jsp:include page="/jsp/titlebar.jsp" />
<!-- Left pane
=============================================================================================================================
<!-- Title-bar
=============================================================================================================================
-->
- <jsp:include page="/jsp/titlebar.jsp">
- <jsp:param name="entity" value="study" />
- <jsp:param name="disable" value="true" />
- </jsp:include>
+ <jsp:include page="/jsp/titlebar.jsp" />
<!-- Left pane
=============================================================================================================================
<!-- Title-bar
=============================================================================================================================
-->
- <jsp:include page="/jsp/titlebar.jsp">
- <jsp:param name="entity" value="study" />
- </jsp:include>
+ <jsp:include page="/jsp/titlebar.jsp" />
<!-- Left pane
=============================================================================================================================
<!-- Title-bar
=============================================================================================================================
-->
- <jsp:include page="/jsp/titlebar.jsp">
- <jsp:param name="entity" value="study" />
- <jsp:param name="disable" value="true" />
- </jsp:include>
+ <jsp:include page="/jsp/titlebar.jsp" />
<!-- Left pane
=============================================================================================================================
<!-- Title-bar
=============================================================================================================================
-->
- <jsp:include page="/jsp/titlebar.jsp">
- <jsp:param name="entity" value="study" />
- <jsp:param name="disable" value="true" />
- </jsp:include>
+ <jsp:include page="/jsp/titlebar.jsp" />
<!-- Left pane
=============================================================================================================================
<!-- Title-bar
=============================================================================================================================
-->
- <jsp:include page="/jsp/titlebar.jsp">
- <jsp:param name="entity" value="study" />
- <jsp:param name="disable" value="true" />
- </jsp:include>
+ <jsp:include page="/jsp/titlebar.jsp" />
<!-- Left pane
=============================================================================================================================
<!-- Title-bar
=============================================================================================================================
-->
- <jsp:include page="/jsp/titlebar.jsp">
- <jsp:param name="entity" value="study" />
- <jsp:param name="disable" value="true" />
- </jsp:include>
+ <jsp:include page="/jsp/titlebar.jsp" />
<!-- Left pane
=============================================================================================================================
<!-- Title-bar
=============================================================================================================================
-->
- <jsp:include page="/jsp/titlebar.jsp">
- <jsp:param name="entity" value="study" />
- <jsp:param name="disable" value="true" />
- </jsp:include>
+ <jsp:include page="/jsp/titlebar.jsp" />
<!-- Left pane
=============================================================================================================================
<!-- Title-bar
=============================================================================================================================
-->
- <jsp:include page="/jsp/titlebar.jsp">
- <jsp:param name="entity" value="study" />
- <jsp:param name="disable" value="true" />
- </jsp:include>
-
+ <jsp:include page="/jsp/titlebar.jsp" />
<!-- Left pane
=============================================================================================================================
-->
<!-- Title-bar
=============================================================================================================================
-->
- <jsp:include page="/jsp/titlebar.jsp">
- <jsp:param name="entity" value="study" />
- <jsp:param name="disable" value="true" />
- </jsp:include>
+ <jsp:include page="/jsp/titlebar.jsp" />
<!-- Left pane
=============================================================================================================================
<!-- Title-bar
=============================================================================================================================
-->
- <jsp:include page="/jsp/titlebar.jsp">
- <jsp:param name="entity" value="study" />
- <jsp:param name="disable" value="true" />
- </jsp:include>
+ <jsp:include page="/jsp/titlebar.jsp" />
<!-- Left pane
=============================================================================================================================
private OpenStudy _openStudy;
private OpenKnowledge _openKnowledge;
+ /**
+ * MenuBarSettings bean.
+ */
private MenuBarSettings _menuBarSettings;
+ /**
+ * TitleBarSettings bean.
+ */
+ private TitleBarSettings _titleBarSettings;
+
private HttpServletRequest request;
/**
if (session.get("study.open") == null) {
getMenuBarSettings().setIsStudyNull(true);
- logger.debug("MKA: setIsStudyNull = true");
} else {
getMenuBarSettings().setIsStudyNull(false);
- logger.debug("MKA: setIsStudyNull = false");
}
if (session.get("knowledge.open") == null) {
getMenuBarSettings().setIsKnowledgeNull(true);
- logger.debug("MKA: setIsKnowledgeNull = true");
} else {
getMenuBarSettings().setIsKnowledgeNull(false);
- logger.debug("MKA: setIsKnowledgeNull = false");
}
ApplicationRights userRights = (ApplicationRights)session.get("user.rights");
}
+ /**
+ * Initialization the Context for Menu Bar and Tool Bar.
+ *
+ * @param titleProperty - The title of the open study/knowledge.
+ * @param editDisabledProperty - Property that indicates whether the current open study is editable or not.
+ */
+ public void initializationContext(final String titleProperty, final String editDisabledProperty) {
+
+ initializationContext();
+
+ OpenObject entity = (OpenObject)session.get(titleProperty + ".open");
+
+ getTitleBarSettings().setProgressState(entity.getProgressState().toString());
+ getTitleBarSettings().setSelectionState(entity.getSelection());
+ getTitleBarSettings().setEntryType(entity.getType());
+ getTitleBarSettings().setEntryTitle(entity.getTitle());
+ getTitleBarSettings().setEditDisabledProperty(editDisabledProperty);
+ }
+
/**
* Initialization of the screen context for menu bar.
+ *
+ * @param menuProperty - the property of the menu bar.
*/
public void initializationScreenContext(final String menuProperty) {
initializationContext();
getMenuBarSettings().intializeMenuBar(menuProperty);
}
+
+ /**
+ * Initialization of the screen context for menu bar and tool bar.
+ *
+ * @param menuProperty - the property of the menu bar.
+ * @param titleProperty - The title of the open study/knowledge.
+ * @param editDisabledProperty - Property that indicates whether the current open study is editable or not.
+ */
+ public void initializationScreenContext(final String menuProperty,
+ final String titleProperty, final String editDisabledProperty) {
+
+ initializationContext(titleProperty, editDisabledProperty);
+ getMenuBarSettings().intializeMenuBar(menuProperty);
+ }
// ==============================================================================================================================
// Getters and setters
// ==============================================================================================================================
public void setMenuBarSettings(final MenuBarSettings menuBarSettings) {
_menuBarSettings = menuBarSettings;
}
+
+ /**
+ * Get the _titleBarSettings.
+ * @return the _titleBarSettings
+ */
+ public TitleBarSettings getTitleBarSettings() {
+ return _titleBarSettings;
+ }
+ /**
+ * Set the titleBarSettings.
+ * @param titleBarSettings the titleBarSettings to set
+ */
+ public void setTitleBarSettings(TitleBarSettings titleBarSettings) {
+ _titleBarSettings = titleBarSettings;
+ }
}
\ No newline at end of file
* It can be: none, create, open, study, knowledge, sysadmin, help.
*/
private String _menuProperty;
+
+ /**
+ * Value of the title bar property.
+ * It can be: study, knowledge.
+ */
+ private String _titleProperty;
+
+ /**
+ * Property that indicates whether the current open study is editable or not.
+ * On the screen it looks like pen on the status icon, pop-up menu also can be called.
+ * It is necessary for correct building the title bar.
+ */
+ private String _editDisabledProperty = "false";
// ==============================================================================================================================
// Action methods
getSession().put("menu.knowledge", myknelm.getMenu());
setMenuProperty("knowledge");
- initializationScreenContext(_menuProperty);
+ setTitleProperty("knowledge");
+ initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
return SUCCESS;
}
}
setMenuProperty("knowledge");
- initializationScreenContext(_menuProperty);
+ setTitleProperty("knowledge");
+ initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
return SUCCESS;
}
myknelm.reduceDocument(myindex);
setMenuProperty("knowledge");
- initializationScreenContext(_menuProperty);
+ setTitleProperty("knowledge");
+ initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
return SUCCESS;
}
myknelm.reduceKnowledge(myindex);
setMenuProperty("knowledge");
- initializationScreenContext(_menuProperty);
+ setTitleProperty("knowledge");
+ initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
return SUCCESS;
}
public void setMenuProperty(String menuProperty) {
this._menuProperty = menuProperty;
}
+
+ /**
+ * Get the _titleProperty.
+ * @return the _titleProperty
+ */
+ public String getTitleProperty() {
+ return _titleProperty;
+ }
+
+ /**
+ * Set the _titleProperty.
+ * @param _titleProperty the titleProperty to set
+ */
+ public void setTitleProperty(String titleProperty) {
+ _titleProperty = titleProperty;
+ }
+
+ /**
+ * Get the _editDisabledProperty.
+ * @return the _editDisabledProperty
+ */
+ public final String getEditDisabledProperty() {
+ return _editDisabledProperty;
+ }
+
+ /**
+ * Set the _editDisabledProperty.
+ * @param _editDisabledProperty the _editDisabledProperty to set
+ */
+ public final void setEditDisabledProperty(String _editDisabledProperty) {
+ this._editDisabledProperty = _editDisabledProperty;
+ }
+
+
}
\ No newline at end of file
import org.splat.wapp.PopupMenu;
import org.splat.wapp.SimpleMenu;
+/**
+ * Presents the current open study information.
+ * @author Daniel Brunier-Coulin.
+ *
+ */
public class DisplayStudyStepAction extends DisplayBaseAction {
/**
* It can be: none, create, open, study, knowledge, sysadmin, help.
*/
private String _menuProperty;
+
+ /**
+ * Value of the title bar property.
+ * It can be: study, knowledge.
+ */
+ private String _titleProperty;
+
+ /**
+ * Property that indicates whether the current open study is editable or not.
+ * On the screen it looks like pen on the status icon, pop-up menu also can be called.
+ * It is necessary for correct building the title bar.
+ */
+ private String _editDisabledProperty = "false";
// ==============================================================================================================================
// Action methods
getSession().put("menu.study", mystudy.getMenu());
setMenuProperty("study");
- initializationScreenContext(_menuProperty);
+ setTitleProperty("study");
+ initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
return SUCCESS;
}
}
setMenuProperty("study");
- initializationScreenContext(_menuProperty);
+ setTitleProperty("study");
+ initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
return SUCCESS;
}
mystudy.reduceDocument(myindex);
setMenuProperty("study");
- initializationScreenContext(_menuProperty);
+ setTitleProperty("study");
+ initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
return SUCCESS;
}
mystudy.reduceKnowledge(myindex);
setMenuProperty("study");
- initializationScreenContext(_menuProperty);
+ setTitleProperty("study");
+ initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
return SUCCESS;
}
public void setMenuProperty(String menuProperty) {
this._menuProperty = menuProperty;
}
+
+ /**
+ * Get the _titleProperty.
+ * @return the _titleProperty
+ */
+ public String getTitleProperty() {
+ return _titleProperty;
+ }
+
+ /**
+ * Set the _titleProperty.
+ * @param _titleProperty the titleProperty to set
+ */
+ public void setTitleProperty(String titleProperty) {
+ _titleProperty = titleProperty;
+ }
+
+ /**
+ * Get the editDisabledProperty.
+ * @return the editDisabledProperty
+ */
+ public String getEditDisabledProperty() {
+ return _editDisabledProperty;
+ }
+
+ /**
+ * Set the editDisabledProperty.
+ * @param editDisabledProperty the editDisabledProperty to set
+ */
+ public void setEditDisabledProperty(String editDisabledProperty) {
+ _editDisabledProperty = editDisabledProperty;
+ }
+
}
\ No newline at end of file
import java.io.File;
import java.util.Calendar;
-import org.splat.kernel.InvalidPropertyException;
import org.splat.dal.bo.kernel.User;
-import org.splat.dal.bo.som.Publication;
import org.splat.dal.bo.som.ConvertsRelation;
+import org.splat.dal.bo.som.Publication;
+import org.splat.kernel.InvalidPropertyException;
import org.splat.service.PublicationService;
import org.splat.service.StepService;
import org.splat.service.technical.RepositoryService;
* It can be: none, create, open, study, knowledge, sysadmin, help.
*/
private String _menuProperty;
+
+ /**
+ * Value of the title bar property.
+ * It can be: study, knowledge.
+ */
+ private String _titleProperty;
+
+ /**
+ * Property that indicates whether the current open study is editable or not.
+ * On the screen it looks like pen on the status icon, pop-up menu also can be called.
+ * It is necessary for correct building the title bar.
+ */
+ private String _editDisabledProperty = "false";
/**
* Operations enumeration.
mystudy = getOpenStudy();
setMenuProperty("study");
- initializationScreenContext(_menuProperty);
+ setTitleProperty("study");
+ initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
return SUCCESS;
}
public String doSetDocument() {
setMenuProperty("study");
- initializationScreenContext(_menuProperty);
+ setTitleProperty("study");
+ initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
try {
mystudy = getOpenStudy();
// Transaction transax = connex.beginTransaction();
setMenuProperty("study");
- initializationScreenContext(_menuProperty);
+ setTitleProperty("study");
+ initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
try {
// Getting user inputs
public String doDeleteDocument() {
setMenuProperty("study");
- initializationScreenContext(_menuProperty);
+ setTitleProperty("study");
+ initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
try {
mystudy = getOpenStudy();
public void setMenuProperty(String menuProperty) {
this._menuProperty = menuProperty;
}
+
+ /**
+ * Get the _titleProperty.
+ * @return the _titleProperty
+ */
+ public String getTitleProperty() {
+ return _titleProperty;
+ }
+
+ /**
+ * Set the _titleProperty.
+ * @param _titleProperty the titleProperty to set
+ */
+ public void setTitleProperty(String titleProperty) {
+ _titleProperty = titleProperty;
+ }
+
+ /**
+ * Get the editDisabledProperty.
+ * @return the editDisabledProperty
+ */
+ public String getEditDisabledProperty() {
+ return _editDisabledProperty;
+ }
+
+ /**
+ * Set the editDisabledProperty.
+ * @param editDisabledProperty the editDisabledProperty to set
+ */
+ public void setEditDisabledProperty(String editDisabledProperty) {
+ _editDisabledProperty = editDisabledProperty;
+ }
+
+
+
+
}
\ No newline at end of file
* Value of the menu property. It can be: none, create, open, study, knowledge, sysadmin, help.
*/
private String _menuProperty;
+
+ /**
+ * Value of the title bar property.
+ * It can be: study, knowledge.
+ */
+ private String _titleProperty;
+
+ /**
+ * Property that indicates whether the current open study is editable or not.
+ * On the screen it looks like pen on the status icon, pop-up menu also can be called.
+ * It is necessary for correct building the title bar.
+ */
+ private String _editDisabledProperty = "false";
// ==============================================================================================================================
// Action methods
mystudy = getOpenStudy();
setMenuProperty("study");
- initializationScreenContext(_menuProperty);
+ setTitleProperty("study");
+ initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
return SUCCESS;
}
public String doSetKnowledge() {
setMenuProperty("study");
- initializationScreenContext(_menuProperty);
+ setTitleProperty("study");
+ initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
try {
User user = getConnectedUser();
getMenu("study").selects(mystudy.getSelection()); // Updates the menu icon, in case of last removed document
setMenuProperty("study");
- initializationScreenContext(_menuProperty);
+ setTitleProperty("study");
+ initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
return SUCCESS;
}
public void setMenuProperty(String menuProperty) {
this._menuProperty = menuProperty;
}
+
+ /**
+ * Get the _titleProperty.
+ * @return the _titleProperty
+ */
+ public String getTitleProperty() {
+ return _titleProperty;
+ }
+
+ /**
+ * Set the _titleProperty.
+ * @param _titleProperty the titleProperty to set
+ */
+ public void setTitleProperty(String titleProperty) {
+ _titleProperty = titleProperty;
+ }
+
+ /**
+ * Get the editDisabledProperty.
+ * @return the editDisabledProperty
+ */
+ public final String getEditDisabledProperty() {
+ return _editDisabledProperty;
+ }
+
+ /**
+ * Set the editDisabledProperty.
+ * @param editDisabledProperty the editDisabledProperty to set
+ */
+ public final void setEditDisabledProperty(String editDisabledProperty) {
+ _editDisabledProperty = editDisabledProperty;
+ }
+
+
}
\ No newline at end of file
* It can be: none, create, open, study, knowledge, sysadmin, help.
*/
private String _menuProperty;
+
+ /**
+ * Value of the title bar property.
+ * It can be: study, knowledge.
+ */
+ private String _titleProperty;
+
+ /**
+ * Property that indicates whether the current open study is editable or not.
+ * On the screen it looks like pen on the status icon, pop-up menu also can be called.
+ * It is necessary for correct building the title bar.
+ */
+ private String _editDisabledProperty = "false";
/**
* Serial version ID.
subject = label.getString("label.study") + " " + mystudy.getTitle();
setMenuProperty("study");
- initializationScreenContext(_menuProperty);
+ setTitleProperty("study");
+ setEditDisabledProperty("true");
+ initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
return SUCCESS;
}
public void setMenuProperty(String menuProperty) {
this._menuProperty = menuProperty;
}
+
+ /**
+ * Get the _titleProperty.
+ * @return the _titleProperty
+ */
+ public String getTitleProperty() {
+ return _titleProperty;
+ }
+
+ /**
+ * Set the _titleProperty.
+ * @param _titleProperty the titleProperty to set
+ */
+ public void setTitleProperty(String titleProperty) {
+ _titleProperty = titleProperty;
+ }
+
+ /**
+ * Get the editDisabledProperty.
+ * @return the editDisabledProperty
+ */
+ public final String getEditDisabledProperty() {
+ return _editDisabledProperty;
+ }
+
+ /**
+ * Set the editDisabledProperty.
+ * @param editDisabledProperty the editDisabledProperty to set
+ */
+ public final void setEditDisabledProperty(String editDisabledProperty) {
+ _editDisabledProperty = editDisabledProperty;
+ }
+
+
}
\ No newline at end of file
* It can be: none, create, open, study, knowledge, sysadmin, help.
*/
private String _menuProperty;
-
+
/**
- * Get the stepService.
- *
- * @return the stepService
+ * Value of the title bar property.
+ * It can be: study, knowledge.
*/
- public StepService getStepService() {
- return _stepService;
- }
-
+ private String _titleProperty;
+
/**
- * Set the stepService.
- *
- * @param stepService
- * the stepService to set
+ * Property that indicates whether the current open study is editable or not.
+ * On the screen it looks like pen on the status icon, pop-up menu also can be called.
+ * It is necessary for correct building the title bar.
*/
- public void setStepService(StepService stepService) {
- _stepService = stepService;
- }
+ private String _editDisabledProperty = "false";
private static final long serialVersionUID = -641719644024601042L;
contype = getInvolvedContexts();
setMenuProperty("study");
- initializationScreenContext(_menuProperty);
+ setTitleProperty("study");
+ initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
if (contype.isEmpty())
return "create";
mystudy = getOpenStudy();
setMenuProperty("study");
- initializationScreenContext(_menuProperty);
+ setTitleProperty("study");
+ initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
int typid = Integer.valueOf(selectype);
if (typid == 0)
mystudy = getOpenStudy();
setMenuProperty("study");
- initializationScreenContext(_menuProperty);
+ setTitleProperty("study");
+ initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
if (newtype.length() == 0 || value.length() == 0)
return INPUT;
public String doDeleteContext() {
setMenuProperty("study");
- initializationScreenContext(_menuProperty);
+ setTitleProperty("study");
+ initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
try {
mystudy = getOpenStudy();
// Transaction transax = connex.beginTransaction();
setMenuProperty("study");
- initializationScreenContext(_menuProperty);
+ setTitleProperty("study");
+ initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
try {
mystudy = getOpenStudy();
_simulationContextTypeService = simulationContextTypeService;
}
+ /**
+ * Get the stepService.
+ *
+ * @return the stepService
+ */
+ public StepService getStepService() {
+ return _stepService;
+ }
+
+ /**
+ * Set the stepService.
+ *
+ * @param stepService
+ * the stepService to set
+ */
+ public void setStepService(StepService stepService) {
+ _stepService = stepService;
+ }
+
/**
* Get the menuProperty.
* @return the menuProperty
public void setMenuProperty(String menuProperty) {
this._menuProperty = menuProperty;
}
+
+ /**
+ * Get the _titleProperty.
+ * @return the _titleProperty
+ */
+ public String getTitleProperty() {
+ return _titleProperty;
+ }
+
+ /**
+ * Set the _titleProperty.
+ * @param _titleProperty the titleProperty to set
+ */
+ public void setTitleProperty(String titleProperty) {
+ _titleProperty = titleProperty;
+ }
+
+ /**
+ * Get the editDisabledProperty.
+ * @return the editDisabledProperty
+ */
+ public final String getEditDisabledProperty() {
+ return _editDisabledProperty;
+ }
+
+ /**
+ * Set the editDisabledProperty.
+ * @param editDisabledProperty the editDisabledProperty to set
+ */
+ public final void setEditDisabledProperty(String editDisabledProperty) {
+ _editDisabledProperty = editDisabledProperty;
+ }
+
+
}
\ No newline at end of file
* It can be: none, create, open, study, knowledge, sysadmin, help.
*/
private String _menuProperty;
+
+ /**
+ * Value of the title bar property.
+ * It can be: study, knowledge.
+ */
+ private String _titleProperty;
+
+ /**
+ * Property that indicates whether the current open study is editable or not.
+ * On the screen it looks like pen on the status icon, pop-up menu also can be called.
+ * It is necessary for correct building the title bar.
+ */
+ private String _editDisabledProperty = "false";
// ==============================================================================================================================
// Action methods
mystudy.getPopup().setContext("study", mystudy.getStudyRights()); // The context has changed
setMenuProperty("study");
- initializationScreenContext(_menuProperty);
+ setTitleProperty("study");
+ initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
return SUCCESS;
}
public void setMenuProperty(String menuProperty) {
this._menuProperty = menuProperty;
}
+
+ /**
+ * Get the _titleProperty.
+ * @return the _titleProperty
+ */
+ public String getTitleProperty() {
+ return _titleProperty;
+ }
+
+ /**
+ * Set the _titleProperty.
+ * @param _titleProperty the titleProperty to set
+ */
+ public void setTitleProperty(String titleProperty) {
+ _titleProperty = titleProperty;
+ }
+ /**
+ * Get the editDisabledProperty.
+ * @return the editDisabledProperty
+ */
+ public final String getEditDisabledProperty() {
+ return _editDisabledProperty;
+ }
+ /**
+ * Set the editDisabledProperty.
+ * @param editDisabledProperty the editDisabledProperty to set
+ */
+ public final void setEditDisabledProperty(String editDisabledProperty) {
+ _editDisabledProperty = editDisabledProperty;
+ }
+
}
\ No newline at end of file
* It can be: none, create, open, study, knowledge, sysadmin, help.
*/
private String _menuProperty;
+
+ /**
+ * Value of the title bar property.
+ * It can be: study, knowledge.
+ */
+ private String _titleProperty;
+
+ /**
+ * Property that indicates whether the current open study is editable or not.
+ * On the screen it looks like pen on the status icon, pop-up menu also can be called.
+ * It is necessary for correct building the title bar.
+ */
+ private String _editDisabledProperty = "false";
// ==============================================================================================================================
// Action methods
public String doInitialize() {
setMenuProperty("study");
- initializationScreenContext(_menuProperty);
+ setTitleProperty("study");
+ setEditDisabledProperty("true");
+ initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
User user = getConnectedUser();
File updir = getRepositoryService().getDownloadDirectory(user);
// -------------------------
setMenuProperty("study");
- initializationScreenContext(_menuProperty);
+ setTitleProperty("study");
+ setEditDisabledProperty("true");
+ initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
if (action == ToDo.cancel)
return "cancel";
public void setMenuProperty(String menuProperty) {
this._menuProperty = menuProperty;
}
+
+ /**
+ * Get the _titleProperty.
+ * @return the _titleProperty
+ */
+ public String getTitleProperty() {
+ return _titleProperty;
+ }
+
+ /**
+ * Set the _titleProperty.
+ * @param _titleProperty the titleProperty to set
+ */
+ public void setTitleProperty(String titleProperty) {
+ _titleProperty = titleProperty;
+ }
+
+ /**
+ * Get the editDisabledProperty.
+ * @return the editDisabledProperty
+ */
+ public final String getEditDisabledProperty() {
+ return _editDisabledProperty;
+ }
+
+ /**
+ * Set the editDisabledProperty.
+ * @param editDisabledProperty the editDisabledProperty to set
+ */
+ public final void setEditDisabledProperty(String editDisabledProperty) {
+ _editDisabledProperty = editDisabledProperty;
+ }
+
+
}
\ No newline at end of file
*/
public void intializeMenuBar (final String menuProperty) {
- if ("none".equals(menuProperty)) {
- setIsMenuCreate(false);
- setIsMenuOpen(false);
- setIsMenuStudy(false);
- setIsMenuKnowledge(false);
- setIsMenuSysAdmin(false);
- setIsMenuHelp(false);
- } else if ("create".equals(menuProperty)) {
+ setIsMenuCreate(false);
+ setIsMenuOpen(false);
+ setIsMenuStudy(false);
+ setIsMenuKnowledge(false);
+ setIsMenuSysAdmin(false);
+ setIsMenuHelp(false);
+
+ if ("create".equals(menuProperty)) {
setIsMenuCreate(true);
- setIsMenuOpen(false);
- setIsMenuStudy(false);
- setIsMenuKnowledge(false);
- setIsMenuSysAdmin(false);
- setIsMenuHelp(false);
} else if ("open".equals(menuProperty)) {
- setIsMenuCreate(false);
setIsMenuOpen(true);
- setIsMenuStudy(false);
- setIsMenuKnowledge(false);
- setIsMenuSysAdmin(false);
- setIsMenuHelp(false);
} else if ("study".equals(menuProperty)) {
- setIsMenuCreate(false);
- setIsMenuOpen(false);
setIsMenuStudy(true);
- setIsMenuKnowledge(false);
- setIsMenuSysAdmin(false);
- setIsMenuHelp(false);
} else if ("knowledge".equals(menuProperty)) {
- setIsMenuCreate(false);
- setIsMenuOpen(false);
- setIsMenuStudy(false);
setIsMenuKnowledge(true);
- setIsMenuSysAdmin(false);
- setIsMenuHelp(false);
} else if ("sysadmin".equals(menuProperty)) {
- setIsMenuCreate(false);
- setIsMenuOpen(false);
- setIsMenuStudy(false);
- setIsMenuKnowledge(false);
setIsMenuSysAdmin(true);
- setIsMenuHelp(false);
} else if ("help".equals(menuProperty)) {
- setIsMenuCreate(false);
- setIsMenuOpen(false);
- setIsMenuStudy(false);
- setIsMenuKnowledge(false);
- setIsMenuSysAdmin(false);
setIsMenuHelp(true);
}
}
* It can be: none, create, open, study, knowledge, sysadmin, help.
*/
private String _menuProperty;
+
+ /**
+ * Value of the title bar property.
+ * It can be: study, knowledge.
+ */
+ private String _titleProperty;
+
+ /**
+ * Property that indicates whether the current open study is editable or not.
+ * On the screen it looks like pen on the status icon, pop-up menu also can be called.
+ * It is necessary for correct building the title bar.
+ */
+ private String _editDisabledProperty = "false";
/**
* Serial version ID.
getSession().put("menu.scenario", menu);
setMenuProperty("study");
- initializationScreenContext(_menuProperty);
+ setTitleProperty("study");
+ setEditDisabledProperty("true");
+ initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
return SUCCESS;
}
getMenu("scenario").selects(selection);
setMenuProperty("study");
- initializationScreenContext(_menuProperty);
+ setTitleProperty("study");
+ setEditDisabledProperty("true");
+ initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
return SUCCESS;
}
logger.error("Reason:", saverror);
setMenuProperty("study");
- initializationScreenContext(_menuProperty);
+ setTitleProperty("study");
+ initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
return ERROR;
}
public void setMenuProperty(String menuProperty) {
this._menuProperty = menuProperty;
}
+
+ /**
+ * Get the _titleProperty.
+ * @return the _titleProperty
+ */
+ public String getTitleProperty() {
+ return _titleProperty;
+ }
+
+ /**
+ * Set the _titleProperty.
+ * @param _titleProperty the titleProperty to set
+ */
+ public void setTitleProperty(String titleProperty) {
+ _titleProperty = titleProperty;
+ }
+
+ /**
+ * Get the _editDisabledProperty.
+ * @return the _editDisabledProperty
+ */
+ public String getEditDisabledProperty() {
+ return _editDisabledProperty;
+ }
+
+ /**
+ * Set the _editDisabledProperty.
+ * @param _editDisabledProperty the _editDisabledProperty to set
+ */
+ public void setEditDisabledProperty(String _editDisabledProperty) {
+ this._editDisabledProperty = _editDisabledProperty;
+ }
}
\ No newline at end of file
* It can be: none, create, open, study, knowledge, sysadmin, help.
*/
private String _menuProperty;
+
+ /**
+ * Value of the title bar property.
+ * It can be: study, knowledge.
+ */
+ private String _titleProperty;
+
+ /**
+ * Property that indicates whether the current open study is editable or not.
+ * On the screen it looks like pen on the status icon, pop-up menu also can be called.
+ * It is necessary for correct building the title bar.
+ */
+ private String _editDisabledProperty = "false";
// ==============================================================================================================================
// Action methods
// -----------------------------
setMenuProperty("study");
- initializationScreenContext(_menuProperty);
+ setTitleProperty("study");
+ setEditDisabledProperty("true");
+ initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
return SUCCESS;
}
public void setMenuProperty(String menuProperty) {
this._menuProperty = menuProperty;
}
+
+ /**
+ * Get the _titleProperty.
+ * @return the _titleProperty
+ */
+ public String getTitleProperty() {
+ return _titleProperty;
+ }
+
+ /**
+ * Set the _titleProperty.
+ * @param _titleProperty the titleProperty to set
+ */
+ public void setTitleProperty(String titleProperty) {
+ _titleProperty = titleProperty;
+ }
+
+ /**
+ * Get the editDisabledProperty.
+ * @return the editDisabledProperty
+ */
+ public final String getEditDisabledProperty() {
+ return _editDisabledProperty;
+ }
+
+ /**
+ * Set the editDisabledProperty.
+ * @param editDisabledProperty the editDisabledProperty to set
+ */
+ public final void setEditDisabledProperty(String editDisabledProperty) {
+ _editDisabledProperty = editDisabledProperty;
+ }
+
+
}
\ No newline at end of file
* It can be: none, create, open, study, knowledge, sysadmin, help.
*/
private String _menuProperty;
+
+ /**
+ * Value of the title bar property.
+ * It can be: study, knowledge.
+ */
+ private String _titleProperty;
+
+ /**
+ * Property that indicates whether the current open study is editable or not.
+ * On the screen it looks like pen on the status icon, pop-up menu also can be called.
+ * It is necessary for correct building the title bar.
+ */
+ private String _editDisabledProperty = "false";
/**
* Serial version ID.
logger.fatal("Reason:", error);
setMenuProperty("study");
- initializationScreenContext(_menuProperty);
+ setTitleProperty("study");
+ setEditDisabledProperty("true");
+ initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
return ERROR;
}
public void setMenuProperty(String menuProperty) {
this._menuProperty = menuProperty;
}
+
+ /**
+ * Get the _titleProperty.
+ * @return the _titleProperty
+ */
+ public String getTitleProperty() {
+ return _titleProperty;
+ }
+
+ /**
+ * Set the _titleProperty.
+ * @param _titleProperty the titleProperty to set
+ */
+ public void setTitleProperty(String titleProperty) {
+ _titleProperty = titleProperty;
+ }
+
+ /**
+ * Get the editDisabledProperty.
+ * @return the editDisabledProperty
+ */
+ public final String getEditDisabledProperty() {
+ return _editDisabledProperty;
+ }
+
+ /**
+ * Set the editDisabledProperty.
+ * @param editDisabledProperty the editDisabledProperty to set
+ */
+ public final void setEditDisabledProperty(String editDisabledProperty) {
+ _editDisabledProperty = editDisabledProperty;
+ }
+
+
}
\ No newline at end of file
* It can be: none, create, open, study, knowledge, sysadmin, help.
*/
private String _menuProperty;
+
+ /**
+ * Value of the title bar property.
+ * It can be: study, knowledge.
+ */
+ private String _titleProperty;
+
+ /**
+ * Property that indicates whether the current open study is editable or not.
+ * On the screen it looks like pen on the status icon, pop-up menu also can be called.
+ * It is necessary for correct building the title bar.
+ */
+ private String _editDisabledProperty = "false";
/**
* Save operation type enumeration pointing which section of properties has been edited.
validor = null;
setMenuProperty("study");
- initializationScreenContext(_menuProperty);
+ setTitleProperty("study");
+ setEditDisabledProperty("true");
+ initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
if (mystudy.isOpenForWriting() && user.canEditProperties()) {
return "edit";
// transax.commit();
setMenuProperty("study");
- initializationScreenContext(_menuProperty);
+ setTitleProperty("study");
+ setEditDisabledProperty("true");
+ initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
return SUCCESS;
}
// transax.commit();
setMenuProperty("study");
- initializationScreenContext(_menuProperty);
+ setTitleProperty("study");
+ setEditDisabledProperty("true");
+ initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
return SUCCESS;
}
// transax.commit();
setMenuProperty("study");
- initializationScreenContext(_menuProperty);
+ setTitleProperty("study");
+ setEditDisabledProperty("true");
+ initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
return SUCCESS;
}
doInitialize(); // Re-initialization following the above edition
+ setMenuProperty("study");
+ setTitleProperty("study");
+ setEditDisabledProperty("true");
+ initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
+
return SUCCESS;
}
public void setMenuProperty(String menuProperty) {
this._menuProperty = menuProperty;
}
+
+ /**
+ * Get the _titleProperty.
+ * @return the _titleProperty
+ */
+ public String getTitleProperty() {
+ return _titleProperty;
+ }
+
+ /**
+ * Set the _titleProperty.
+ * @param _titleProperty the titleProperty to set
+ */
+ public void setTitleProperty(String titleProperty) {
+ _titleProperty = titleProperty;
+ }
+
+ /**
+ * Get the editDisabledProperty.
+ * @return the editDisabledProperty
+ */
+ public final String getEditDisabledProperty() {
+ return _editDisabledProperty;
+ }
+
+ /**
+ * Set the editDisabledProperty.
+ * @param editDisabledProperty the editDisabledProperty to set
+ */
+ public final void setEditDisabledProperty(String editDisabledProperty) {
+ _editDisabledProperty = editDisabledProperty;
+ }
+
+
}
\ No newline at end of file
--- /dev/null
+/*****************************************************************************
+ * Company EURIWARE
+ * Application SIMAN
+ * File $Id$
+ * Creation date 25.10.2012
+ * @author Author: Maria KRUCHININA
+ * @version Revision:
+ *****************************************************************************/
+
+package org.splat.simer;
+
+/**
+ * Settings for title bar.
+ * @author Maria KRUCHININA
+ *
+ */
+public class TitleBarSettings {
+
+ /**
+ * The progress state of the open study/knowledge.
+ */
+ private String progressState;
+
+ /**
+ * The selection state of the open study/knowledge.
+ */
+ private String selectionState;
+
+ /**
+ * The type of the open study/knowledge.
+ */
+ private String entryType;
+
+ /**
+ * The title of the open study/knowledge.
+ */
+ private String entryTitle;
+
+ /**
+ * Property that indicates whether the current open study is editable or not.
+ * On the screen it looks like pen on the status icon, pop-up menu also can be called.
+ * It is necessary for correct building the title bar.
+ */
+ private String editDisabledProperty;
+
+ /**
+ * Get the progressState.
+ * @return the progressState
+ */
+ public String getProgressState() {
+ return progressState;
+ }
+
+ /**
+ * Set the progressState.
+ * @param progressState the progressState to set
+ */
+ public void setProgressState(final String progressState) {
+ this.progressState = progressState;
+ }
+
+ /**
+ * Get the selectionState.
+ * @return the selectionState
+ */
+ public String getSelectionState() {
+ return selectionState;
+ }
+
+ /**
+ * Set the selectionState.
+ * @param selectionState the selectionState to set
+ */
+ public void setSelectionState(final String selectionState) {
+ this.selectionState = selectionState;
+ }
+
+ /**
+ * Get the entryType.
+ * @return the entryType
+ */
+ public String getEntryType() {
+ return entryType;
+ }
+
+ /**
+ * Set the entryType.
+ * @param entryType the entryType to set
+ */
+ public void setEntryType(final String entryType) {
+ this.entryType = entryType;
+ }
+
+
+ /**
+ * Get the entryTitle.
+ * @return the entryTitle
+ */
+ public String getEntryTitle() {
+ return entryTitle;
+ }
+
+
+ /**
+ * Set the entryTitle.
+ * @param entryTitle the entryTitle to set
+ */
+ public void setEntryTitle(final String entryTitle) {
+ this.entryTitle = entryTitle;
+ }
+
+ /**
+ * Get the editDisabledProperty.
+ * @return the editDisabledProperty
+ */
+ public String getEditDisabledProperty() {
+ return editDisabledProperty;
+ }
+
+ /**
+ * Set the editDisabledProperty.
+ * @param editDisabledProperty the editDisabledProperty to set
+ */
+ public void setEditDisabledProperty(String editDisabledProperty) {
+ this.editDisabledProperty = editDisabledProperty;
+ }
+
+}
* It can be: none, create, open, study, knowledge, sysadmin, help.
*/
private String _menuProperty;
+
+ /**
+ * Value of the title bar property.
+ * It can be: study, knowledge.
+ */
+ private String _titleProperty;
+
+ /**
+ * Property that indicates whether the current open study is editable or not.
+ * On the screen it looks like pen on the status icon, pop-up menu also can be called.
+ * It is necessary for correct building the title bar.
+ */
+ private String _editDisabledProperty = "false";
private static final long serialVersionUID = 6003880772275115923L;
public String doUpload () {
// -------------------------
setMenuProperty("study");
- initializationScreenContext(_menuProperty);
+ setTitleProperty("study");
+ setEditDisabledProperty("true");
+ initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
if (action == ToDo.cancel) return "cancel";
try {
catch (OutOfMemoryError error) {
setMenuProperty("none");
- initializationScreenContext(_menuProperty);
+ setTitleProperty("study");
+ setEditDisabledProperty("true");
+ initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
return "outofmemory";
}
public void setMenuProperty(String menuProperty) {
this._menuProperty = menuProperty;
}
+
+ /**
+ * Get the _titleProperty.
+ * @return the _titleProperty
+ */
+ public String getTitleProperty() {
+ return _titleProperty;
+ }
+
+ /**
+ * Set the _titleProperty.
+ * @param _titleProperty the titleProperty to set
+ */
+ public void setTitleProperty(String titleProperty) {
+ _titleProperty = titleProperty;
+ }
+
+ /**
+ * Get the _editDisabledProperty.
+ * @return the _editDisabledProperty
+ */
+ public String getEditDisabledProperty() {
+ return _editDisabledProperty;
+ }
+
+ /**
+ * Set the _editDisabledProperty.
+ * @param _editDisabledProperty the _editDisabledProperty to set
+ */
+ public void setEditDisabledProperty(String _editDisabledProperty) {
+ this._editDisabledProperty = _editDisabledProperty;
+ }
+
+
}
\ No newline at end of file
* It can be: none, create, open, study, knowledge, sysadmin, help.
*/
private String _menuProperty;
+
+ /**
+ * Value of the title bar property.
+ * It can be: study, knowledge.
+ */
+ private String _titleProperty;
+
+ /**
+ * Property that indicates whether the current open study is editable or not.
+ * On the screen it looks like pen on the status icon, pop-up menu also can be called.
+ * It is necessary for correct building the title bar.
+ */
+ private String _editDisabledProperty = "false";
/**
* Serial version ID.
// -----------------------------
setMenuProperty("study");
- initializationScreenContext(_menuProperty);
+ setTitleProperty("study");
+ setEditDisabledProperty("true");
+ initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
Session connex = Database.getCurSession();
Transaction transax = connex.beginTransaction();
public String doVersion() {
// -------------------------
setMenuProperty("study");
- initializationScreenContext(_menuProperty);
+ setTitleProperty("study");
+ setEditDisabledProperty("true");
+ initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
if (action == ToDo.cancel)
return "cancel";
public void setMenuProperty(String menuProperty) {
this._menuProperty = menuProperty;
}
+
+ /**
+ * Get the _titleProperty.
+ * @return the _titleProperty
+ */
+ public String getTitleProperty() {
+ return _titleProperty;
+ }
+
+ /**
+ * Set the _titleProperty.
+ * @param _titleProperty the titleProperty to set
+ */
+ public void setTitleProperty(String titleProperty) {
+ _titleProperty = titleProperty;
+ }
+
+ /**
+ * Get the _editDisabledProperty.
+ * @return the _editDisabledProperty
+ */
+ public String getEditDisabledProperty() {
+ return _editDisabledProperty;
+ }
+
+ /**
+ * Set the _editDisabledProperty.
+ * @param _editDisabledProperty the _editDisabledProperty to set
+ */
+ public void setEditDisabledProperty(String _editDisabledProperty) {
+ this._editDisabledProperty = _editDisabledProperty;
+ }
}
\ No newline at end of file
<bean id="menuBarSettings"
class="org.splat.simer.MenuBarSettings" scope="session">
</bean>
+
+ <bean id="titleBarSettings"
+ class="org.splat.simer.TitleBarSettings" scope="session">
+ </bean>
<bean id="slidMenu" scope="session" abstract="true">
<property name="projectElementService"
<property name="openStudy" ref="openStudy" />
<property name="openKnowledge" ref="openKnowledge" />
<property name="menuBarSettings" ref="menuBarSettings" />
+ <property name="titleBarSettings" ref="titleBarSettings" />
</bean>
<!--========= Inherited from baseAction ========= -->