Package it.eng.spagobi.utilities.engines

Examples of it.eng.spagobi.utilities.engines.SpagoBIEngineStartupException


  public SourceBean getTemplateAsSourceBean() {
    SourceBean templateSB = null;
    try {
      templateSB = SourceBean.fromXMLString(getTemplateAsString());
    } catch (SourceBeanException e) {
      SpagoBIEngineStartupException engineException = new SpagoBIEngineStartupException("CommonJ", "Impossible to parse template's content", e);
      engineException.setDescription("Impossible to parse template's content:  " + e.getMessage());
      engineException.addHint("Check if the document's template is a well formed xml file");
      throw engineException;
    }   

    return templateSB;
  }
View Full Code Here


    HashMap requestParameters;

    if(template == null) {
      contentProxy = getContentServiceProxy();
      if(contentProxy == null) {
        throw new SpagoBIEngineStartupException("SpagoBIQbeEngine",
            "Impossible to instatiate proxy class [" + ContentServiceProxy.class.getName() + "] " +
            "in order to retrive the template of document [" + documentId + "]");
      }

      requestParameters = ParametersDecoder.getDecodedRequestParameters(httpRequest);
      if(documentId != null){
        template = contentProxy.readTemplate(documentId, requestParameters);
      }
      else if(documentLabel != null){
        template = contentProxy.readTemplateByLabel(documentLabel, requestParameters);
     
      try {
        if(template == null)throw new SpagoBIEngineRuntimeException("There are no template associated to document [" + documentId + "]");
        templateContent = DECODER.decodeBuffer(template.getContent());
      } catch (Throwable e) {
        SpagoBIEngineStartupException engineException = new SpagoBIEngineStartupException("COmmonj", "Impossible to get template's content", e);
        engineException.setDescription("Impossible to get template's content:  " + e.getMessage());
        engineException.addHint("Check the document's template");
        throw engineException;
      }
    }
    return templateContent;
  }
View Full Code Here

TOP

Related Classes of it.eng.spagobi.utilities.engines.SpagoBIEngineStartupException

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.