import org.splat.dal.bo.som.ProjectElement;
import org.splat.dal.bo.som.Scenario;
+import org.splat.exception.InvalidParameterException;
+import org.splat.service.StepService;
import org.splat.service.StudyService;
+import org.splat.service.dto.StepCommentDTO;
import org.splat.som.StepRights;
import org.splat.wapp.Constants;
import org.splat.wapp.PopupMenu;
* Injected study service.
*/
private StudyService _studyService;
+
+ /**
+ * Step comments.
+ */
+ private List<StepCommentDTO> _comments = null;
+
+ /**
+ * Injected Step Service.
+ */
+ private StepService _stepService;
// ==============================================================================================================================
// Action methods
setMenu();
}
+ loadComments();
return res;
}
return SUCCESS;
}
+ /**
+ * Loads step comments (if already loaded - reloads).
+ */
+ public void loadComments() {
+ try {
+ _comments = _stepService.getStepComments(_openStudy.getSelectedStep());
+ } catch(InvalidParameterException exception) {
+ _comments = null;
+ LOG.debug("Error while trying to add comment: " + exception.getMessage());
+ }
+ }
+
// ==============================================================================================================================
// Getters
// ==============================================================================================================================
super.setOpenStudy(study);
_openStudy = study;
}
+
+ /**
+ * Get the comments.
+ * @return the comments
+ */
+ public List<StepCommentDTO> getComments() {
+ return _comments;
+ }
+
+ /**
+ * Set the comments.
+ * @param comments the comments to set
+ */
+ public void setComments(final List<StepCommentDTO> comments) {
+ _comments = comments;
+ }
+
+ /**
+ * Get the stepService.
+ * @return the stepService
+ */
+ public StepService getStepService() {
+ return _stepService;
+ }
+
+ /**
+ * Set the stepService.
+ * @param stepService the stepService to set
+ */
+ public void setStepService(final StepService stepService) {
+ _stepService = stepService;
+ }
}
\ No newline at end of file