Package railo.runtime.config

Examples of railo.runtime.config.ConfigWebImpl


  private static void queryCache(PageContext pc) {
    pc.getQueryCache().clear(pc);
  }

  private static void tagCache(PageContext pc) {
    ConfigWebImpl config=(ConfigWebImpl) pc.getConfig();
    PagePoolClear.clear(config.getServerTagMapping());
    PagePoolClear.clear(config.getTagMapping());
  }
View Full Code Here


    PagePoolClear.clear(config.getServerTagMapping());
    PagePoolClear.clear(config.getTagMapping());
  }
 
  private static void functionCache(PageContext pc) {
    ConfigWebImpl config=(ConfigWebImpl) pc.getConfig();
    config.clearFunctionCache();
    PagePoolClear.clear(config.getServerFunctionMapping());
    PagePoolClear.clear(config.getFunctionMapping());
   
  }
View Full Code Here

    return arr;
  }
 
  private static Set<String> _call(PageContext pc , String packageName) throws IOException, ApplicationException {
    PageContextImpl pci=(PageContextImpl) pc;
    ConfigWebImpl config = (ConfigWebImpl) pc.getConfig();
    Set<String> rtn=null;
    //var SEP=server.separator.file;
   
    // get enviroment configuration
    boolean searchLocal = config.getComponentLocalSearch();
    boolean searchRoot=config.getComponentRootSearch();
   
    String path=StringUtil.replace(packageName, ".", File.separator, false);
       
    // search local
    if(searchLocal) {
      //Resource dir=pc.getCurrentTemplatePageSource().getResourceTranslated(pc).getParentResource();
      //dir=dir.getRealResource(path);
      PageSource ps= pci.getRelativePageSourceExisting(path);
      if(ps!=null){
        Mapping mapping = ps.getMapping();
        String _path=ps.getRealpath();
        _path=ListUtil.trim(_path,"\\/");
        String[] list = _listMapping(pc,mapping,_path);
        if(!ArrayUtil.isEmpty(list)) rtn=add(rtn,list);
      }
    }
   
    // check mappings (this includes the webroot)
    if(searchRoot) { 
      String virtual="/"+StringUtil.replace(packageName, ".", "/", false);
      Mapping[] mappings = config.getMappings();
      Mapping mapping;
      String _path;
      String[] list;
      for(int i=0;i<mappings.length;i++){
        mapping=mappings[i];
        if(StringUtil.startsWithIgnoreCase(virtual, mapping.getVirtual()))  {
          _path=ListUtil.trim(virtual.substring(mapping.getVirtual().length()),"\\/").trim();
          _path=StringUtil.replace(_path, "/", File.separator, false);
          list = _listMapping(pc,mapping,_path);
          if(!ArrayUtil.isEmpty(list)) rtn=add(rtn,list);
        }
      }
    }
   
    // check component mappings
    Mapping[] mappings = config.getComponentMappings();
    Mapping mapping;
    String[] list;
    for(int i=0;i<mappings.length;i++){
      mapping=mappings[i];
      list=_listMapping(pc,mapping,path);
View Full Code Here

        RefBoolean isCustomSetting=new RefBooleanImpl();
            Resource configDir=getConfigDirectory(sg,configServer,countExistingContextes,isCustomSetting);
           
            QueryCacheSupport queryCache=QueryCacheSupport.getInstance();
            CFMLFactoryImpl factory=new CFMLFactoryImpl(this,queryCache);
            ConfigWebImpl config=ConfigWebFactory.newInstance(factory,configServer,configDir,isCustomSetting.toBooleanValue(),sg);
            factory.setConfig(config);
            return factory;
        }
        catch (Exception e) {
            ServletException se= new ServletException(e.getMessage());
View Full Code Here

TOP

Related Classes of railo.runtime.config.ConfigWebImpl

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.