Package it.eng.spagobi.engines.documentcomposition.configuration

Examples of it.eng.spagobi.engines.documentcomposition.configuration.DocumentCompositionConfiguration


    HttpServletRequest httpRequest = getHttpRequest();
    HttpSession session=httpRequest.getSession();

    this.freezeHttpResponse();

    DocumentCompositionConfiguration docCompConf=(DocumentCompositionConfiguration)session.getAttribute("DOC_COMP_CONF");

    // create the pdfFile   
    String dir=System.getProperty("java.io.tmpdir");
      Random generator = new Random();
      int randomInt = generator.nextInt();
      String path=dir+"/"+Integer.valueOf(randomInt).toString()+".pdf";
   
    File tmpFile=new File("path");

    // map that associates document labels and DOcument Containers (containing informations)
    Map<String, DocumentContainer> documents=new LinkedHashMap<String, DocumentContainer>();

    SpagoBIRequestContainer requestContainer=getSpagoBIRequestContainer();
    SourceBean sb=requestContainer.getRequest();
   
    // Recover currentParametersConfiguration
    Map<String, CurrentConfigurationDocComp> currentConfigurationsMap=new HashMap<String, CurrentConfigurationDocComp>();

    // if only one metadata style is wrong use default table style (ignore table positions)
    boolean defaultStyle=false;

    Map styles=docCompConf.getLstDivStyle();
    //Map docsMap=docCompConf.getDocumentsMap();
    Iterator iteratorStyles=styles.keySet().iterator();
    for (Iterator iterator = docCompConf.getDocumentsArray().iterator(); iterator.hasNext();) {
      Document doc = (Document) iterator.next();
      String label=doc.getSbiObjLabel();
      logger.debug("Document "+label);     
      // recover style informations
      String styleLab=(String)iteratorStyles.next();
View Full Code Here


      // IF USER CAN'T EXECUTE THE OBJECT RETURN
      if (!ObjectsAccessVerifier.canSee(obj, profile)) return "1010|";

      //get object configuration
      DocumentCompositionConfiguration docConfig = null;
      docConfig = (DocumentCompositionConfiguration)contextManager.get("docConfig");

      Document document = null;
      //get correct document configuration
      List lstDoc = docConfig.getLabelsArray();
      boolean foundDoc = false;
      for (int i = 0; i < lstDoc.size(); i++){
        document = (Document)docConfig.getDocument((String)lstDoc.get(i));
        if (document != null){
          if (!obj.getLabel().equalsIgnoreCase(document.getSbiObjLabel()))
            continue;
          else{
            foundDoc = true;
View Full Code Here

        logger.error("Error while converting the Template bytes into a SourceBean object: ", e);
        throw new EMFUserError(EMFErrorSeverity.ERROR, "1011", messageBundle);
      }
     
      // read the configuration and set relative object into session
      DocumentCompositionConfiguration docConf = new DocumentCompositionConfiguration(content);
      SessionContainer session = requestContainer.getSessionContainer();
      ContextManager contextManager = new ContextManager(new SpagoBISessionContainer(session),
          new LightNavigatorContextRetrieverStrategy(requestContainer.getServiceRequest()));
      contextManager.set("docConfig", docConf);
        
View Full Code Here

      //gets document composition configuration
      if(template==nullreturn;
      byte[] contentBytes = template.getContent();
      String contentStr = new String(contentBytes);
      SourceBean content = SourceBean.fromXMLString(contentStr);
      DocumentCompositionConfiguration docConf = new DocumentCompositionConfiguration(content);
      List lstLabeldDocs = docConf.getSbiObjLabelsArray();
      List totalParameters = new ArrayList();

      //if flag flgDelete is true delete all parameters associated to document composition
      if (flgDelete){
        List lstDocParameters = DAOFactory.getBIObjectParameterDAO().loadBIObjectParametersById(biObject.getId());
View Full Code Here

      logger.debug("Template document composition in insert: " + template );
      if (template==null) return;
      byte[] contentBytes = template.getContent();
      String contentStr = new String(contentBytes);
      SourceBean content = SourceBean.fromXMLString(contentStr);
      DocumentCompositionConfiguration docConf = new DocumentCompositionConfiguration(content);
      List lstLabeldDocs = docConf.getSbiObjLabelsArray();
      List totalParameters = new ArrayList();


      //for every document child gets parameters and inserts these into new document composition object
      for (int i=0; i<lstLabeldDocs.size(); i++){
View Full Code Here

TOP

Related Classes of it.eng.spagobi.engines.documentcomposition.configuration.DocumentCompositionConfiguration

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.