private void saveDossierDetailHandler(SourceBean request, SourceBean response) throws Exception {
logger.debug("IN");
String tempFolder = (String) request.getAttribute(DossierConstants.DOSSIER_TEMP_FOLDER);
IDossierDAO dossierDao = new DossierDAOHibImpl();
List docs = dossierDao.getConfiguredDocumentList(tempFolder);
EMFErrorHandler errorHandler = getErrorHandler();
if (dossierDao.getPresentationTemplateFileName(tempFolder) == null) {
logger.error("Presentation template not loaded");
EMFValidationError error = new EMFValidationError(EMFErrorSeverity.ERROR, "", "104", "component_dossier_messages");
errorHandler.addError(error);
}
if (dossierDao.getProcessDefinitionFileName(tempFolder) == null) {
logger.error("Process definition file not loaded");
EMFValidationError error = new EMFValidationError(EMFErrorSeverity.ERROR, "", "105", "component_dossier_messages");
errorHandler.addError(error);
}
if (docs == null || docs.size() == 0) {
logger.error("No documents configured in dossier");
EMFValidationError error = new EMFValidationError(EMFErrorSeverity.ERROR, "", "106", "component_dossier_messages");
errorHandler.addError(error);
}
Integer dossierId = dossierDao.getDossierId(tempFolder);
adjustRequiredAnalyticalDrivers(dossierId, docs);
if (errorHandler.isOKBySeverity(EMFErrorSeverity.ERROR)) {
dossierDao.storeTemplate(dossierId, tempFolder);
}
String saveAndGoBackStr = (String) request.getAttribute("SAVE_AND_GO_BACK");
boolean saveAndGoBack = saveAndGoBackStr != null && saveAndGoBackStr.trim().equalsIgnoreCase("TRUE");
if (saveAndGoBack) {