Package railo.runtime.type

Examples of railo.runtime.type.StructImpl


 


  private void doGetExecutionLog() throws PageException {
    ExecutionLogFactory factory = config.getExecutionLogFactory();
    Struct sct=new StructImpl();
   
    sct.set(KeyConstants._enabled, Caster.toBoolean(config.getExecutionLogEnabled()));
    Class clazz = factory.getClazz();
    sct.set(KeyConstants._class, clazz!=null?clazz.getName():"");
    sct.set(KeyConstants._arguments, factory.getArgumentsAsStruct());
   
    pageContext.setVariable(getString("admin",action,"returnVariable"),sct);
  }
View Full Code Here


    while(it.hasNext()) {
            String key=(String)it.next();
            if(key.equalsIgnoreCase(id)) {
                ge=(GatewayEntry) entries.get(key);
                //g=ge.getGateway();
                sct=new StructImpl();
                sct.setEL("id",ge.getId());
                sct.setEL("class",ge.getClassName());
                sct.setEL("listenerCfcPath", ge.getListenerCfcPath());
              sct.setEL("cfcPath",ge.getCfcPath());
                sct.setEL("startupMode",GatewayEntryImpl.toStartup(ge.getStartupMode(),"automatic"));
View Full Code Here

        else
          throw new ApplicationException("inv,query,resourcealid type defintion, valid values are [object, template,query,resource,function]");
   
        CacheConnection cc = config.getCacheDefaultConnection(type);
        if(cc!=null){
          Struct sct=new StructImpl();
           
            sct.setEL(KeyConstants._name,cc.getName());
            sct.setEL("class",cc.getClazz().getName());
            sct.setEL("custom",cc.getCustom());
            sct.setEL("default",Caster.toBoolean(true));
            sct.setEL("readOnly",Caster.toBoolean(cc.isReadOnly()));
           
          pageContext.setVariable(getString("admin",action,"returnVariable"),sct);
        }
        else throw new ApplicationException("there is no cache default connection");
    }
View Full Code Here

    String d;
        while(it.hasNext()) {
            String key=(String)it.next();
            if(key.equalsIgnoreCase(name)) {
                cc=(CacheConnection) conns.get(key);
                sct=new StructImpl();
                d="";
                if(cc==dObj)d="object";
                else if(cc==dTmp)d="template";
                else if(cc==dQry)d="query";
                else if(cc==dRes)d="resource";
View Full Code Here

     * @throws PageException
     * @throws PageException
     *
     */
    private void doGetComponent() throws PageException {
        Struct sct=new StructImpl();
        pageContext.setVariable(getString("admin",action,"returnVariable"),sct);
        // Base Component
        try {
            PageSource ps = ((PageContextImpl)pageContext).getPageSourceExisting(config.getBaseComponentTemplate());
            if(ps!=null) sct.set("baseComponentTemplate",ps.getDisplayPath());
            else sct.set("baseComponentTemplate","");
        } catch (PageException e) {
            sct.set("baseComponentTemplate","");
        }
        sct.set("strBaseComponentTemplate",config.getBaseComponentTemplate());
       
        // dump template
        try {
            PageSource ps = ((PageContextImpl)pageContext).getPageSourceExisting(config.getComponentDumpTemplate());
            if(ps!=null) sct.set("componentDumpTemplate",ps.getDisplayPath());
            else sct.set("componentDumpTemplate","");
        } catch (PageException e) {
            sct.set("componentDumpTemplate","");
        }
        sct.set("strComponentDumpTemplate",config.getComponentDumpTemplate());

        sct.set("deepSearch",Caster.toBoolean(config.doComponentDeepSearch()));
        sct.set("componentDataMemberDefaultAccess",ComponentUtil.toStringAccess(config.getComponentDataMemberDefaultAccess()));
        sct.set("triggerDataMember",Caster.toBoolean(config.getTriggerComponentDataMember()));
        sct.set("useShadow",Caster.toBoolean(config.useComponentShadow()));
        sct.set("ComponentDefaultImport",config.getComponentDefaultImport());
        sct.set("componentLocalSearch",config.getComponentLocalSearch());
        sct.set("componentPathCache",config.useComponentPathCache());
       
    }
View Full Code Here

    /**
     * @throws PageException
     *
     */
    private void doGetLocales() throws PageException {
        Struct sct=new StructImpl(StructImpl.TYPE_LINKED);
        //Array arr=new ArrayImpl();
        String strLocale=getString("locale","english (united kingdom)");
        Locale locale = LocaleFactory.getLocale(strLocale);
        pageContext.setVariable(getString("admin",action,"returnVariable"),sct);
        Map locales = LocaleFactory.getLocales();
        Iterator it = locales.keySet().iterator();
      
        String key;
        Locale l;
        while(it.hasNext()) {
            key=(String)it.next();
            l=(Locale) locales.get(key);
            sct.setEL(l.toString(),l.getDisplayName(locale));
            //arr.append(locale.getDisplayName());
        }
        //arr.sort("textnocase","asc");
    }
View Full Code Here

        //arr.sort("textnocase","asc");
    }
   
   
    private void doGetApplicationListener() throws PageException  {
        Struct sct=new StructImpl();
        pageContext.setVariable(getString("admin",action,"returnVariable"),sct);
        ApplicationListener appListener = config.getApplicationListener();
        sct.set("type",AppListenerUtil.toStringType(appListener));
        sct.set("mode",AppListenerUtil.toStringMode(appListener.getMode()));
    // replaced with encoding outputsct.set("defaultencoding", config.get DefaultEncoding());
    }
View Full Code Here

    /**
     * @throws PageException
     *
     */
    private void doGetRegional() throws PageException  {
        Struct sct=new StructImpl();
        pageContext.setVariable(getString("admin",action,"returnVariable"),sct);
        sct.set("locale",Caster.toString(config.getLocale()));
        sct.set("timezone",toStringTimeZone(pageContext.getTimeZone()));
        sct.set("timeserver",config.getTimeServer());
        sct.set("usetimeserver",config.getUseTimeServer());
    // replaced with encoding outputsct.set("defaultencoding", config.get DefaultEncoding());
    }
View Full Code Here

  private void doSurveillance() throws PageException {
    // Server
    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

      throw Caster.toPageException(e);
    }
  }
   
    private void doGetProxy() throws PageException  {
        Struct sct=new StructImpl();
        pageContext.setVariable(getString("admin",action,"returnVariable"),sct);
        ProxyData pd = config.getProxyData();
        String port=pd==null || pd.getPort()<=0?"":Caster.toString(pd.getPort());
       
        //sct.set("enabled",Caster.toBoolean(config.isProxyEnable()));
        sct.set("port",port);
        sct.set("server",pd==null?"":emptyIfNull(pd.getServer()));
        sct.set("username",pd==null?"":emptyIfNull(pd.getUsername()));
        sct.set("password",pd==null?"":emptyIfNull(pd.getPassword()));
    }
View Full Code Here

TOP

Related Classes of railo.runtime.type.StructImpl

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.