Examples of IDossierPresentationsDAO


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

        // delete dossier temp parts eventually associated
        IDossierPartsTempDAO dptDAO = DAOFactory.getDossierPartsTempDAO();
        dptDAO.eraseDossierParts(obj.getId());
        // delete dossier presentations eventually associated
        IDossierPresentationsDAO dpDAO = DAOFactory.getDossierPresentationDAO();
        dpDAO.deletePresentations(obj.getId());

        // update subreports table
        ISubreportDAO subrptdao = DAOFactory.getSubreportDAO();
        subrptdao.eraseSubreportByMasterRptId(obj.getId());
        subrptdao.eraseSubreportBySubRptId(obj.getId());
View Full Code Here

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

      } catch (IOException e) {
        logger.error("Error while storing the final document", e);
      }
      FileInputStream fis = new FileInputStream(pathFinalDoc);
      byte[] docCont = GeneralUtilities.getByteArrayFromInputStream(fis);
      IDossierPresentationsDAO dpDAO = DAOFactory.getDossierPresentationDAO();
     
      DossierPresentation dossierPresentation = new DossierPresentation();
      dossierPresentation.setApproved(null);
      dossierPresentation.setProg(null);
      dossierPresentation.setBiobjectId(dossier.getId());
      dossierPresentation.setContent(docCont);
      dossierPresentation.setName(dossier.getName());
      dossierPresentation.setWorkflowProcessId(workflowProcessId);
      dpDAO.insertPresentation(dossierPresentation);
      logger.debug("Document stored.");
      fis.close();
      dptDAO.cleanDossierParts(dossierId, workflowProcessId);
      logger.debug("Dossier temporary parts relevant to document id = [" + dossierId + "] " +
          "and workflow process id = [" + workflowProcessId + "] deleted.");
View Full Code Here

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

        IEngineDAO engineDAO = DAOFactory.getEngineDAO();
        List engines = engineDAO.loadAllEnginesForBIObjectType(officeDocDom.getValueCd());
        Engine engine = (Engine)engines.get(0);
        // load the template
        UploadedFile uploadedFile = new UploadedFile();
        IDossierPresentationsDAO dpDAO = DAOFactory.getDossierPresentationDAO();
        Integer dossierId = new Integer(dossierIdStr);
        Integer versionId = new Integer(versionIdStr);
        byte[] tempCont = dpDAO.getPresentationVersionContent(dossierId, versionId);
        BIObject dossier = DAOFactory.getBIObjectDAO().loadBIObjectById(dossierId);
        String bookName = dossier.getName();
        ObjTemplate templ = new ObjTemplate();
        templ.setActive(new Boolean(true));
            templ.setName(bookName + ".ppt");
View Full Code Here

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

 
  private void deletePresVerHandler(SourceBean request, SourceBean response) throws Exception {
    logger.debug("IN");
    String dossierIdStr = null;
    List presVersions = null;
    IDossierPresentationsDAO dpDAO = null;
    try{
      dossierIdStr = (String) request.getAttribute(DossierConstants.DOSSIER_ID);
      String versionIdStr = (String) request.getAttribute(DossierConstants.VERSION_ID);
      dpDAO = DAOFactory.getDossierPresentationDAO();
      Integer dossierId = new Integer(dossierIdStr);
      Integer versionId = new Integer(versionIdStr);
      dpDAO.deletePresentationVersion(dossierId, versionId);
      presVersions = dpDAO.getPresentationVersions(dossierId);
      response.setAttribute(DossierConstants.PUBLISHER_NAME, "DossierPresentationVersion");
      response.setAttribute(DossierConstants.DOSSIER_PRESENTATION_VERSIONS, presVersions);
      response.setAttribute(DossierConstants.DOSSIER_ID, dossierIdStr);
    } catch (Exception e) {
      logger.error("error while setting response attribute " + e);
View Full Code Here

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

      // store presentation
      SessionContainer session = this.getRequestContainer().getSessionContainer();
      SessionContainer permanentSession = session.getPermanentContainer();
      IEngUserProfile profile = (IEngUserProfile) permanentSession.getAttribute(IEngUserProfile.ENG_USER_PROFILE);

      IDossierPresentationsDAO dpDAO = DAOFactory.getDossierPresentationDAO();
      dpDAO.setUserProfile(profile);
      DossierPresentation currPresentation = dpDAO.getCurrentPresentation(dossierId, workflowProcessId);
      boolean approvedBool = false;
      if (approved.equalsIgnoreCase("true")) {
        approvedBool = true;
      }
      currPresentation.setApproved(new Boolean(approvedBool));
      Integer nextProg = dpDAO.getNextProg(dossierId);
      currPresentation.setProg(nextProg);
      dpDAO.updatePresentation(currPresentation);
      // put attributes into response
      if (approved.equalsIgnoreCase("true")) {
        response.setAttribute(DossierConstants.PUBLISHER_NAME, "DossierCompleteActivityLoopback");
      } else {
        response.setAttribute(DossierConstants.PUBLISHER_NAME, "DossierRejecrActivityLoopback");
View Full Code Here

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

         } finally {
           if (jbpmContext != null) jbpmContext.close();
         }
         if (dossierId != null) {
           BIObject dossier = DAOFactory.getBIObjectDAO().loadBIObjectById(dossierId);
           IDossierPresentationsDAO dpDAO = DAOFactory.getDossierPresentationDAO();
           DossierPresentation presentation = dpDAO.getCurrentPresentation(dossierId, workflowProcessId);
           byte[] finalDocBytes = presentation.getContent();
           response.setHeader("Content-Disposition","attachment; filename=\"" + dossier.getName() + ".ppt" + "\";");
           response.setContentLength(finalDocBytes.length);
           out.write(finalDocBytes);
           out.flush();
         } else {
           logger.error("Dossier configuration path not found!");
         }
              return;
        
       } else if(task.equalsIgnoreCase(DossierConstants.DOSSIER_SERVICE_TASK_DOWN_PRESENTATION_VERSION)) {
         String dossierIdStr = (String) serviceRequest.getAttribute(DossierConstants.DOSSIER_ID);
         Integer dossierId = new Integer(dossierIdStr);
         String versionStr = (String) serviceRequest.getAttribute(DossierConstants.VERSION_ID);
         Integer versionId = new Integer(versionStr);
         BIObject dossier = DAOFactory.getBIObjectDAO().loadBIObjectById(dossierId);
         IDossierPresentationsDAO dpDAO = DAOFactory.getDossierPresentationDAO();
         byte[] finalDocBytes = dpDAO.getPresentationVersionContent(dossierId, versionId);
         response.setHeader("Content-Disposition","attachment; filename=\"" + dossier.getName() + ".ppt" + "\";");
         response.setContentLength(finalDocBytes.length);
         out.write(finalDocBytes);
              return;
             
View Full Code Here

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

   * @throws EMFUserError the EMF user error
   */
  public void execute(RequestContainer requestContainer, BIObject biobj, SourceBean response) throws EMFUserError {
    logger.debug("IN");
    try {
      IDossierPresentationsDAO dpDao = DAOFactory.getDossierPresentationDAO();
      List presVersions = dpDao.getPresentationVersions(biobj.getId());
      response.setAttribute(DossierConstants.PUBLISHER_NAME, "DossierPresentationVersion");
      response.setAttribute(DossierConstants.DOSSIER_PRESENTATION_VERSIONS, presVersions);
      response.setAttribute(DossierConstants.DOSSIER_ID, biobj.getId().toString());
    } catch (Exception e) {
      logger.error("error while setting response attribute " + e);
View Full Code Here

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

    logger.debug("IN");
    try {
      String dossierIdStr = (String) request.getAttribute(DossierConstants.DOSSIER_ID);
      logger.debug("Using dossier id = " + dossierIdStr);
      Integer dossierId = new Integer(dossierIdStr);
      IDossierPresentationsDAO pdDAO = DAOFactory.getDossierPresentationDAO();
      List presVersions = pdDAO.getPresentationVersions(dossierId);
      response.setAttribute(DossierConstants.PUBLISHER_NAME, "DossierPresentationVersion");
      response.setAttribute(DossierConstants.DOSSIER_PRESENTATION_VERSIONS, presVersions);
      response.setAttribute(DossierConstants.DOSSIER_ID, dossierIdStr);
    } catch (Exception e) {
      logger.error("Error while setting response attribute " + e);
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.