* Injected Step Service.
*/
private StepService _stepService;
+
+ /**
+ * Study description.
+ */
+ private String _descriptionValue;
// ==============================================================================================================================
// Action methods
setMenu();
}
loadComments();
+ loadDescription();
return res;
}
}
}
+ /**
+ * Loads description (if already loaded - reloads).
+ */
+ public void loadDescription() {
+ try {
+ _descriptionValue = _studyService.getDescription(_openStudy.getIndex());
+ } catch(InvalidParameterException exception) {
+ _descriptionValue = null;
+ LOG.debug("Error while trying to add description: " + exception.getMessage());
+ }
+ }
+
+ /**
+ * Sets study description.
+ * @return SUCCESS if succeeded, INPUT otherwise.
+ */
+ public String doSetDescription() {
+ String res = INPUT;
+ try {
+ _studyService.setDescription(_openStudy.getIndex(), _descriptionValue);
+ res = SUCCESS;
+ } catch(InvalidParameterException exception) {
+ LOG.debug("Error while trying to add description: " + exception.getMessage());
+ }
+ loadDescription();
+ return res;
+ }
+
// ==============================================================================================================================
// Getters
// ==============================================================================================================================
public void setStepService(final StepService stepService) {
_stepService = stepService;
}
+
+ /**
+ * Get the descriptionValue.
+ * @return the descriptionValue
+ */
+ public String getDescriptionValue() {
+ return _descriptionValue;
+ }
+
+ /**
+ * Set the descriptionValue.
+ * @param descriptionValue the descriptionValue to set
+ */
+ public void setDescriptionValue(final String descriptionValue) {
+ _descriptionValue = descriptionValue;
+ }
}
\ No newline at end of file