Package railo.runtime.config

Examples of railo.runtime.config.ConfigWebImpl


        try {
      cfc = ComponentLoader.loadComponent(pageContext,null,source.getPageSource(), source.getFilename().substring(0,source.getFilename().length()-(pageContext.getConfig().getCFCExtension().length()+1)), false,true);
    }
    catch (PageException e) {
      Mapping m = source.getPageSource().getMapping();
      ConfigWebImpl c=(ConfigWebImpl) pageContext.getConfig();
      if(m==c.getTagMapping()) m=c.getServerTagMapping();
      else m=null;
      // is te page source from a tag mapping, so perhaps it was moved from server to web context
      if(m!=null){
        PageSource ps = m.getPageSource(source.getFilename());
        try {
View Full Code Here


    try {
      pc.setSilent();
      // load the cfc
      try {
              if(fromGateway && strRemotePersisId!=null) {
                ConfigWebImpl config=(ConfigWebImpl) pc.getConfig();
                GatewayEngineImpl engine = config.getGatewayEngine();
                component=engine.getPersistentRemoteCFC(strRemotePersisId);
               
                if(component==null) {
                  component=newInstance(pc,getPageSource().getComponentName(),false);
                  if(!fromGateway)component=ComponentWrap.toComponentWrap(Component.ACCESS_REMOTE,component);
View Full Code Here

    if(parent!=null){
      pc=parent;
      ThreadLocalPageContext.register(pc);
    }
    else {
      ConfigWebImpl cwi;
      try {
        cwi = (ConfigWebImpl)config;
        DevNullOutputStream os = DevNullOutputStream.DEV_NULL_OUTPUT_STREAM;
        pc=ThreadUtil.createPageContext(cwi, os, serverName, requestURI, queryString, SerializableCookie.toCookies(cookies), headers, parameters, attributes);
        pc.setRequestTimeout(requestTimeout);
        p=PageSourceImpl.loadPage(pc, cwi.getPageSources(oldPc==null?pc:oldPc,null, template, false,false,true));
        //p=cwi.getPageSources(oldPc,null, template, false,false,true).loadPage(cwi);
      } catch (PageException e) {
        return e;
      }
        pc.addPageSource(p.getPageSource(), true);
View Full Code Here

  public static Mapping[] toMappings(ConfigWeb cw,Object o, Resource source) throws PageException {
    Struct sct = Caster.toStruct(o);
    Iterator<Entry<Key, Object>> it = sct.entryIterator();
    Entry<Key, Object> e;
    java.util.List<Mapping> mappings=new ArrayList<Mapping>();
    ConfigWebImpl config=(ConfigWebImpl) cw;
    String virtual,physical;
    while(it.hasNext()) {
      e = it.next();
      virtual=translateMappingVirtual(e.getKey().getString());
      physical=translateMappingPhysical(Caster.toString(e.getValue()),source);
      mappings.add(config.getApplicationMapping(virtual,physical));
     
    }
    return mappings.toArray(new Mapping[mappings.size()]);
  }
View Full Code Here

    }
    else {
      array=Caster.toArray(o);
    }
    MappingImpl[] mappings=new MappingImpl[array.size()];
    ConfigWebImpl config=(ConfigWebImpl) cw;
    for(int i=0;i<mappings.length;i++) {
     
      mappings[i]=(MappingImpl) config.createCustomTagAppMappings("/"+i,Caster.toString(array.getE(i+1)).trim());
      /*mappings[i]=new MappingImpl(
          config,"/"+i,
          Caster.toString(array.getE(i+1)).trim(),
          null,false,true,false,false,false
          );*/
 
View Full Code Here

      if(config instanceof ConfigServerImpl) {
        ConfigServerImpl cs=(ConfigServerImpl) config;
        factories = cs.getJSPFactories();
      }
      else {
          ConfigWebImpl cw=(ConfigWebImpl) config;
        factories = new CFMLFactory[]{cw.getFactory()};
      }
       
        railo.runtime.type.Query qry=
          new QueryImpl(
              new Collection.Key[]{
                  KeyConstants._path,
                  KeyConstants._id,KeyConstants._hash,
                  KeyConstants._label,
                  HAS_OWN_SEC_CONTEXT,
                  KeyConstants._url,
                  CONFIG_FILE,
                  CLIENT_SIZE,CLIENT_ELEMENTS,SESSION_SIZE,SESSION_ELEMENTS},
              factories.length,getString("admin",action,"returnVariable"));
        pageContext.setVariable(getString("admin",action,"returnVariable"),qry);
        ConfigWebImpl cw;
        for(int i=0;i<factories.length;i++) {
          int row=i+1;
            CFMLFactoryImpl factory = (CFMLFactoryImpl) factories[i];
            cw = (ConfigWebImpl) factory.getConfig();
            qry.setAtEL(KeyConstants._path,row,ReqRspUtil.getRootPath(factory.getConfigWebImpl().getServletContext()));
           
            qry.setAtEL(CONFIG_FILE,row,factory.getConfigWebImpl().getConfigFile().getAbsolutePath());
            if(factory.getURL()!=null)qry.setAtEL(KeyConstants._url,row,factory.getURL().toExternalForm());
           

            qry.setAtEL(KeyConstants._id,row,factory.getConfig().getId());
            qry.setAtEL(KeyConstants._hash,row,SystemUtil.hash(factory.getConfigWebImpl().getServletContext()));
            qry.setAtEL(KeyConstants._label,row,factory.getLabel());
            qry.setAtEL(HAS_OWN_SEC_CONTEXT,row,Caster.toBoolean(cw.hasIndividualSecurityManager()));

            setScopeDirInfo(qry,row,CLIENT_SIZE,CLIENT_ELEMENTS,cw.getClientScopeDir());
            setScopeDirInfo(qry,row,SESSION_SIZE,SESSION_ELEMENTS,cw.getSessionScopeDir());
        }
    }
View Full Code Here

    }
    private void doGetLoggedDebugData() throws PageException {
     
      if(config instanceof ConfigServer) return ;
     
      ConfigWebImpl cw=(ConfigWebImpl) config;
     
     
      pageContext.setVariable(
                getString("admin",action,"returnVariable"),
                cw.getDebuggerPool().getData(pageContext));
    }
View Full Code Here

                getString("admin",action,"returnVariable"),
                sct);
       
       
        if(config instanceof ConfigWebImpl){
          ConfigWebImpl cw=(ConfigWebImpl) config;
          sct.setEL(KeyConstants._label, cw.getLabel());
          sct.setEL(KeyConstants._hash, cw.getHash());
          sct.setEL(KeyConstants._root, cw.getRootDirectory().getAbsolutePath());
            sct.setEL("configServerDir", cw.getConfigServerDir().getAbsolutePath());
            sct.setEL("configWebDir", cw.getConfigDir().getAbsolutePath());
        }
        else {
            sct.setEL("configServerDir", config.getConfigDir().getAbsolutePath());
            sct.setEL("configWebDir", pageContext.getConfig().getConfigDir().getAbsolutePath());
        }
View Full Code Here

    if(type==TYPE_WEB) {
      return config.getId();
      //return GetRailoId.createId(config.getId(), config.getConfigDir());
    }
    if(config instanceof ConfigWebImpl){
      ConfigWebImpl cwi = (ConfigWebImpl)config;
      return cwi.getServerId();
      //return GetRailoId.createId(cwi.getServerId(), cwi.getServerConfigDir());
    }
    if(config instanceof ConfigServer){
      return config.getId();
      //return GetRailoId.createId(config.getId(), config.getConfigDir());
View Full Code Here

    if(config instanceof ConfigServer) {
      ConfigServer cs=(ConfigServer) config;
      ConfigWeb[] webs = cs.getConfigWebs();
      Struct sct=new StructImpl();
      for(int i=0;i<webs.length;i++){
        ConfigWebImpl cw=(ConfigWebImpl) webs[i];
        try{
        sct.setEL(cw.getLabel(), ((CFMLFactoryImpl)cw.getFactory()).getInfo());
        }
        catch(Throwable t){}
      }
      pageContext.setVariable(getString("admin",action,"returnVariable"),sct);
     
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.