Package it.eng.spagobi.services.execute.service

Source Code of it.eng.spagobi.services.execute.service.ServiceKpiValueXml

package it.eng.spagobi.services.execute.service;

import it.eng.spago.error.EMFUserError;
import it.eng.spagobi.commons.dao.DAOFactory;
import it.eng.spagobi.services.common.SsoServiceFactory;
import it.eng.spagobi.services.common.SsoServiceInterface;
import it.eng.spagobi.services.security.exceptions.SecurityException;

import org.apache.log4j.Logger;

public class ServiceKpiValueXml {
 
  private static transient Logger logger=Logger.getLogger(ServiceKpiValueXml.class);
 
  public String getKpiValueXML(String token, String user,Integer kpiValueID){
    logger.debug("IN");
    SsoServiceInterface proxyService = SsoServiceFactory.createProxyService();
    String xml = "";
    try {
     
      proxyService.validateTicket(token, user);
      logger.debug("Token validated");
      xml = DAOFactory.getKpiDAO().loadKPIValueXml(kpiValueID);
      logger.debug("Xml Retrieved");
     
    } catch (EMFUserError e) {
      e.printStackTrace();
      logger.error("Problem while retrieving xml of Kpivalue with id "+(kpiValueID!=null?kpiValueID:"null"),e);
    } catch (SecurityException e) {
      e.printStackTrace();
      logger.error("Security Exception while retrieving xml of Kpivalue with id "+(kpiValueID!=null?kpiValueID:"null"),e);
   
    logger.debug("OUT");
    return xml;
  }
}
TOP

Related Classes of it.eng.spagobi.services.execute.service.ServiceKpiValueXml

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.