import org.splat.dal.dao.som.IDBuilderDAO;
import org.splat.dal.dao.som.ScenarioDAO;
import org.splat.dal.dao.som.StudyDAO;
+import org.splat.dal.dao.som.ValidationCycleDAO;
import org.splat.kernel.InvalidPropertyException;
import org.splat.kernel.MissedPropertyException;
import org.splat.kernel.MultiplyDefinedException;
*/
private ScenarioDAO _scenarioDAO;
+ /**
+ * Injected validation cycle DAO.
+ */
+ private ValidationCycleDAO _validationCycleDAO;
+
/**
* Injected IDBuilder DAO.
*/
* @see org.splat.service.StudyService#setValidationCycle(org.splat.dal.bo.som.Study, org.splat.dal.bo.som.DocumentType,
* org.splat.dal.bo.som.ValidationCycle.Properties)
*/
+ @Transactional
public void setValidationCycle(Study aStudy, DocumentType type,
ValidationCycle.Properties vprop) {
HashMap<String, ValidationCycle> validactor = aStudy
try {
cycle = new ValidationCycle(aStudy, vprop.setDocumentType(type));
+ getValidationCycleDAO().create(cycle); //RKV
+
ValidationCycleRelation link = cycle.getContext();
- aStudy.addRelation(link);
+//RKV: aStudy.addRelation(link);
+ aStudy.getAllRelations().add(link); //RKV
+
validactor.put(cname, link.getTo()); // Replaces the cycle if exists as default,
} catch (Exception error) {
logger.error("Unable to re-index Knowledge Elements, reason:",
public void setScenarioDAO(ScenarioDAO scenarioDAO) {
_scenarioDAO = scenarioDAO;
}
+
+ /**
+ * Get the validationCycleDAO.
+ * @return the validationCycleDAO
+ */
+ public ValidationCycleDAO getValidationCycleDAO() {
+ return _validationCycleDAO;
+ }
+
+ /**
+ * Set the validationCycleDAO.
+ * @param validationCycleDAO the validationCycleDAO to set
+ */
+ public void setValidationCycleDAO(ValidationCycleDAO validationCycleDAO) {
+ _validationCycleDAO = validationCycleDAO;
+ }
}