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

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


   
    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);
    } finally {
      logger.debug("OUT");
    }
View Full Code Here


   */
  protected Map getMap(BIObject biobj, IEngUserProfile profile, String roleName) {
    logger.debug("IN");
    Map pars = new Hashtable();
    try {
      ObjTemplate objtemplate = DAOFactory.getObjTemplateDAO().getBIObjectActiveTemplate(biobj.getId());
      if (objtemplate == null)
        throw new Exception("Active Template null");
      byte[] template = objtemplate.getContent();
      if (template == null)
        throw new Exception("Content of the Active template null");
      String documentId = biobj.getId().toString();
      pars.put("document", documentId);
      pars.put("query", "dynamicOlap");
View Full Code Here

  try {
      IBIObjectDAO objdao = DAOFactory.getBIObjectDAO();
      objdao.setUserID(user);
      Integer docId = new Integer(documentiId);
      BIObject biobj = objdao.loadBIObjectById(docId);
      ObjTemplate objTemp = new ObjTemplate();
      objTemp.setBiobjId(biobj.getId());
      objTemp.setActive(new Boolean(true));
      objTemp.setContent(content.getBytes());
      objTemp.setName(templateName);
      objdao.modifyBIObject(biobj, objTemp);
  } catch (NumberFormatException e) {
      logger.error("NumberFormatException",e);
      return "KO";
  } catch (EMFUserError e) {
View Full Code Here

          && engine.getClassName() != null && engine.getClassName().equals("it.eng.spagobi.engines.chart.SpagoBIChartInternalEngine")) {
        isChart = true;
      }

      if (isChart) {
        ObjTemplate template = biobj.getActiveTemplate();
        if (template != null) {
          try {
            byte[] tempFileCont = template.getContent();
            String tempFileStr = new String(tempFileCont);
            SourceBean tempFileSB = SourceBean.fromXMLString(tempFileStr);
            SourceBean datasetnameSB = (SourceBean) tempFileSB.getFilteredSourceBeanAttribute("CONF.PARAMETER", "name", "confdataset");
            if (datasetnameSB != null) {
              String datasetLabel = (String) datasetnameSB.getAttribute("value");
View Full Code Here

      hibBIObj.setRefreshSeconds(biobj.getRefreshSeconds());
      hibBIObj.setProfiledVisibility(biobj.getProfiledVisibility());
      Transaction tx = session.beginTransaction();
      session.save(hibBIObj);
      tx.commit();
      ObjTemplate template = biobj.getActiveTemplate();
      if (template == null) {
        logger.warn("Biobject with id = " + biobj.getId() + ", label = " + biobj.getLabel() + " and name = " + biobj.getName() +
        " has not active template!!");
      } else {
        insertBIObjectTemplate(hibBIObj, template, session);
View Full Code Here


  public void manageExport(BIObject biobj, Session session ) throws EMFUserError {

    List objsToInsert=new ArrayList();
    ObjTemplate template = biobj.getActiveTemplate();
    if (template != null) {
      try {
        byte[] tempFileCont = template.getContent();
        String tempFileStr = new String(tempFileCont);
        SourceBean tempFileSB = SourceBean.fromXMLString(tempFileStr);


        String modelInstanceLabel = (String) tempFileSB.getAttribute("model_node_instance");
View Full Code Here

  throws EMFUserError {

    logger.debug("IN");

    // get the template
    ObjTemplate template = biobj.getActiveTemplate();
    if (template != null) {
      try {
        byte[] tempFileCont = template.getContent();
        String tempFileStr = new String(tempFileCont);
        //        byte[] templateContent = DECODER.decodeBuffer(new String(template.getContent()));
        //        String tempFileStr = new String(templateContent);
        //System.out.println(tempFileStr);
        JSONObject jsonObject = null;
View Full Code Here

  /* (non-Javadoc)
   * @see it.eng.spagobi.analiticalmodel.document.dao.IObjTemplateDAO#loadBIObjectTemplate(java.lang.Integer)
   */
  public ObjTemplate loadBIObjectTemplate(Integer tempId) throws EMFInternalError {
    ObjTemplate objTemp = new ObjTemplate();
    Session aSession = null;
    Transaction tx = null;   
    try {
      aSession = getSession();
      tx = aSession.beginTransaction();
View Full Code Here

  /* (non-Javadoc)
   * @see it.eng.spagobi.analiticalmodel.document.dao.IObjTemplateDAO#getBIObjectActiveTemplate(java.lang.Integer)
   */
  public ObjTemplate getBIObjectActiveTemplate(Integer biobjId) throws EMFInternalError {
    ObjTemplate objTemp = new ObjTemplate();
    Session aSession = null;
    Transaction tx = null;   
    try {
      aSession = getSession();
      tx = aSession.beginTransaction();
View Full Code Here

   */
  public ObjTemplate getBIObjectActiveTemplateByLabel(String label) throws EMFInternalError {



    ObjTemplate objTemp = new ObjTemplate();
    Session aSession = null;
    Transaction tx = null;   
    try {
      aSession = getSession();
      tx = aSession.beginTransaction();
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.