Examples of IObjTemplateDAO


Examples of it.eng.spagobi.analiticalmodel.document.dao.IObjTemplateDAO

     * Add subreport informations
     */
    private Map addBISubreports(BIObject reportBObject, Map pars) {
    ISubreportDAO subreportDAO;
    IBIObjectDAO bobjectDAO;
    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);
       
View Full Code Here

Examples of it.eng.spagobi.analiticalmodel.document.dao.IObjTemplateDAO

    if (biobj == null) {
        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();
View Full Code Here

Examples of it.eng.spagobi.analiticalmodel.document.dao.IObjTemplateDAO

       
        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();
View Full Code Here

Examples of it.eng.spagobi.analiticalmodel.document.dao.IObjTemplateDAO

        //check visibility on document and parameter values
        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();
View Full Code Here

Examples of it.eng.spagobi.analiticalmodel.document.dao.IObjTemplateDAO

    return parameters;
  }
 
  private ObjTemplate getTemplate(BIObject biObject) {
    ObjTemplate template;
    IObjTemplateDAO templateDAO;
   
    logger.debug("IN");
   
    try {
      Assert.assertNotNull(biObject, "Input [biObject] cannot be null");
     
      templateDAO = DAOFactory.getObjTemplateDAO();
      Assert.assertNotNull(templateDAO, "Impossible to instantiate templateDAO");
   
      template = templateDAO.getBIObjectActiveTemplate( biObject.getId() );
      Assert.assertNotNull(template, "Loaded template cannot be null")
     
      logger.debug("Active template [" + template.getName() + "] of document [" + biObject.getLabel() + "] loaded succesfully");
    } catch(Throwable t) {
      throw new RuntimeException("Impossible to load template for document [" + biObject.getLabel()+ "]", t);
View Full Code Here

Examples of it.eng.spagobi.analiticalmodel.document.dao.IObjTemplateDAO

    return parameters;
  }
 
  private ObjTemplate getTemplate(BIObject biObject) {
    ObjTemplate template;
    IObjTemplateDAO templateDAO;
   
    logger.debug("IN");
   
    try {
      Assert.assertNotNull(biObject, "Input [biObject] cannot be null");
     
      templateDAO = DAOFactory.getObjTemplateDAO();
      Assert.assertNotNull(templateDAO, "Impossible to instantiate templateDAO");
   
      template = templateDAO.getBIObjectActiveTemplate( biObject.getId() );
      Assert.assertNotNull(template, "Loaded template cannot be null")
     
      logger.debug("Active template [" + template.getName() + "] of document [" + biObject.getLabel() + "] loaded succesfully");
    } catch(Throwable t) {
      throw new RuntimeException("Impossible to load template for document [" + biObject.getLabel()+ "]", t);
View Full Code Here

Examples of it.eng.spagobi.analiticalmodel.document.dao.IObjTemplateDAO

    return parameters;
  }
 
  private ObjTemplate getTemplate(BIObject biObject) {
    ObjTemplate template;
    IObjTemplateDAO templateDAO;
   
    logger.debug("IN");
   
    try {
      Assert.assertNotNull(biObject, "Input [biObject] cannot be null");
     
      templateDAO = DAOFactory.getObjTemplateDAO();
      Assert.assertNotNull(templateDAO, "Impossible to instantiate templateDAO");
   
      template = templateDAO.getBIObjectActiveTemplate( biObject.getId() );
      Assert.assertNotNull(template, "Loaded template cannot be null")
     
      logger.debug("Active template [" + template.getName() + "] of document [" + biObject.getLabel() + "] loaded succesfully");
    } catch(Throwable t) {
      throw new RuntimeException("Impossible to load template for document [" + biObject.getLabel()+ "]", t);
View Full Code Here

Examples of it.eng.spagobi.analiticalmodel.document.dao.IObjTemplateDAO

   
      freezeHttpResponse();
      HttpServletResponse httpResp = getHttpResponse();
      String idTemplateStr = (String)request.getAttribute("TEMP_ID");
      Integer idTemplate = new Integer(idTemplateStr);
      IObjTemplateDAO objtempdao = DAOFactory.getObjTemplateDAO();
      ObjTemplate objTemp = objtempdao.loadBIObjectTemplate(idTemplate)
      byte[] content = objTemp.getContent();
      httpResp.setHeader("Content-Disposition","attachment; filename=\"" + objTemp.getName() + "\";");
      httpResp.setContentLength(content.length);
      httpResp.getOutputStream().write(content);
      httpResp.getOutputStream().flush();
View Full Code Here

Examples of it.eng.spagobi.analiticalmodel.document.dao.IObjTemplateDAO

   * @return the active template
   */
  public ObjTemplate getActiveTemplate() {
    ObjTemplate template = null;
    try{
      IObjTemplateDAO objtempdao = DAOFactory.getObjTemplateDAO();
      template = objtempdao.getBIObjectActiveTemplate(this.getId());
    } catch(Exception e) {
      SpagoBITracer.major(SpagoBIConstants.NAME_MODULE, this.getClass().getName(),
                "getActiveTemplate", "Error while recovering current template \n", e);
    }
    return template;
View Full Code Here

Examples of it.eng.spagobi.analiticalmodel.document.dao.IObjTemplateDAO

   * @return the template list
   */
  public List getTemplateList() {
    List templates = new ArrayList();
    try{
      IObjTemplateDAO objtempdao = DAOFactory.getObjTemplateDAO();
      templates = objtempdao.getBIObjectTemplateList(this.getId());
    } catch(Exception e) {
      SpagoBITracer.major(SpagoBIConstants.NAME_MODULE, this.getClass().getName(),
                "getTemplateList", "Error while recovering template list\n", e);
    }
    return templates;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.