Package railo.runtime.type

Examples of railo.runtime.type.QueryImpl


       
        String strLocale=getString("locale","english (united kingdom)");
        Locale locale = LocaleFactory.getLocale(strLocale);
       
        String[] timeZones = TimeZone.getAvailableIDs();
        railo.runtime.type.Query qry=new QueryImpl(new String[]{"id","display"},new String[]{"varchar","varchar"},timeZones.length,"timezones");
        Arrays.sort(timeZones);
        TimeZone timeZone;
        for(int i=0;i<timeZones.length;i++) {
            timeZone=TimeZone.getTimeZone(timeZones[i]);
            qry.setAt("id",i+1,timeZones[i]);
            qry.setAt("display",i+1,timeZone.getDisplayName(locale));
           
        }
        pageContext.setVariable(getString("admin",action,"returnVariable"),qry);
    }
View Full Code Here


        pageContext.setVariable(getString("admin",action,"returnVariable"),qry);
    }
   
    private void doGetCPPCFXTags() throws PageException {
        Map map = config.getCFXTagPool().getClasses();
        railo.runtime.type.Query qry=new QueryImpl(new Collection.Key[]{
            KeyConstants._displayname,
            KeyConstants._sourcename,
            KeyConstants._readonly,
            PROCEDURE,
            KeyConstants._name,
            KeyConstants._isvalid,
            SERVER_LIBRARY,
            KEEP_ALIVE},0,"query");
        Iterator it = map.keySet().iterator();
       
        int row=0;
        while(it.hasNext()) {
            CFXTagClass tag=(CFXTagClass) map.get(it.next());
            if(tag instanceof CPPCFXTagClass) {
                row++;
                qry.addRow(1);
                CPPCFXTagClass ctag =(CPPCFXTagClass) 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,ctag.getName());
                qry.setAt(PROCEDURE,row,ctag.getProcedure());
                qry.setAt(SERVER_LIBRARY,row,ctag.getServerLibrary());
                qry.setAt(KEEP_ALIVE,row,Caster.toBoolean(ctag.getKeepAlive()));
            }
           
        }
        pageContext.setVariable(getString("admin",action,"returnVariable"),qry);
    }
View Full Code Here

     * @throws PageException
     *
     */
    private void doGetCFXTags() throws PageException {
        Map map = config.getCFXTagPool().getClasses();
        railo.runtime.type.Query qry=new QueryImpl(new String[]{"displayname","sourcename","readonly","isvalid","name","procedure_class","keep_alive"},map.size(),"query");
        Iterator it = map.keySet().iterator();
       
        int row=0;
        while(it.hasNext()) {
            row++;
            CFXTagClass tag=(CFXTagClass) map.get(it.next());
           
            qry.setAt("displayname",row,tag.getDisplayType());
            qry.setAt("sourcename",row,tag.getSourceName());
            qry.setAt("readonly",row,Caster.toBoolean(tag.isReadOnly()));
            qry.setAt("isvalid",row,Caster.toBoolean(tag.isValid()));
           
            if(tag instanceof CPPCFXTagClass) {
                CPPCFXTagClass ctag =(CPPCFXTagClass) tag;
                qry.setAt(KeyConstants._name,row,ctag.getName());
                qry.setAt("procedure_class",row,ctag.getProcedure());
                qry.setAt("keepalive",row,Caster.toBoolean(ctag.getKeepAlive()));
            }
            else if(tag instanceof JavaCFXTagClass) {
                JavaCFXTagClass jtag =(JavaCFXTagClass) tag;
                qry.setAt(KeyConstants._name,row,jtag.getName());
                qry.setAt("procedure_class",row,jtag.getStrClass());
            }
           
        }
        pageContext.setVariable(getString("admin",action,"returnVariable"),qry);
    }
View Full Code Here

     * @throws PageException
     *
     */
    private void doGetCustomTagMappings() throws PageException {
        Mapping[] mappings = config.getCustomTagMappings();
        railo.runtime.type.Query qry=new QueryImpl(new String[]{"archive","strarchive","physical","strphysical","virtual","hidden","physicalFirst","readonly","inspect"},mappings.length,"query");
       
       
        for(int i=0;i<mappings.length;i++) {
            MappingImpl m=(MappingImpl) mappings[i];
            int row=i+1;
            qry.setAt("archive",row,m.getArchive());
            qry.setAt("strarchive",row,m.getStrArchive());
            qry.setAt("physical",row,m.getPhysical());
            qry.setAt("strphysical",row,m.getStrPhysical());
            qry.setAt("virtual",row,m.getVirtual());
            qry.setAt("hidden",row,Caster.toBoolean(m.isHidden()));
            qry.setAt("physicalFirst",row,Caster.toBoolean(m.isPhysicalFirst()));
            qry.setAt("readonly",row,Caster.toBoolean(m.isReadonly()));
            qry.setAt("inspect",row,ConfigWebUtil.inspectTemplate(m.getInspectTemplateRaw(), ""));
        }
        pageContext.setVariable(getString("admin",action,"returnVariable"),qry);
    }
View Full Code Here

        pageContext.setVariable(getString("admin",action,"returnVariable"),qry);
    }
   
    private void doGetComponentMappings() throws PageException {
        Mapping[] mappings = config.getComponentMappings();
        railo.runtime.type.Query qry=new QueryImpl(new String[]{"archive","strarchive","physical","strphysical","virtual","hidden","physicalFirst","readonly","inspect"},mappings.length,"query");
       
       
        for(int i=0;i<mappings.length;i++) {
            MappingImpl m=(MappingImpl) mappings[i];
            int row=i+1;
            qry.setAt("archive",row,m.getArchive());
            qry.setAt("strarchive",row,m.getStrArchive());
            qry.setAt("physical",row,m.getPhysical());
            qry.setAt("strphysical",row,m.getStrPhysical());
            qry.setAt("virtual",row,m.getVirtual());
            qry.setAt("hidden",row,Caster.toBoolean(m.isHidden()));
            qry.setAt("physicalFirst",row,Caster.toBoolean(m.isPhysicalFirst()));
            qry.setAt("readonly",row,Caster.toBoolean(m.isReadonly()));
            qry.setAt("inspect",row,ConfigWebUtil.inspectTemplate(m.getInspectTemplateRaw(), ""));
        }
        pageContext.setVariable(getString("admin",action,"returnVariable"),qry);
    }
View Full Code Here

    }
   

    private void doGetExtensionProviders() throws PageException {
      ExtensionProvider[] providers = config.getExtensionProviders();
      railo.runtime.type.Query qry=new QueryImpl(new String[]{"url","isReadOnly"},providers.length,"query");
       
        ExtensionProvider provider;
        for(int i=0;i<providers.length;i++) {
          provider=providers[i];
            int row=i+1;
            //qry.setAt("name",row,provider.getName());
            qry.setAt(KeyConstants._url,row,provider.getUrlAsString());
            qry.setAt("isReadOnly",row,Caster.toBoolean(provider.isReadOnly()));
            //qry.setAt("cacheTimeout",row,Caster.toDouble(provider.getCacheTimeout()/1000));
        }
        pageContext.setVariable(getString("admin",action,"returnVariable"),qry);
    }
View Full Code Here

   
   
   
    private void doGetExtensions() throws PageException {
      Extension[] extensions = config.getExtensions();
      railo.runtime.type.Query qry=new QueryImpl(new String[]{
            "type","provider","id","config","version","category","description","image","label","name",
            "author","codename","video","support","documentation","forum","mailinglist","network","created"},0,"query");
       
        String provider=getString("provider",null);
        String id=getString("id",null);
      Extension extension;
        String extProvider,extId;
        int row=0;
        for(int i=0;i<extensions.length;i++) {
          extension=extensions[i];
          if(!extension.getType().equalsIgnoreCase("all") && toType(extension.getType(), false)!=type)
            continue;

          extProvider=extension.getProvider();
          extId=extension.getId();
          if(provider!=null && !provider.equalsIgnoreCase(extProvider)) continue;
          if(id!=null && !id.equalsIgnoreCase(extId)) continue;

            qry.addRow();
          row++;
            qry.setAt("provider",row,extProvider);
            qry.setAt(KeyConstants._id,row,extId);
            qry.setAt(KeyConstants._config,row,extension.getConfig(pageContext));
            qry.setAt(KeyConstants._version,row,extension.getVersion());
           
            qry.setAt("category",row,extension.getCategory());
            qry.setAt(KeyConstants._description,row,extension.getDescription());
            qry.setAt("image",row,extension.getImage());
            qry.setAt(KeyConstants._label,row,extension.getLabel());
            qry.setAt(KeyConstants._name,row,extension.getName());

            qry.setAt(KeyConstants._author,row,extension.getAuthor());
            qry.setAt("codename",row,extension.getCodename());
            qry.setAt("video",row,extension.getVideo());
            qry.setAt("support",row,extension.getSupport());
            qry.setAt("documentation",row,extension.getDocumentation());
            qry.setAt("forum",row,extension.getForum());
            qry.setAt("mailinglist",row,extension.getMailinglist());
            qry.setAt("network",row,extension.getNetwork());
            qry.setAt(KeyConstants._created,row,extension.getCreated());
            qry.setAt(KeyConstants._type,row,extension.getType());
           
        }
        pageContext.setVariable(getString("admin",action,"returnVariable"),qry);
    }
View Full Code Here

   
    private void doGetMappings() throws PageException {
       

        Mapping[] mappings = config.getMappings();
        railo.runtime.type.Query qry=new QueryImpl(new String[]{"archive","strarchive","physical","strphysical","virtual","hidden","physicalFirst","readonly","inspect","toplevel"},mappings.length,"query");
       
       
        for(int i=0;i<mappings.length;i++) {
            MappingImpl m=(MappingImpl) mappings[i];
            int row=i+1;
            qry.setAt("archive",row,m.getArchive());
            qry.setAt("strarchive",row,m.getStrArchive());
            qry.setAt("physical",row,m.getPhysical());
            qry.setAt("strphysical",row,m.getStrPhysical());
            qry.setAt("virtual",row,m.getVirtual());
            qry.setAt("hidden",row,Caster.toBoolean(m.isHidden()));
            qry.setAt("physicalFirst",row,Caster.toBoolean(m.isPhysicalFirst()));
            qry.setAt("readonly",row,Caster.toBoolean(m.isReadonly()));
            qry.setAt("inspect",row,ConfigWebUtil.inspectTemplate(m.getInspectTemplateRaw(), ""));
            qry.setAt("toplevel",row,Caster.toBoolean(m.isTopLevel()));
        }
        pageContext.setVariable(getString("admin",action,"returnVariable"),qry);
    }
View Full Code Here

   
    private void doGetRestMappings() throws PageException {
       

        railo.runtime.rest.Mapping[] mappings = config.getRestMappings();
        railo.runtime.type.Query qry=new QueryImpl(new String[]{"physical","strphysical","virtual","hidden","readonly","default"},mappings.length,"query");
       
        railo.runtime.rest.Mapping m;
        for(int i=0;i<mappings.length;i++) {
            m=mappings[i];
            int row=i+1;
            qry.setAt("physical",row,m.getPhysical());
            qry.setAt("strphysical",row,m.getStrPhysical());
            qry.setAt("virtual",row,m.getVirtual());
            qry.setAt("hidden",row,Caster.toBoolean(m.isHidden()));
            qry.setAt("readonly",row,Caster.toBoolean(m.isReadonly()));
            qry.setAt("default",row,Caster.toBoolean(m.isDefault()));
        }
        pageContext.setVariable(getString("admin",action,"returnVariable"),qry);
    }
View Full Code Here

    private void doGetMailServers() throws PageException {
       
       

        Server[] servers = config.getMailServers();
        railo.runtime.type.Query qry=new QueryImpl(new String[]{"hostname","password","username","port","authentication","readonly","tls","ssl"},servers.length,"query");
       
       
        for(int i=0;i<servers.length;i++) {
            Server s= servers[i];
            int row=i+1;
            qry.setAt("hostname",row,s.getHostName());
            qry.setAt("password",row,s.isReadOnly()?"":s.getPassword());
            qry.setAt("username",row,s.isReadOnly()?"":s.getUsername());
            qry.setAt("port",row,Caster.toInteger(s.getPort()));
            qry.setAt("readonly",row,Caster.toBoolean(s.isReadOnly()));
            qry.setAt("authentication",row,Caster.toBoolean(s.hasAuthentication()));
            if(s instanceof ServerImpl) {
              ServerImpl si = (ServerImpl)s;
              qry.setAt("ssl",row,Caster.toBoolean(si.isSSL()));
              qry.setAt("tls",row,Caster.toBoolean(si.isTLS()));
            }
        }
        pageContext.setVariable(getString("admin",action,"returnVariable"),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.