Package it.eng.spago.base

Examples of it.eng.spago.base.ApplicationContainer


   * Gets the url builder.
   *
   * @return the url builder
   */
  public static IUrlBuilder getUrlBuilder() {
    ApplicationContainer spagoContext = ApplicationContainer.getInstance();
    IUrlBuilder urlBuilder = (IUrlBuilder)spagoContext.getAttribute(SpagoBIConstants.URL_BUILDER);
    if(urlBuilder==null) {
      SingletonConfig spagoconfig = SingletonConfig.getInstance();
      // get mode of execution
      String sbiMode = (String)spagoconfig.getConfigValue("SPAGOBI.SPAGOBI-MODE.mode");  
      if (sbiMode==null) {
        logger.error("SPAGOBI.SPAGOBI-MODE.mode IS NULL");
        sbiMode="WEB";
      }
      // based on mode get spago object and url builder
      if (sbiMode.equalsIgnoreCase("WEB")) {
        urlBuilder = new WebUrlBuilder();   
      } else if  (sbiMode.equalsIgnoreCase("PORTLET")){
        urlBuilder = new PortletUrlBuilder();
      }
      spagoContext.setAttribute(SpagoBIConstants.URL_BUILDER, urlBuilder);
   
    return urlBuilder;
  }
View Full Code Here


   * Gets the message builder.
   *
   * @return the message builder
   */
  public static IMessageBuilder getMessageBuilder() {
    ApplicationContainer spagoContext = ApplicationContainer.getInstance();
    IMessageBuilder msgBuilder = (IMessageBuilder)spagoContext.getAttribute(SpagoBIConstants.MESSAGE_BUILDER);
    if(msgBuilder==null) {
      msgBuilder = new MessageBuilder();
      spagoContext.setAttribute(SpagoBIConstants.MESSAGE_BUILDER, msgBuilder);
   
    return msgBuilder;
  }
View Full Code Here

TOP

Related Classes of it.eng.spago.base.ApplicationContainer

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.