Examples of DossierDAOHibImpl


Examples of it.eng.spagobi.engines.dossier.dao.DossierDAOHibImpl

         out.write(finalDocBytes);
              return;
             
       } else if(task.equalsIgnoreCase(DossierConstants.DOSSIER_SERVICE_TASK_DOWN_OOTEMPLATE)) {
         String tempFolder = (String) serviceRequest.getAttribute(DossierConstants.DOSSIER_TEMP_FOLDER);
         IDossierDAO dossierDao = new DossierDAOHibImpl();
         String templateFileName = dossierDao.getPresentationTemplateFileName(tempFolder);
         InputStream templateIs = dossierDao.getPresentationTemplateContent(tempFolder);
         byte[] templateByts = GeneralUtilities.getByteArrayFromInputStream(templateIs);
         response.setHeader("Content-Disposition","attachment; filename=\"" + templateFileName + "\";");
         response.setContentLength(templateByts.length);
         out.write(templateByts);
         out.flush();
              return;
        
       } else if(task.equalsIgnoreCase(DossierConstants.DOSSIER_SERVICE_TASK_DOWN_WORKFLOW_DEFINITION)) {
         String tempFolder = (String) serviceRequest.getAttribute(DossierConstants.DOSSIER_TEMP_FOLDER);
         IDossierDAO dossierDao = new DossierDAOHibImpl();
         String workDefName = dossierDao.getProcessDefinitionFileName(tempFolder);
         InputStream workIs = dossierDao.getProcessDefinitionContent(tempFolder);
         byte[] workByts = GeneralUtilities.getByteArrayFromInputStream(workIs);
         response.setHeader("Content-Disposition","attachment; filename=\"" + workDefName + "\";");
         response.setContentLength(workByts.length);
         out.write(workByts);
         out.flush();
View Full Code Here

Examples of it.eng.spagobi.engines.dossier.dao.DossierDAOHibImpl

  private void loadProcessDefinitionFileHandler(SourceBean request,
      SourceBean response) throws SourceBeanException, EMFUserError {
    logger.debug("IN");
    try {
      String tempFolder = (String) request.getAttribute(DossierConstants.DOSSIER_TEMP_FOLDER);
      IDossierDAO dossierDao = new DossierDAOHibImpl();
      FileItem upFile = (FileItem) request.getAttribute("UPLOADED_FILE");
      if (upFile != null) {
        String fileName = GeneralUtilities.getRelativeFileNames(upFile.getName());
        if (upFile.getSize() == 0) {
          EMFValidationError error = new EMFValidationError(EMFErrorSeverity.ERROR, "uploadFile", "201");
          getErrorHandler().addError(error);
          return;
        }
        int maxSize = GeneralUtilities.getTemplateMaxSize();
        if (upFile.getSize() > maxSize) {
          EMFValidationError error = new EMFValidationError(EMFErrorSeverity.ERROR, "uploadFile", "202");
          getErrorHandler().addError(error);
          return;
        }
        if (!fileName.toUpperCase().endsWith(".XML")) {
          List params = new ArrayList();
          params.add("xml");
          EMFUserError error = new EMFValidationError(EMFErrorSeverity.ERROR, "UPLOADED_FILE", "107", params, null, "component_dossier_messages");
          getErrorHandler().addError(error);
        } else {
          byte[] fileContent = upFile.get();
          dossierDao.storeProcessDefinitionFile(fileName, fileContent, tempFolder);
        }
      } else {
        logger.warn("Upload file was null!!!");
      }
     
View Full Code Here

Examples of it.eng.spagobi.engines.dossier.dao.DossierDAOHibImpl

  private void loadPresentationTemplateHandler(SourceBean request,
      SourceBean response) throws SourceBeanException, EMFUserError {
    logger.debug("IN");
    try {
      String tempFolder = (String) request.getAttribute(DossierConstants.DOSSIER_TEMP_FOLDER);
      IDossierDAO dossierDao = new DossierDAOHibImpl();
      FileItem upFile = (FileItem) request.getAttribute("UPLOADED_FILE");
      if (upFile != null) {
        String fileName = GeneralUtilities.getRelativeFileNames(upFile.getName());
        if (upFile.getSize() == 0) {
          EMFValidationError error = new EMFValidationError(EMFErrorSeverity.ERROR, "uploadFile", "201");
          getErrorHandler().addError(error);
          return;
        }
        int maxSize = GeneralUtilities.getTemplateMaxSize();
        if (upFile.getSize() > maxSize) {
          EMFValidationError error = new EMFValidationError(EMFErrorSeverity.ERROR, "uploadFile", "202");
          getErrorHandler().addError(error);
          return;
        }
        if (!fileName.toUpperCase().endsWith(".PPT")) {
          List params = new ArrayList();
          params.add("ppt");
          EMFUserError error = new EMFValidationError(EMFErrorSeverity.ERROR, "UPLOADED_FILE", "107", params, null, "component_dossier_messages");
          getErrorHandler().addError(error);
        } else {
          byte[] fileContent = upFile.get();
          dossierDao.storePresentationTemplateFile(fileName, fileContent, tempFolder);
        }
      } else {
        logger.warn("Upload file was null!!!");
      }
     
View Full Code Here

Examples of it.eng.spagobi.engines.dossier.dao.DossierDAOHibImpl

   
    // check if the error handler contains validation errors
    EMFErrorHandler errorHandler = getResponseContainer().getErrorHandler();
    if(errorHandler.isOKByCategory(EMFErrorCategory.VALIDATION_ERROR)){
      // store the configured document
      IDossierDAO dossierDao = new DossierDAOHibImpl();
      dossierDao.addConfiguredDocument(confDoc, tempFolder);
      response.setAttribute(DossierConstants.PUBLISHER_NAME, "DossierLoopbackDossierDetail");
    } else {
      // set attribute into response
      response.setAttribute("parnamemap", paramNameMap);
      response.setAttribute("parvaluemap", paramValueMap);
View Full Code Here

Examples of it.eng.spagobi.engines.dossier.dao.DossierDAOHibImpl

 
 
  private void dossierDetailHandler(SourceBean request, SourceBean response) throws SourceBeanException, EMFUserError {
    logger.debug("IN");
    String tempFolder = (String) request.getAttribute(DossierConstants.DOSSIER_TEMP_FOLDER);
    IDossierDAO dossierDao = new DossierDAOHibImpl();
//    List roleList = null;
//    try{
//      IRoleDAO roleDao = DAOFactory.getRoleDAO();
//      roleList = roleDao.loadAllRoles();
//    } catch(Exception e) {
//      logger.error("Error while loading all roles", e);
//    }
    // get the current template file name
    String tempFileName = dossierDao.getPresentationTemplateFileName(tempFolder);
    if (tempFileName == null) tempFileName = "";
    // get list of the configured document
    List confDoc = dossierDao.getConfiguredDocumentList(tempFolder);
    // get the current process definition file name
    String procDefFileName = dossierDao.getProcessDefinitionFileName(tempFolder);
    if (procDefFileName == null) procDefFileName = "";
    //WorkflowConfiguration workConf = bookDao.getWorkflowConfiguration(pathConfBook);
    List functionalities;
    try {
      functionalities = DAOFactory.getLowFunctionalityDAO().loadAllLowFunctionalities(true);
View Full Code Here

Examples of it.eng.spagobi.engines.dossier.dao.DossierDAOHibImpl

 
  private void deleteConfiguredDocumentHandler(SourceBean request, SourceBean response) throws Exception {
    logger.debug("IN");
    String tempFolder = (String) request.getAttribute(DossierConstants.DOSSIER_TEMP_FOLDER);
    String confDocIdent = (String)request.getAttribute("configureddocumentidentifier");
    IDossierDAO dossierDao = new DossierDAOHibImpl();
    // delete the configured document
    dossierDao.deleteConfiguredDocument(confDocIdent, tempFolder);
    response.setAttribute(DossierConstants.PUBLISHER_NAME, "DossierLoopbackDossierDetail");
    logger.debug("OUT");
  }
View Full Code Here

Examples of it.eng.spagobi.engines.dossier.dao.DossierDAOHibImpl

  private void detailConfiguredDocumentHandler(SourceBean request, SourceBean response) throws Exception {
    logger.debug("IN");
    String tempFolder = (String) request.getAttribute(DossierConstants.DOSSIER_TEMP_FOLDER);
    String confDocIdent = (String)request.getAttribute("configureddocumentidentifier");
    // get configured document
    IDossierDAO dossierDao = new DossierDAOHibImpl();
    ConfiguredBIDocument confDoc = dossierDao.getConfiguredDocument(confDocIdent, tempFolder);
    // get parameter value map
    Map paramValueMap = confDoc.getParameters();
    // create parameter name map
//    Integer idobj = confDoc.getId();
    String label = confDoc.getLabel();
View Full Code Here

Examples of it.eng.spagobi.engines.dossier.dao.DossierDAOHibImpl

 
 
  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) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.