Package it.eng.spagobi.analiticalmodel.document.bo

Examples of it.eng.spagobi.analiticalmodel.document.bo.ObjTemplate


      String uuid = uuidObj.toString();
      File tempFolder = new File(tempBaseFolder.getAbsolutePath() + "/" + dossier.getId().toString() + "/" + uuid);
      if (tempFolder.exists()) deleteFolder(tempFolder);
      tempFolder.mkdirs();
      File template = new File(tempFolder.getAbsolutePath() + "/" + TEMPLATE_FILE_NAME);
      ObjTemplate objTemplate = dossier.getActiveTemplate();
      if (objTemplate != null) {
        byte[] bytes = objTemplate.getContent();
        FileOutputStream fos = new FileOutputStream(template);
          fos.write(bytes);
          fos.flush();
          fos.close();
          bytes = null;
View Full Code Here


          presentationTemplate.getAbsolutePath(),
          processDefinitionFile.getAbsolutePath(),
          dossierConfigFile.getAbsolutePath()
      };
      template = generateTemplateZipFile(files, pathTempFolder);
      ObjTemplate objTemplate = generateObjTemplate(template);
      IBIObjectDAO objDAO = DAOFactory.getBIObjectDAO();
      BIObject dossier = objDAO.loadBIObjectById(dossierId);
      objDAO.modifyBIObject(dossier, objTemplate);
      template.delete();
    } catch (Exception e) {
View Full Code Here

      if (fis != null) fis.close();
    }
  }

  private ObjTemplate generateObjTemplate(File templateFile) throws IOException {
    ObjTemplate objTemplate = new ObjTemplate();
    objTemplate.setActive(new Boolean(true));
    objTemplate.setName(TEMPLATE_FILE_NAME);
        byte[] uplCont = read(templateFile);
        objTemplate.setContent(uplCont);
    return objTemplate;
  }
View Full Code Here

        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");
            templ.setContent(tempCont);
        // load all functionality
        List storeInFunctionalities = new ArrayList();
        List functIds = request.getAttributeAsList("FUNCT_ID");
        Iterator iterFunctIds = functIds.iterator();
        while(iterFunctIds.hasNext()) {
View Full Code Here

TOP

Related Classes of it.eng.spagobi.analiticalmodel.document.bo.ObjTemplate

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.