*/
public final static AppLogger LOG = AppLogger
.getLogger(StudyServiceImpl.class);
+ /**
+ * "studyId" parameter name.
+ */
+ public final static String PARAM_STUDY_ID = "studyId";
/**
* Injected index service.
public String getDescription(final Long studyId)
throws InvalidParameterException {
if (studyId == null) {
- throw new InvalidParameterException("studyId", "null");
+ throw new InvalidParameterException(PARAM_STUDY_ID, "null");
}
Study study = _studyDAO.get(studyId);
if (study == null) {
- throw new InvalidParameterException("studyId", studyId.toString());
+ throw new InvalidParameterException(PARAM_STUDY_ID, studyId.toString());
}
return study.getDescription();
}
public void setDescription(final Long studyId, final String descriptionText)
throws InvalidParameterException {
if (studyId == null) {
- throw new InvalidParameterException("studyId", "null");
+ throw new InvalidParameterException(PARAM_STUDY_ID, "null");
}
Study study = _studyDAO.get(studyId);
if (study == null) {
- throw new InvalidParameterException("studyId", studyId.toString());
+ throw new InvalidParameterException(PARAM_STUDY_ID, studyId.toString());
}
study.setAttribute(new DescriptionAttribute(study, descriptionText));
}
public boolean removeDescription(final Long studyId)
throws InvalidParameterException {
if (studyId == null) {
- throw new InvalidParameterException("studyId", String
+ throw new InvalidParameterException(PARAM_STUDY_ID, String
.valueOf(studyId));
}
Study study = _studyDAO.get(studyId);
if (study == null) {
- throw new InvalidParameterException("studyId", String
+ throw new InvalidParameterException(PARAM_STUDY_ID, String
.valueOf(studyId));
}
return study.removeAttribute(study