Package railo.runtime.type

Examples of railo.runtime.type.StructImpl


   * @param log
   * @param name
   */
  protected StorageScopeMemory(PageContext pc,String strType, int type, Log log) {
    super(
        new StructImpl(),
        new DateTimeImpl(pc.getConfig()),
        null,
        -1,1,strType,type);
    ScopeContext.info(log,"create new memory based "+strType+" scope for "+pc.getApplicationContext().getName()+"/"+pc.getCFID());
   
View Full Code Here


    // TODO Auto-generated method stub
    return null;
  }

  public Struct getAllowedSQL() {
    Struct allow=new StructImpl();
    allow.setEL(KeyConstants._alter, Caster.toBoolean(ds.hasAllow(DataSource.ALLOW_ALTER)));
    allow.setEL(KeyConstants._create, Caster.toBoolean(ds.hasAllow(DataSource.ALLOW_CREATE)));
    allow.setEL(KeyConstants._delete, Caster.toBoolean(ds.hasAllow(DataSource.ALLOW_DELETE)));
    allow.setEL(KeyConstants._drop, Caster.toBoolean(ds.hasAllow(DataSource.ALLOW_DROP)));
    allow.setEL(KeyConstants._grant, Caster.toBoolean(ds.hasAllow(DataSource.ALLOW_GRANT)));
    allow.setEL(KeyConstants._insert, Caster.toBoolean(ds.hasAllow(DataSource.ALLOW_INSERT)));
    allow.setEL(KeyConstants._revoke, Caster.toBoolean(ds.hasAllow(DataSource.ALLOW_REVOKE)));
    allow.setEL(KeyConstants._select, Caster.toBoolean(ds.hasAllow(DataSource.ALLOW_SELECT)));
    allow.setEL("storedproc", Caster.toBoolean(true));// TODO
    allow.setEL(KeyConstants._update, Caster.toBoolean(ds.hasAllow(DataSource.ALLOW_UPDATE)));
    return allow;
  }
View Full Code Here

  public String getDsn() {
    return ds.getDsnTranslated();
  }

  public Struct getExtraData() {
    Struct rtn=new StructImpl();
    Struct connprop=new StructImpl();
    String[] names = ds.getCustomNames();
    rtn.setEL("connectionprops", connprop);
    for(int i=0;i<names.length;i++) {
      connprop.setEL(names[i], ds.getCustomValue(names[i]));
    }
    rtn.setEL("maxpooledstatements",new Double(1000) );
    rtn.setEL("sid","");
    rtn.setEL("timestampasstring", Boolean.FALSE);
    rtn.setEL("useTrustedConnection", Boolean.FALSE);
View Full Code Here

  public String getJndiName() {
    return getJNDIName();
  }

  public Struct getJndienv() {
    return new StructImpl();
  }
View Full Code Here

    setParam(hpb);
  }

  @Override
  public int doEndTag() throws PageException {
      Struct cfhttp=new StructImpl();
    cfhttp.setEL(ERROR_DETAIL,"");
    pageContext.setVariable(result,cfhttp);

    // because commons
    PrintStream out = System.out;
        try {
View Full Code Here

      cfhttp.set(HTTP_VERSION,(rsp.getProtocolVersion()));
     
    //responseHeader
      railo.commons.net.http.Header[] headers = rsp.getAllHeaders();
      StringBuffer raw=new StringBuffer(rsp.getStatusLine()+" ");
      Struct responseHeader = new StructImpl();
      Struct cookie;
      Array setCookie = new ArrayImpl();
      Query cookies=new QueryImpl(new String[]{"name","value","path","domain","expires","secure","httpOnly"},0,"cookies");
     
          for(int i=0;i<headers.length;i++) {
            railo.commons.net.http.Header header=headers[i];
            //print.ln(header);
           
            raw.append(header.toString()+" ");
            if(header.getName().equalsIgnoreCase("Set-Cookie")) {
              setCookie.append(header.getValue());
              parseCookie(cookies,header.getValue());
            }
            else {
                //print.ln(header.getName()+"-"+header.getValue());
              Object value=responseHeader.get(KeyImpl.getInstance(header.getName()),null);
              if(value==null) responseHeader.set(KeyImpl.getInstance(header.getName()),header.getValue());
              else {
                  Array arr=null;
                  if(value instanceof Array) {
                      arr=(Array) value;
                  }
                  else {
                      arr=new ArrayImpl();
                      responseHeader.set(KeyImpl.getInstance(header.getName()),arr);
                      arr.appendEL(value);
                  }
                  arr.appendEL(header.getValue());
              }
            }
           
            // Content-Type
            if(header.getName().equalsIgnoreCase("Content-Type")) {
              mimetype=header.getValue();
              if(mimetype==null)mimetype=NO_MIMETYPE;
            }
           
            // Content-Encoding
            if(header.getName().equalsIgnoreCase("Content-Encoding")) {
              contentEncoding=header.getValue();
            }
           
          }
          cfhttp.set(RESPONSEHEADER,responseHeader);
          cfhttp.set(KeyConstants._cookies,cookies);
          responseHeader.set(STATUS_CODE,new Double(rsp.getStatusCode()));
          responseHeader.set(EXPLANATION,(rsp.getStatusText()));
          if(setCookie.size()>0)responseHeader.set(SET_COOKIE,setCookie);
         
      // is text
          boolean isText=
            mimetype == null || 
            mimetype == NO_MIMETYPE || HTTPUtil.isTextMimeType(mimetype);
View Full Code Here

    cfhttp.setEL(CHARSET,"");
    cfhttp.setEL(ERROR_DETAIL,"Unknown host: "+t.getMessage());
    cfhttp.setEL(FILE_CONTENT,"Connection Failure");
    cfhttp.setEL(KeyConstants._header,"");
    cfhttp.setEL(KeyConstants._mimetype,"Unable to determine MIME type of file.");
    cfhttp.setEL(RESPONSEHEADER,new StructImpl());
    cfhttp.setEL(STATUSCODE,"Connection Failure. Status code unavailable.");
    cfhttp.setEL(KeyConstants._text,Boolean.TRUE);
  }
View Full Code Here

    cfhttp.setEL(CHARSET,"");
    cfhttp.setEL(ERROR_DETAIL,"");
    cfhttp.setEL(FILE_CONTENT,"Connection Timeout");
    cfhttp.setEL(KeyConstants._header,"");
    cfhttp.setEL(KeyConstants._mimetype,"Unable to determine MIME type of file.");
    cfhttp.setEL(RESPONSEHEADER,new StructImpl());
    cfhttp.setEL(STATUSCODE,"408 Request Time-out");
    cfhttp.setEL(STATUS_CODE,new Double(408));
    cfhttp.setEL(STATUS_TEXT,"Request Time-out");
    cfhttp.setEL(KeyConstants._text,Boolean.TRUE);
  }
View Full Code Here

    this.timeout = (long)timeout;
  }

  @Override
  public void setDynamicAttribute(String uri, String name, Object value) {
    if(attrs==null)attrs=new StructImpl();
    Key key = KeyImpl.getInstance(StringUtil.trim(name,""));
    attrs.setEL(key,value);
  }
View Full Code Here

    attrs.setEL(key,value);
  }

  @Override
  public void setDynamicAttribute(String uri, Collection.Key name, Object value) {
    if(attrs==null)attrs=new StructImpl();
    Key key = KeyImpl.getInstance(StringUtil.trim(name.getString(),""));
    attrs.setEL(key,value);
  }
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.