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

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


    IObjTemplateDAO templateDAO;
   
    List<Subreport> subreports;
    Subreport subreport;
    BIObject subreportBObject; 
    ObjTemplate subreportTemplate;
   
    String prefixName;
    String tempName;
    String flgTemplateStandard;
    Integer id;
   
    try {
     
           
      subreportDAO = DAOFactory.getSubreportDAO();
        bobjectDAO = DAOFactory.getBIObjectDAO();
        templateDAO = DAOFactory.getObjTemplateDAO();
 
        subreports = subreportDAO.loadSubreportsByMasterRptId( reportBObject.getId() );
        for (int i = 0; i < subreports.size(); i++) {
          subreport = subreports.get(i);
        subreportBObject = bobjectDAO.loadBIObjectForDetail(subreport.getSub_rpt_id());
        subreportTemplate = templateDAO.getBIObjectActiveTemplate(subreportBObject.getId());
       
        prefixName = subreportBObject.getId()  + "_" + subreportTemplate.getBinId();
        pars.put("sr." + (i + 1) + ".ids", prefixName);
        logger.debug("ids: " + prefixName);
       
        /*
        tempName = subreportTemplate.getName().substring(0,subreportTemplate.getName().indexOf("."));
View Full Code Here


        logger.warn("BIObject is null");
        return pars;
    }
    //add prefix (objId__templateId) of the master template for manage subreport cache
    IObjTemplateDAO tempdao = DAOFactory.getObjTemplateDAO();
    ObjTemplate objtemp = tempdao.getBIObjectActiveTemplate(biobj.getId());
    String prefixName = biobj.getId()  + "__" + objtemp.getBinId();
    pars.put("prefixName", prefixName);
    logger.debug(" prefixName: " + prefixName);
   
    ParameterValuesEncoder parValuesEncoder = new ParameterValuesEncoder();
    if (biobj.getBiObjectParameters() != null) {
View Full Code Here

  public byte[] getTemplate() {
   
    byte[] contentBytes = null;
   
    try{
      ObjTemplate template = DAOFactory.getObjTemplateDAO().getBIObjectActiveTemplate(getObj().getId());
      if(template==null) throw new Exception("Active Template null");
      contentBytes = template.getContent();
      if(contentBytes==null) {
        EMFUserError userError = new EMFUserError(EMFErrorSeverity.ERROR, 2007);
        userError.setBundle("messages");
        throw userError;
      }
View Full Code Here

        throw new EMFUserError(EMFErrorSeverity.ERROR, "1001", messageBundle);
        }
 
        byte[] contentBytes = null;
        try {
      ObjTemplate template = DAOFactory.getObjTemplateDAO().getBIObjectActiveTemplate(obj.getId());
      if (template == null)
          throw new Exception("Active Template null");
      contentBytes = template.getContent();
      if (contentBytes == null)
          throw new Exception("Content of the Active template null");
        } catch (Exception e) {
        logger.error("Error while recovering template content: \n" , e);
        throw new EMFUserError(EMFErrorSeverity.ERROR, "1002", messageBundle);
View Full Code Here

  private SourceBean getTemplate(String documentId) throws EMFUserError{
    logger.debug("IN");
    SourceBean content = null;
    byte[] contentBytes = null;
    try {
      ObjTemplate template = DAOFactory.getObjTemplateDAO().getBIObjectActiveTemplate(Integer.valueOf(documentId));
      if (template == null) {
        logger.warn("Active Template null.");
        throw new Exception("Active Template null.");
      }
      contentBytes = template.getContent();
      if (contentBytes == null) {
        logger.warn("Content of the Active template null.");
        throw new Exception("Content of the Active template null");
      }
      // get bytes of template and transform them into a SourceBean
View Full Code Here

  obj.setEngine(engine);

  String template = (String) mapPar.get("TEMPLATE");
  //ObjTemplate objTemp = obj.getActiveTemplate();
  ObjTemplate objTemp = new ObjTemplate();
  objTemp.setName("etlTemplate.xml");
  objTemp.setContent(template.getBytes());

  Domain domain = null;
  try {
      DAOFactory.getBIObjectDAO().modifyBIObject(obj, objTemp);
      domain = DAOFactory.getDomainDAO().loadDomainById(engine.getBiobjTypeId());
View Full Code Here

  obj.setEngine(engine);
  obj.setCreationUser(user);

  String template = (String) mapPar.get("TEMPLATE");
  //ObjTemplate objTemp = obj.getActiveTemplate();
  ObjTemplate objTemp = new ObjTemplate();
  objTemp.setName("etlTemplate.xml");
  objTemp.setContent(template.getBytes());
 
  obj.setBiObjectTypeID(typeIdInt);
  obj.setBiObjectTypeCode(type);

  obj.setStateCode(state);
View Full Code Here

        if (checkNeeded && !UserProfile.isSchedulerUser(user) && !UserProfile.isWorkflowUser(user&& !isSubReportCall(biobj, parameters)) {
          checkRequestCorrectness(user, biobj, parameters);
        }
       
        IObjTemplateDAO tempdao = DAOFactory.getObjTemplateDAO();
        ObjTemplate temp = tempdao.getBIObjectActiveTemplate(biobj.getId());
        if (temp==null){
           logger.warn("The template dor document [" + id + "] is NULL");
           throw new SecurityException("The template dor document [" + id + "] is NULL");
        }
        byte[] template = temp.getContent();
 
        BASE64Encoder bASE64Encoder = new BASE64Encoder();
        content.setContent(bASE64Encoder.encode(template));
        logger.debug("template read");
        content.setFileName(temp.getName());       
    } catch (NumberFormatException e) {
        logger.error("NumberFormatException", e);
        throw e;
    } catch (EMFUserError e) {
        logger.error("EMFUserError", e);
View Full Code Here

        if (!UserProfile.isSchedulerUser(user) && !UserProfile.isWorkflowUser(user&& !isSubReportCall(biobj, parameters)) {
          checkRequestCorrectness(user, biobj, parameters);
        }
       
        IObjTemplateDAO tempdao = DAOFactory.getObjTemplateDAO();
        ObjTemplate temp = tempdao.getBIObjectActiveTemplate(biobj.getId());
        if (temp==null){
           logger.warn("The template dor document [" + label + "] is NULL");
           throw new SecurityException("The template dor document [" + label + "] is NULL");
        }
        byte[] template = temp.getContent();
 
        BASE64Encoder bASE64Encoder = new BASE64Encoder();
        content.setContent(bASE64Encoder.encode(template));
        logger.debug("template read");
        content.setFileName(temp.getName());       
    } catch (NumberFormatException e) {
        logger.error("NumberFormatException", e);
        throw e;
    } catch (EMFUserError e) {
        logger.error("EMFUserError", e);
View Full Code Here

      if(engines.isEmpty()) {
        throw new Exception(" No suitable engines for the new document");
      }
      Engine engine = (Engine)engines.get(0);   
      // load the template
      ObjTemplate objTemp = new ObjTemplate();
      objTemp.setActive(new Boolean(true));
      objTemp.setContent(response);
      objTemp.setName(docName + fileExt);
      // load all functionality
      /*orig
      List storeInFunctionalities = new ArrayList();
      String functIdsConcat = sInfo.getFunctionalityIds();
      String[] functIds =  functIdsConcat.split(",");
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.