public class EditScenarioPropertiesAction extends DisplayStudyStepAction {
- private Scenario myscenario;
- private String lasdate;
- private String subject;
+ /**
+ * Serial version ID.
+ */
+ private static final long serialVersionUID = 4964740932426016171L;
+
+ private transient Scenario _myscenario;
+ private transient String _lasdate;
+ private transient String _subject;
/**
* The Scenario service.
*/
private ProjectElementService _projectElementService;
- /**
- * 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";
-
- /**
- * Value of the tool bar property. It can be: none, standard, study, back.
- */
- private String _toolProperty;
-
- /**
- * Value of the left menu property. It can be: open, study, knowledge, scenario.
- */
- private String _leftMenuProperty;
-
- /**
- * Serial version ID.
- */
- private static final long serialVersionUID = 4964740932426016171L;
-
// ==============================================================================================================================
// Action methods
// ==============================================================================================================================
public String doInitialize() {
- // -----------------------------
ResourceBundle label = ResourceBundle.getBundle("labels",
getApplicationSettings().getCurrentLocale());
ResourceBundle custom = ResourceBundle.getBundle("som",
_openStudy = getOpenStudy();
step = _openStudy.getSelectedStep();
- myscenario = (Scenario) step.getOwner(); // The selected step belong to a scenario
- lasdate = datstring.format(myscenario.getLastModificationDate());
- subject = label.getString("label.study") + " " + _openStudy.getTitle();
+ _myscenario = (Scenario) step.getOwner(); // The selected step belong to a scenario
+ _lasdate = datstring.format(_myscenario.getLastModificationDate());
+ _subject = label.getString("label.study") + " " + _openStudy.getTitle();
- setMenuProperty(Constants.STUDY_MENU);
- setTitleProperty(Constants.STUDY_MENU);
- setEditDisabledProperty("true");
- setToolProperty("back");
- setLeftMenuProperty("open");
- initializationFullScreenContext(_menuProperty, _titleProperty,
- _editDisabledProperty, _toolProperty, _leftMenuProperty);
+ initializationFullScreenContext(Constants.STUDY_MENU,
+ Constants.STUDY_MENU, "true", "back", "open");
return SUCCESS;
}
_openStudy = getOpenStudy();
_selection = _openStudy.getSelection();
step = _openStudy.getSelectedStep();
- myscenario = (Scenario) step.getOwner(); // The selected step belong to a scenario
+ _myscenario = (Scenario) step.getOwner(); // The selected step belong to a scenario
- getScenarioService().checkin(myscenario.getIndex());
+ getScenarioService().checkin(_myscenario.getIndex());
// TODO: Do it in the business service after moving to DTO instead of id parameter
// or reread the scenario.
- myscenario.setUser(null);
+ _myscenario.setUser(null);
_openStudy.getMenu().refreshGivenStepItem(
- getProjectElementService().getFirstStep(myscenario)); // For updating the scenario icon
+ getProjectElementService().getFirstStep(_myscenario)); // For updating the scenario icon
- setMenuProperty(Constants.STUDY_MENU);
if ("true".equals(getWriteAccess())
&& getUserRights().canCreateDocument()) {
setToolProperty(Constants.STUDY_MENU);
} else {
- setToolProperty("standard");
+ setToolProperty(Constants.STANDARD_MENU);
}
- setLeftMenuProperty(Constants.STUDY_MENU);
- initializationFullScreenContext(_menuProperty, _toolProperty,
- _leftMenuProperty);
+ initializationFullScreenContext(Constants.STUDY_MENU,
+ getToolProperty(), Constants.STUDY_MENU);
return SUCCESS;
}
*/
public User getAuthor() {
User author;
- if (myscenario.isCheckedout()) {
- author = myscenario.getUser();
+ if (_myscenario.isCheckedout()) {
+ author = _myscenario.getUser();
} else {
- author = myscenario.getAuthor();
+ author = _myscenario.getAuthor();
}
return author;
}
public String getLastModificationDate() {
- return lasdate;
+ return _lasdate;
}
public StepRights getSelectedStep() {
}
public String getSubject() {
- return subject;
+ return _subject;
}
public String getTitle() {
- return myscenario.getTitle();
+ return _myscenario.getTitle();
}
public boolean isCheckedout() {
- return myscenario.isCheckedout();
+ return _myscenario.isCheckedout();
}
/**
final ProjectElementService projectElementService) {
_projectElementService = projectElementService;
}
-
- /**
- * Get the menuProperty.
- *
- * @return the menuProperty
- */
- @Override
- public String getMenuProperty() {
- return _menuProperty;
- }
-
- /**
- * Set the menuProperty.
- *
- * @param menuProperty
- * the menuProperty to set
- */
- @Override
- public void setMenuProperty(final String menuProperty) {
- this._menuProperty = menuProperty;
- }
-
- /**
- * Get the _titleProperty.
- *
- * @return the _titleProperty
- */
- @Override
- public String getTitleProperty() {
- return _titleProperty;
- }
-
- /**
- * Set the _titleProperty.
- *
- * @param _titleProperty
- * the titleProperty to set
- */
- @Override
- public void setTitleProperty(final String titleProperty) {
- _titleProperty = titleProperty;
- }
-
- /**
- * Get the editDisabledProperty.
- *
- * @return the editDisabledProperty
- */
- @Override
- public final String getEditDisabledProperty() {
- return _editDisabledProperty;
- }
-
- /**
- * Set the editDisabledProperty.
- *
- * @param editDisabledProperty
- * the editDisabledProperty to set
- */
- @Override
- public final void setEditDisabledProperty(final String editDisabledProperty) {
- _editDisabledProperty = editDisabledProperty;
- }
-
- /**
- * Get the toolProperty.
- *
- * @return the toolProperty
- */
- @Override
- public String getToolProperty() {
- return _toolProperty;
- }
-
- /**
- * Set the toolProperty.
- *
- * @param toolProperty
- * the toolProperty to set
- */
- @Override
- public void setToolProperty(final String toolProperty) {
- _toolProperty = toolProperty;
- }
-
- /**
- * Get the leftMenuProperty.
- *
- * @return the leftMenuProperty
- */
- @Override
- public String getLeftMenuProperty() {
- return _leftMenuProperty;
- }
-
- /**
- * Set the leftMenuProperty.
- *
- * @param leftMenuProperty
- * the leftMenuProperty to set
- */
- @Override
- public void setLeftMenuProperty(final String leftMenuProperty) {
- _leftMenuProperty = leftMenuProperty;
- }
}
\ No newline at end of file