Package it.eng.spagobi.engines.dossier.bo

Examples of it.eng.spagobi.engines.dossier.bo.DossierPresentation


      }
      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 + "] " +
View Full Code Here


      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 {
View Full Code Here

           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 {
View Full Code Here

   */
  public DossierPresentation getCurrentPresentation(Integer dossierId, Long workflowProcessId) throws EMFInternalError {
    logger.debug("IN");
    Session aSession = null;
    Transaction tx = null;
    DossierPresentation toReturn = null;
    try {
      aSession = getSession();
      tx = aSession.beginTransaction();
      /*String hql = "from SbiDossierPresentations sdp where sdp.sbiObject.biobjId=" + dossierId + " " +
          "and sdp.workflowProcessId=" + workflowProcessId;*/
 
View Full Code Here

    }
  }
 
 
  private DossierPresentation toDossierPresentation(SbiDossierPresentations presentation) {
    DossierPresentation toReturn = new DossierPresentation();
    toReturn.setId(presentation.getPresentationId());
    toReturn.setWorkflowProcessId(presentation.getWorkflowProcessId());
    toReturn.setBinId(presentation.getSbiBinaryContent().getId());
    toReturn.setBiobjectId(presentation.getSbiObject().getBiobjId());
    Short approvedFl = presentation.getApproved();
    if (approvedFl == null) {
      toReturn.setApproved(null);
    } else {
      boolean approved = presentation.getApproved().shortValue() == 1;
      toReturn.setApproved(new Boolean(approved));
    }
    toReturn.setCreationDate(presentation.getCreationDate());
    toReturn.setName(presentation.getName());
    toReturn.setProg(presentation.getProg());
    return toReturn;
  }
View Full Code Here

TOP

Related Classes of it.eng.spagobi.engines.dossier.bo.DossierPresentation

Copyright © 2018 www.massapicom. 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.