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

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


  /* (non-Javadoc)
   * @see it.eng.spagobi.engines.dossier.dao.IDossierDAO#getConfiguredDocument(java.lang.String, java.lang.String)
   */
  public ConfiguredBIDocument getConfiguredDocument(String docLogicalName, String pathTempFolder) {
    logger.debug("IN");
    ConfiguredBIDocument toReturn = null;
    try {
      File docsConfigured = getTemporaryDossierConfigurationFile(pathTempFolder);
      InputSource stream = new InputSource(new FileReader(docsConfigured));
      SourceBean docsConfiguredSb = SourceBean.fromXMLStream(stream, true, false);
      SourceBean docSb = (SourceBean) docsConfiguredSb.getAttribute(docLogicalName);
View Full Code Here


        if (docsConfiguredList != null && docsConfiguredList.size() > 0) {
          Iterator it = docsConfiguredList.iterator();
          while (it.hasNext()) {
            SourceBeanAttribute docSbSttr = (SourceBeanAttribute) it.next();
            SourceBean docSb = (SourceBean) docSbSttr.getValue();
            ConfiguredBIDocument doc = ConfiguredBIDocument.fromXml(docSb);
            toReturn.add(doc);
          }
        }
      }
    } catch (Exception e) {
View Full Code Here

            logger.debug("shape text retrived " + shapeText);
            shapeText = shapeText.trim();
            if (shapeText.startsWith("spagobi_placeholder_")) {
                String logicalObjectName = shapeText.substring(20);
                logger.debug("Logical Name of the shape " + logicalObjectName);
                ConfiguredBIDocument confDoc = dossierDAO.getConfiguredDocument(logicalObjectName, pathTmpFold);
                logger.debug("Configured document with Logical Name " + logicalObjectName
                  + " retrived " + confDoc);
                storeDocImages(confDoc, numPage, dossier, workflowProcessId);
            }
            }
View Full Code Here

    }
    if(!findOutFormat){
      paramValueMap.put("outputType", "JPGBASE64");
    }
    // fill a configured document bo with data retrived
    ConfiguredBIDocument confDoc = new ConfiguredBIDocument();
    confDoc.setDescription(obj.getDescription());
//    confDoc.setId(obj.getId());
    confDoc.setLabel(obj.getLabel());
    confDoc.setParameters(paramValueMap);
    confDoc.setName(obj.getName());
    confDoc.setLogicalName(logicalName);
   
    // check if the error handler contains validation errors
    EMFErrorHandler errorHandler = getResponseContainer().getErrorHandler();
    if(errorHandler.isOKByCategory(EMFErrorCategory.VALIDATION_ERROR)){
      // store the configured document
      IDossierDAO dossierDao = new DossierDAOHibImpl();
      dossierDao.addConfiguredDocument(confDoc, tempFolder);
      response.setAttribute(DossierConstants.PUBLISHER_NAME, "DossierLoopbackDossierDetail");
    } else {
      // set attribute into response
      response.setAttribute("parnamemap", paramNameMap);
      response.setAttribute("parvaluemap", paramValueMap);
//      response.setAttribute("idobj", confDoc.getId());
      response.setAttribute("description", confDoc.getDescription());
      response.setAttribute("label", confDoc.getLabel());
      response.setAttribute("name", confDoc.getName());
      response.setAttribute("logicalname", confDoc.getLogicalName());
      response.setAttribute(DossierConstants.PUBLISHER_NAME, "DossierConfiguredDocumentDetail");
    }
    logger.debug("OUT");
  }
View Full Code Here

    logger.debug("IN");
    String tempFolder = (String) request.getAttribute(DossierConstants.DOSSIER_TEMP_FOLDER);
    String confDocIdent = (String)request.getAttribute("configureddocumentidentifier");
    // get configured document
    IDossierDAO dossierDao = new DossierDAOHibImpl();
    ConfiguredBIDocument confDoc = dossierDao.getConfiguredDocument(confDocIdent, tempFolder);
    // get parameter value map
    Map paramValueMap = confDoc.getParameters();
    // create parameter name map
//    Integer idobj = confDoc.getId();
    String label = confDoc.getLabel();
    BIObject obj = DAOFactory.getBIObjectDAO().loadBIObjectByLabel(label);
    Integer idobj = obj.getId();
    IBIObjectParameterDAO biobjpardao = DAOFactory.getBIObjectParameterDAO();
    List params = biobjpardao.loadBIObjectParametersById(idobj);
    Iterator iterParams = params.iterator();
    Map paramNameMap = new HashMap();
    while(iterParams.hasNext()) {
      BIObjectParameter par = (BIObjectParameter)iterParams.next();
      String parLabel = par.getLabel();
      String parUrlName = par.getParameterUrlName();
      paramNameMap.put(parLabel, parUrlName)
    }
    // set attribute into response
    response.setAttribute("parnamemap", paramNameMap);
    response.setAttribute("parvaluemap", paramValueMap);
//    response.setAttribute("idobj", confDoc.getId());
    response.setAttribute("description", confDoc.getDescription());
    response.setAttribute("label", confDoc.getLabel());
    response.setAttribute("name", confDoc.getName());
    response.setAttribute("logicalname", confDoc.getLogicalName());
    response.setAttribute(DossierConstants.PUBLISHER_NAME, "DossierConfiguredDocumentDetail");
    logger.debug("OUT");
  }
View Full Code Here

TOP

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

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.