Package it.eng.spagobi.services.content.bo

Examples of it.eng.spagobi.services.content.bo.Content


    private byte[] getDocumentXSL(String requestConnectionName,HttpSession session,IEngUserProfile profile,String documentId) {
      logger.debug("IN");

    ContentServiceProxy contentProxy = new ContentServiceProxy((String)profile.getUserUniqueIdentifier(),session);

    Content templateContent = contentProxy.readTemplate(documentId,new HashMap());
   
    InputStream is = null;
    byte[] byteContent = null;
    try {
      BASE64Decoder bASE64Decoder = new BASE64Decoder();
      byteContent = bASE64Decoder.decodeBuffer(templateContent.getContent());
      is = new java.io.ByteArrayInputStream(byteContent);
    }catch (Throwable t){
      logger.warn("Error on decompile",t);
    }finally{
      try {
View Full Code Here


          // File or directory does not exist, create a new file compiled!
          //put "true" to the parameter that not permits the validation on parameters of the subreport.
          ContentServiceProxy contentServiceProxy = (ContentServiceProxy)getEnv().get(EngineConstants.ENV_CONTENT_SERVICE_PROXY);
          HashMap requestParameters = new HashMap();
          requestParameters.put("SBI_READ_ONLY_TEMPLATE", "true");
          Content template = contentServiceProxy.readTemplate(subreportMeta.getDocumentId(), requestParameters);
          template.getFileName();
          logger.debug("Read the template.(subreport)"+template.getFileName());
          InputStream is = null;   
          BASE64Decoder bASE64Decoder = new BASE64Decoder();
          byte[] templateContent = bASE64Decoder.decodeBuffer(template.getContent());
          is = new java.io.ByteArrayInputStream(templateContent);
          String str = new String(templateContent);
   
          SpagoBIAccessUtils util = new SpagoBIAccessUtils();
   
          /* Dynamic template management: if the template is a zip file it is opened and every class are added to
           * the classpath
           */     
          String flgTemplateStandard = "true"; // = subreportMeta.getTemplateType();
          if (template.getFileName().indexOf(".zip") > -1) {
            flgTemplateStandard = "false";
          }
         
          if (flgTemplateStandard.equalsIgnoreCase("false")){             
            File fileZip = new File (destDir, this.JS_FILE_ZIP+  i + JS_EXT_ZIP);
View Full Code Here

    logger.debug("documentId=" + documentId);

    ContentServiceProxy contentProxy = new ContentServiceProxy(userId, servletRequest.getSession());

    HashMap requestParameters = ParametersDecoder.getDecodedRequestParameters(servletRequest);
    Content template = contentProxy.readTemplate(documentId,requestParameters);
    logger.debug("Read the template=" + template.getFileName());
   
    InputStream is = null;
    byte[] templateContent = null;
    try {
      BASE64Decoder bASE64Decoder = new BASE64Decoder();
      templateContent = bASE64Decoder.decodeBuffer(template.getContent());
      is = new java.io.ByteArrayInputStream(templateContent);
    }catch (Throwable t){
      logger.warn("Error on decompile",t);
    }
   
    String flgTemplateStandard = "true";
    if (template.getFileName().indexOf(".zip") > -1) {
      flgTemplateStandard = "false";
    }else{
      flgTemplateStandard = "true";
    }
   
View Full Code Here

//      all jar needed by JR to succesfully compile a report should be on this path
      // (by default is WEB_INF/lib)
      setJRClasspath(getJRLibDir(servletContext));

      HashMap requestParameters = ParametersDecoder.getDecodedRequestParameters(servletRequest);
      Content template=contentProxy.readTemplate( documentId,requestParameters);
      if (template==null){
        logger.error("The document haven't the template.documentId="+documentId+" userUniqueIdentifier="+userUniqueIdentifier);       
        return;
      }
      logger.debug("Read the template."+template.getFileName());
      InputStream is = null;   
      BASE64Decoder bASE64Decoder = new BASE64Decoder();
      byte[] templateContent = bASE64Decoder.decodeBuffer(template.getContent());
      is = new java.io.ByteArrayInputStream(templateContent);

      if (template.getFileName().indexOf(".zip") > -1) {
        flgTemplateStandard = "false";
      }

      /* Dynamic template management: if the template is a zip file it is opened and every class are added to
       * the classpath
View Full Code Here

         
         
          // File or directory does not exist, create a new file compiled!
          //put "true" to the parameter that not permits the validation on parameters of the subreport.
          requestParameters.put("SBI_READ_ONLY_TEMPLATE", "true");
          Content template=contentProxy.readTemplate(subreportMeta.getDocumentId(), requestParameters);
          template.getFileName();
          logger.debug("Read the template.(subreport)"+template.getFileName());
          InputStream is = null;   
          BASE64Decoder bASE64Decoder = new BASE64Decoder();
          byte[] templateContent = bASE64Decoder.decodeBuffer(template.getContent());
          is = new java.io.ByteArrayInputStream(templateContent);
          String str = new String(templateContent);
   
          SpagoBIAccessUtils util = new SpagoBIAccessUtils();
   
          /* Dynamic template management: if the template is a zip file it is opened and every class are added to
           * the classpath
           */     
          String flgTemplateStandard = "true"; // = subreportMeta.getTemplateType();
          if (template.getFileName().indexOf(".zip") > -1) {
            flgTemplateStandard = "false";
          }
         
          if (flgTemplateStandard.equalsIgnoreCase("false")){             
            File fileZip = new File (destDir, this.JS_FILE_ZIP+  i + JS_EXT_ZIP);
View Full Code Here

TOP

Related Classes of it.eng.spagobi.services.content.bo.Content

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.