Package it.eng.spago.configuration

Examples of it.eng.spago.configuration.ConfigSingleton


  }

 
  public String getResourceLinkByTheme(HttpServletRequest aHttpServletRequest, String originalUrl, String theme){
    logger.debug("IN");
    ConfigSingleton config = ConfigSingleton.getInstance();
    String rootPath=config.getRootPath();
    String urlByTheme=originalUrl;
    originalUrl.trim();
    if(originalUrl.startsWith("/"))
      originalUrl=originalUrl.substring(1);
View Full Code Here


 
 
 
  public String getResourceLinkByTheme(HttpServletRequest aHttpServletRequest, String originalUrl, String theme){
    logger.debug("IN");
    ConfigSingleton config = ConfigSingleton.getInstance();
    String rootPath=config.getRootPath();
    String urlByTheme=originalUrl;
    originalUrl.trim();
    if(originalUrl.startsWith("/"))
      originalUrl=originalUrl.substring(1);
View Full Code Here

 
  // logger component
  private static Logger logger = Logger.getLogger(DocumentsBrowserConfig.class);
 
  private DocumentsBrowserConfig() {
    ConfigSingleton config = ConfigSingleton.getInstance();
    configSB = (SourceBean)config.getAttribute("DOCUMENT_BROWSER");
    logger.debug ("SpagoBI Document Browser configuration retrived");
  }
View Full Code Here

  public static int getImportFileMaxSize() {
    logger.debug("IN");
    int toReturn = MAX_DEFAULT_IMPORT_FILE_SIZE;
    try {
      ConfigSingleton serverConfig = ConfigSingleton.getInstance();
      SourceBean maxSizeSB = (SourceBean) serverConfig.getAttribute("IMPORTEXPORT.IMPORT_FILE_MAX_SIZE");
      if (maxSizeSB != null) {
        String maxSizeStr = (String) maxSizeSB.getCharacters();
        logger.debug("Configuration found for max import file size: " + maxSizeStr);
        Integer maxSizeInt = new Integer(maxSizeStr);
        toReturn = maxSizeInt.intValue();
View Full Code Here

  public static String getImportTempFolderPath() {
    logger.debug("IN");
    String toReturn = null;
    try {
      ConfigSingleton conf = ConfigSingleton.getInstance();
      SourceBean importerSB = (SourceBean) conf.getAttribute("IMPORTEXPORT.IMPORTER");
      toReturn = (String) importerSB.getAttribute("tmpFolder");
      toReturn = GeneralUtilities.checkForSystemProperty(toReturn);
      if (!toReturn.startsWith("/") && toReturn.charAt(1) != ':') {
        String root = ConfigSingleton.getRootPath();
        toReturn = root + "/" + toReturn;
View Full Code Here

  public static IImportManager getImportManagerInstance() throws Exception {
    logger.debug("IN");
    IImportManager toReturn = null;
    try {
      ConfigSingleton conf = ConfigSingleton.getInstance();
      SourceBean importerSB = (SourceBean) conf.getAttribute("IMPORTEXPORT.IMPORTER");
      // instance the importer class
      String impClassName = (String) importerSB.getAttribute("class");
      Class impClass = Class.forName(impClassName);
      toReturn = (IImportManager) impClass.newInstance();
    } catch (Exception e) {
View Full Code Here

 
  private static Object createDAOInstance(String daoName) {
    logger.debug("Begin Istantiation of DAO ["+daoName+"]");
    Object daoObject = null;
    try {
      ConfigSingleton configSingleton=ConfigSingleton.getInstance();
      SourceBean daoConfigSourceBean =(SourceBean) configSingleton.getFilteredSourceBeanAttribute("SPAGOBI.DAO-CONF.DAO","name", daoName);
      String daoClassName = (String)daoConfigSourceBean.getAttribute("implementation");
      logger.debug("DAO ["+daoName+"] Implementation class ["+daoClassName+"]");
      daoObject = Class.forName(daoClassName).newInstance();
    } catch (Exception e) {
      throw new SpagoBIRuntimeException("Cannot instantiate " + daoName, e);
View Full Code Here

  public boolean validate(String serviceType, String serviceName, RequestContextIFace context)  {
    RequestContainer requestContainer = context.getRequestContainer();
    ResponseContainer responseContainer = context.getResponseContainer();
    _serviceName = serviceName;
    _serviceType = serviceType;
    ConfigSingleton config = ConfigSingleton.getInstance();
   
    Object objServices = config.getFilteredSourceBeanAttribute(
        ValidatorLocator.VALIDATION_CONFIG_HEADER,
        ValidatorLocator.VALIDATION_SERVICE_NAME, _serviceName);
   
    if (objServices instanceof SourceBean)
      _serviceValidations = (SourceBean) objServices;
View Full Code Here

    columnsField = msgBuilder.getMessage("SBIDev.queryWiz.columnsField", "messages", httpRequest);
   
    serviceRequest = requestContainer.getServiceRequest();
    serviceResponse = responseContainer.getServiceResponse();
    errorHandler = responseContainer.getErrorHandler();
    ConfigSingleton configure = ConfigSingleton.getInstance();
    if(moduleName != null) {
      SpagoBITracer.debug(SpagoBIConstants.NAME_MODULE, this.getClass().getName(),
                      "doStartTag", "Module Name: " + moduleName);
      moduleResponse = (SourceBean)serviceResponse.getAttribute(moduleName);
    } else {
View Full Code Here

    UUIDGenerator uuidGen  = UUIDGenerator.getInstance();
    UUID uuid = uuidGen.generateTimeBasedUUID();
    requestIdentity = uuid.toString();
    requestIdentity = requestIdentity.replaceAll("-", "");

    ConfigSingleton configure = ConfigSingleton.getInstance();
    if (_actionName != null) {
      _serviceName = _actionName;
      _content = _serviceResponse;
      SourceBean actionBean =  (SourceBean) configure.getFilteredSourceBeanAttribute("ACTIONS.ACTION", "NAME", _actionName);
      _layout = (SourceBean) actionBean.getAttribute("CONFIG");
      if (_layout == null) {
        // if the layout is dinamically created it is an attribute of the response
        _layout = (SourceBean) _serviceResponse.getAttribute("CONFIG");
      }
      _providerURL = "ACTION_NAME=" + _actionName + "&";
      _providerUrlMap.put("ACTION_NAME", _actionName);
      HashMap params = (HashMap) _serviceResponse.getAttribute("PARAMETERS_MAP");
      if (params != null) {
        _paramsMap = params;
        _providerUrlMap.putAll(_paramsMap);
      }


    } // if (_actionName != null)
    else if (_moduleName != null) {
      _serviceName = _moduleName;
      logger.debug(" Module Name: " + _moduleName);
      _content = (SourceBean) _serviceResponse.getAttribute(_moduleName);
      SourceBean moduleBean = (SourceBean) configure.getFilteredSourceBeanAttribute("MODULES.MODULE", "NAME", _moduleName);
      if(moduleBean!=null) logger.debug(" configuration loaded");
      _layout = (SourceBean) moduleBean.getAttribute("CONFIG");
      if (_layout == null) {
        // if the layout is dinamically created it is an attribute of the response
        _layout = (SourceBean) _serviceResponse.getAttribute(_moduleName + ".CONFIG");
View Full Code Here

TOP

Related Classes of it.eng.spago.configuration.ConfigSingleton

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.