Package railo.runtime.type

Examples of railo.runtime.type.QueryImpl


     * @throws PageException
     *
     */
    private void doGetJavaCFXTags() throws PageException {
        Map map = config.getCFXTagPool().getClasses();
        railo.runtime.type.Query qry=new QueryImpl(new Collection.Key[]{
            KeyConstants._displayname,
            KeyConstants._sourcename,
            KeyConstants._readonly,
            KeyConstants._class,
            KeyConstants._name,
            KeyConstants._isvalid},0,"query");
        Iterator it = map.keySet().iterator();
       
        int row=0;
        while(it.hasNext()) {
            CFXTagClass tag=(CFXTagClass) map.get(it.next());
            if(tag instanceof JavaCFXTagClass) {
                row++;
                qry.addRow(1);
                JavaCFXTagClass jtag =(JavaCFXTagClass) tag;
                qry.setAt(KeyConstants._displayname,row,tag.getDisplayType());
                qry.setAt(KeyConstants._sourcename,row,tag.getSourceName());
                qry.setAt(KeyConstants._readonly,row,Caster.toBoolean(tag.isReadOnly()));
                qry.setAt(KeyConstants._isvalid,row,Caster.toBoolean(tag.isValid()));
                qry.setAt(KeyConstants._name,row,jtag.getName());
                qry.setAt(KeyConstants._class,row,jtag.getStrClass());
            }
           
        }
        pageContext.setVariable(getString("admin",action,"returnVariable"),qry);
    }
View Full Code Here


      String returnVariable=getString("admin",action,"returnVariable");
    pageContext.setVariable(returnVariable,_doGetLogSettings());
    }
   
    private Query _doGetLogSettings() throws  PageException {
      Query qry=new QueryImpl(
        new String[]{"name","level","path","virtualpath","class","maxFile","maxFileSize"},
        new String[]{"varchar","varchar","varchar","varchar","varchar","varchar","varchar"},
        0,railo.runtime.type.util.ListUtil.last("logs", '.'));
        int row=0;
       
View Full Code Here

    private void doGetDatasourceDriverList() throws PageException {
      Resource railoContext = ResourceUtil.toResourceExisting(pageContext ,"/railo-context/admin/dbdriver/");
      Resource[] children = railoContext.listResources(new ExtensionResourceFilter("cfc"));
      String rtnVar=getString("admin",action,"returnVariable");
     
      railo.runtime.type.Query qry=new QueryImpl(new String[]{"name"},children.length,rtnVar);
        
     
      for(int i=0;i<children.length;i++) {
        qry.setAt("name", i+1, children[i].getName());
      }
      pageContext.setVariable(rtnVar,qry);
       
    }
View Full Code Here

  private void doGetDebuggingList() throws PageException {
      Resource railoContext = ResourceUtil.toResourceExisting(pageContext ,"/railo-context/templates/debugging/");
      Resource[] children = railoContext.listResources(new ExtensionResourceFilter("cfm"));
      String rtnVar=getString("admin",action,"returnVariable");
     
      railo.runtime.type.Query qry=new QueryImpl(new String[]{"name"},children.length,rtnVar);
        
     
      for(int i=0;i<children.length;i++) {
        qry.setAt("name", i+1, children[i].getName());
      }
      pageContext.setVariable(rtnVar,qry);
       
    }
View Full Code Here

 
  private void doGetGatewayEntries() throws PageException  {
    Map entries = ((ConfigWebImpl)config).getGatewayEngine().getEntries();
    Iterator it = entries.entrySet().iterator();
    railo.runtime.type.Query qry=
      new QueryImpl(new String[]{"class","id","custom","cfcPath","listenerCfcPath","startupMode","state","readOnly"}, 0, "entries");
        Map.Entry entry;
        GatewayEntry ge;
        //Gateway g;
        int row=0;
        while(it.hasNext()){
      row++;
        entry=(Entry) it.next();
      ge=(GatewayEntry) entry.getValue();
      //g=ge.getGateway();
          qry.addRow();
          qry.setAtEL("class", row, ge.getClassName());
          qry.setAtEL("id", row, ge.getId());
          qry.setAtEL("listenerCfcPath", row, ge.getListenerCfcPath());
          qry.setAtEL("cfcPath", row, ge.getCfcPath());
          qry.setAtEL("startupMode", row, GatewayEntryImpl.toStartup(ge.getStartupMode(),"automatic"));
          qry.setAtEL("custom", row, ge.getCustom());
          qry.setAtEL("readOnly", row, Caster.toBoolean(ge.isReadOnly()));
          qry.setAtEL("state",row,GatewayEngineImpl.toStringState(GatewayUtil.getState(ge), "failed"));
         
        }
        pageContext.setVariable(getString("admin",action,"returnVariable"),qry);
  }
View Full Code Here

    ConfigServerImpl cs=(ConfigServerImpl) config;
    IntervallMonitor[] intervalls = cs.getIntervallMonitors();
    RequestMonitor[] requests = cs.getRequestMonitors();
   
    railo.runtime.type.Query qry=
      new QueryImpl(new Collection.Key[]{KeyConstants._name,KeyConstants._type,LOG_ENABLED,CLASS}, 0, "monitors");
    doGetMonitors(qry,intervalls);
    doGetMonitors(qry,requests);
   
        pageContext.setVariable(getString("admin",action,"returnVariable"),qry);
  }
View Full Code Here

 
 
  private void doGetCacheConnections() throws PageException  {
    Map conns = config.getCacheConnections();
    Iterator it = conns.entrySet().iterator();
    railo.runtime.type.Query qry=new QueryImpl(new String[]{"class","name","custom","default","readOnly","storage"}, 0, "connections");
        Map.Entry entry;
        CacheConnection cc;
        CacheConnection defObj=config.getCacheDefaultConnection(ConfigImpl.CACHE_DEFAULT_OBJECT);
        CacheConnection defTmp=config.getCacheDefaultConnection(ConfigImpl.CACHE_DEFAULT_TEMPLATE);
        CacheConnection defQry=config.getCacheDefaultConnection(ConfigImpl.CACHE_DEFAULT_QUERY);
        CacheConnection defRes=config.getCacheDefaultConnection(ConfigImpl.CACHE_DEFAULT_RESOURCE);
        CacheConnection defUDF=config.getCacheDefaultConnection(ConfigImpl.CACHE_DEFAULT_FUNCTION);
        int row=0;
        String def;
    while(it.hasNext()){
      row++;
        entry=(Entry) it.next();
      cc=(CacheConnection) entry.getValue();
          qry.addRow();
          def="";
          if(cc==defObj)def="object";
          if(cc==defTmp)def="template";
          if(cc==defQry)def="query";
          if(cc==defRes)def="resource";
          if(cc==defUDF)def="function";
          qry.setAtEL("class", row, cc.getClazz().getName());
          qry.setAtEL("name", row, cc.getName());
          qry.setAtEL("custom", row, cc.getCustom());
          qry.setAtEL("default", row, def);
          qry.setAtEL("readOnly", row, Caster.toBoolean(cc.isReadOnly()));
          qry.setAtEL("storage", row, Caster.toBoolean(cc.isStorage()));
         
        }
        pageContext.setVariable(getString("admin",action,"returnVariable"),qry);
  }
View Full Code Here

  private void doGetRemoteClients() throws PageException {
        RemoteClient[] clients = config.getRemoteClients();
        RemoteClient client;
        ProxyData pd;
        railo.runtime.type.Query qry=new QueryImpl(new String[]{"label","usage","securityKey","adminPassword","serverUsername","serverPassword","type","url",
            "proxyServer","proxyUsername","proxyPassword","proxyPort"},clients.length,"query");
       
        int row=0;

        for(int i=0;i<clients.length;i++) {
            client=clients[i];
            pd=client.getProxyData();
            row=i+1;
            qry.setAt("label",row,client.getLabel());
            qry.setAt("usage",row,client.getUsage());
            qry.setAt("securityKey",row,client.getSecurityKey());
            qry.setAt("adminPassword",row,client.getAdminPassword());
            qry.setAt("ServerUsername",row,client.getServerUsername());
            qry.setAt("ServerPassword",row,client.getServerPassword());
            qry.setAt("type",row,client.getType());
            qry.setAt("url",row,client.getUrl());
            qry.setAt("proxyServer",row,pd==null?"":pd.getServer());
            qry.setAt("proxyUsername",row,pd==null?"":pd.getUsername());
            qry.setAt("proxyPassword",row,pd==null?"":pd.getPassword());
            qry.setAt("proxyPort",row,pd==null?"":Caster.toString(pd.getPort()));
           
        }
        pageContext.setVariable(getString("admin",action,"returnVariable"),qry);
    }
View Full Code Here

    private void doGetDatasources() throws PageException {
       
       
        Map ds = config.getDataSourcesAsMap();
        Iterator it = ds.keySet().iterator();
        railo.runtime.type.Query qry=new QueryImpl(new String[]{"name","host","classname","dsn","DsnTranslated","database","port",
                "timezone","username","password","readonly"
                ,"grant","drop","create","revoke","alter","select","delete","update","insert"
                ,"connectionLimit","connectionTimeout","clob","blob","validate","storage","customSettings"},ds.size(),"query");
       
        int row=0;

        while(it.hasNext()) {
            Object key=it.next();
            DataSource d=(DataSource) ds.get(key);
            row++;
            qry.setAt(KeyConstants._name,row,key);
            qry.setAt(KeyConstants._host,row,d.getHost());
            qry.setAt("classname",row,d.getClazz().getName());
            //qry.setAt("driverversion",row,getDriverVersion(d.getClazz()));
            qry.setAt("dsn",row,d.getDsnOriginal());
            qry.setAt("database",row,d.getDatabase());
            qry.setAt(KeyConstants._port,row,d.getPort()<1?"":Caster.toString(d.getPort()));
            qry.setAt("dsnTranslated",row,d.getDsnTranslated());
            qry.setAt("timezone",row,toStringTimeZone(d.getTimeZone()));
            qry.setAt(KeyConstants._password,row,d.getPassword());
            qry.setAt(KeyConstants._username,row,d.getUsername());
            qry.setAt(KeyConstants._readonly,row,Caster.toBoolean(d.isReadOnly()));
            qry.setAt(KeyConstants._select,row,Boolean.valueOf(d.hasAllow(DataSource.ALLOW_SELECT)));
            qry.setAt(KeyConstants._delete,row,Boolean.valueOf(d.hasAllow(DataSource.ALLOW_DELETE)));
            qry.setAt(KeyConstants._update,row,Boolean.valueOf(d.hasAllow(DataSource.ALLOW_UPDATE)));
            qry.setAt(KeyConstants._create,row,Boolean.valueOf(d.hasAllow(DataSource.ALLOW_CREATE)));
            qry.setAt(KeyConstants._insert,row,Boolean.valueOf(d.hasAllow(DataSource.ALLOW_INSERT)));
            qry.setAt(KeyConstants._drop,row,Boolean.valueOf(d.hasAllow(DataSource.ALLOW_DROP)));
            qry.setAt(KeyConstants._grant,row,Boolean.valueOf(d.hasAllow(DataSource.ALLOW_GRANT)));
            qry.setAt(KeyConstants._revoke,row,Boolean.valueOf(d.hasAllow(DataSource.ALLOW_REVOKE)));
            qry.setAt(KeyConstants._alter,row,Boolean.valueOf(d.hasAllow(DataSource.ALLOW_ALTER)));

            qry.setAt("connectionLimit",row,d.getConnectionLimit()<1?"":Caster.toString(d.getConnectionLimit()));
            qry.setAt("connectionTimeout",row,d.getConnectionTimeout()<1?"":Caster.toString(d.getConnectionTimeout()));
            qry.setAt("customSettings",row,d.getCustoms());
            qry.setAt("blob",row,Boolean.valueOf(d.isBlob()));
            qry.setAt("clob",row,Boolean.valueOf(d.isClob()));
            qry.setAt("validate",row,Boolean.valueOf(d.validate()));
            qry.setAt("storage",row,Boolean.valueOf(d.isStorage()));
           
        }
        pageContext.setVariable(getString("admin",action,"returnVariable"),qry);
    }
View Full Code Here

      throw Caster.toPageException(e);
    }
      X509Certificate[] certs = installer.getCertificates();
      X509Certificate cert;
     
      Query qry=new QueryImpl(new String[]{"subject","issuer"},certs.length,"certificates");
      for(int i=0;i<certs.length;i++){
        cert=certs[i];
        qry.setAtEL("subject",i+1, cert.getSubjectDN().getName());
        qry.setAtEL("issuer",i+1, cert.getIssuerDN().getName());
      }
      return qry;
    }
View Full Code Here

TOP

Related Classes of railo.runtime.type.QueryImpl

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.