Package railo.runtime.config

Examples of railo.runtime.config.ConfigWebImpl


    if(pc!=null) {
      if(ac==null) ac= pc.getApplicationContext();
     
      // abs path
      if(path.startsWith("/")){
        ConfigWebImpl cwi=(ConfigWebImpl) config;
        PageSource ps = cwi.getPageSourceExisting(
            pc, ac==null?null:ac.getMappings(), path, false, false, true, false);
        //res=cwi.getPhysicalResourceExistingX(
        //    pc,
        //    ac==null?null:ac.getMappings(), path,
        //    false, false, true);
View Full Code Here


      }
    }
  }

  private void clean(ConfigWeb config, DataSource dataSource) throws PageException, SQLException  {
    ConfigWebImpl cwi=(ConfigWebImpl) config;
    DatasourceConnection dc=null;
   
    DatasourceConnectionPool pool = cwi.getDatasourceConnectionPool();
    try {
      dc=pool.getDatasourceConnection(null,dataSource,null,null);
      Log log=((ConfigImpl)config).getScopeLogger();
      SQLExecutor executor=SQLExecutionFactory.getInstance(dc);
      executor.clean(config, dc, type, engine,this, listener, log);
View Full Code Here

    super.init(engine);
  }

  @Override
  protected void _clean() {
    ConfigWebImpl cwi=(ConfigWebImpl) engine.getFactory().getConfig();
    Resource dir=type==Scope.SCOPE_CLIENT?cwi.getClientScopeDir():cwi.getSessionScopeDir();
   
    // for old files only the defintion from admin can be used
    long timeout=type==Scope.SCOPE_CLIENT?cwi.getClientTimeout().getMillis():cwi.getSessionTimeout().getMillis();
    long time = new DateTimeImpl(cwi).getTime()-timeout;
   
    try {
      // delete files that has expired
      AndResourceFilter andFilter = new AndResourceFilter(new ResourceFilter[]{EXT_FILTER,new ExpiresFilter(time,true)});
View Full Code Here

    super.init(engine);
   
  }

  protected void _clean() {
    ConfigWebImpl config = (ConfigWebImpl) engine.getFactory().getConfig();
    Map<String, CacheConnection> connections = config.getCacheConnections();
    CacheConnection cc;
   
    if(connections!=null) {
      Map.Entry<String, CacheConnection> entry;
      Iterator<Entry<String, CacheConnection>> it = connections.entrySet().iterator();
View Full Code Here

      return createInitFile(pageContext,isweb,filename);
    
    }
 
  public static InitFile createInitFile(PageContext pageContext,boolean isweb,String filename) {
      ConfigWebImpl config = (ConfigWebImpl) pageContext.getConfig();
      Mapping mapping=isweb?config.getTagMapping():config.getServerTagMapping();
     
      return new InitFile(
          mapping.getPageSource(filename),
          filename,
          filename.endsWith('.'+config.getCFCExtension()));
    
    }
View Full Code Here

          throw Caster.toPageException(t);
        }
  }

  private Page _compile(ConfigWeb config,Resource classRootDir, Boolean resetCL) throws IOException, SecurityException, IllegalArgumentException, PageException {
        ConfigWebImpl cwi=(ConfigWebImpl) config;
       
       
        byte[] barr = cwi.getCompiler().
          compile(cwi,this,cwi.getTLDs(),cwi.getFLDs(),classRootDir,getJavaName());
        Class<?> clazz = mapping.touchPCLCollection().loadClass(getClazz(), barr,isComponent());
        try{
          return  newInstance(clazz);
        }
        catch(Throwable t){
View Full Code Here

  }

  private static void addTagMetaData(PageContext pc,TagLib tl, TagLibTag tlt, String filename, boolean isWeb) {
      if(pc==null) return;
    try{
      ConfigWebImpl config=(ConfigWebImpl) pc.getConfig();
      PageSource ps = isWeb?
          config.getTagMapping().getPageSource(filename):
          config.getServerTagMapping().getPageSource(filename);
     
      Page p = ps.loadPage(pc);
      ComponentImpl c = ComponentLoader.loadComponent(pc, p, ps, filename, true,true);
      ComponentWrap cw = ComponentWrap.toComponentWrap(Component.ACCESS_PRIVATE,c);
      Struct meta = Caster.toStruct( cw.get(KeyConstants._metadata,null),null);
View Full Code Here

        }
     
        //if(allowRealpath){
          if(StringUtil.startsWith(path,'/')) {
            PageContextImpl pci=(PageContextImpl) pc;
            ConfigWebImpl cwi=(ConfigWebImpl) pc.getConfig();
            PageSource[] sources = cwi.getPageSources(pci, pc.getApplicationContext().getMappings(), path, false, pci.useSpecialMappings(), true);
            //Resource[] reses = cwi.getPhysicalResourcesX(pc,pc.getApplicationContext().getMappings(),path,false,pci.useSpecialMappings(),true);
            if(!ArrayUtil.isEmpty(sources)) {
             
              for(int i=0;i<sources.length;i++){
                if(sources[i].exists()) return sources[i].getResource();
View Full Code Here

          return res;
        }
       
        if(StringUtil.startsWith(destination,'/')) {
          PageContextImpl pci=(PageContextImpl) pc;
          ConfigWebImpl cwi=(ConfigWebImpl) pc.getConfig();
          PageSource[] sources = cwi.getPageSources(pci, pc.getApplicationContext().getMappings(), destination,
              false, pci.useSpecialMappings(),true);
          //Resource[] reses = cwi.getPhysicalResourcesX(pc,pc.getApplicationContext().getMappings(),destination,false,pci.useSpecialMappings(),true);
          if(!ArrayUtil.isEmpty(sources)) {
            for(int i=0;i<sources.length;i++){
              if(sources[i].exists() || parentExists(sources[i])) {
View Full Code Here

      }
     
      boolean isUNC;
        if(!(isUNC=isUNCPath(destination)) && StringUtil.startsWith(destination,'/')) {
          PageContextImpl pci=(PageContextImpl) pc;
          ConfigWebImpl cwi=(ConfigWebImpl) pc.getConfig();
          PageSource[] sources = cwi.getPageSources(pci, pc.getApplicationContext().getMappings(), destination, false,
              pci.useSpecialMappings(), SystemUtil.isWindows());
          //Resource[] arr = cwi.getPhysicalResources(pc,pc.getApplicationContext().getMappings(),destination,false,pci.useSpecialMappings(),SystemUtil.isWindows());
          if(!ArrayUtil.isEmpty(sources)) {
            for(int i=0;i<sources.length;i++){
              res=sources[i].getResource();
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.