Package railo.runtime.dump

Examples of railo.runtime.dump.DumpTable


    return al;
  }
 
  @Override
  public DumpData toDumpData(PageContext pageContext, int maxlevel, DumpProperties dp) {
    DumpTable table = new DumpTable("array","#ff9900","#ffcc00","#000000");
    table.setTitle("Array");
   
    int length=size();
    maxlevel--;
    for(int i=1;i<=length;i++) {
      Object o=null;
      try {
        o = getE(i);
      }
      catch (Exception e) {}
      table.appendRow(1,new SimpleDumpData(i),DumpUtil.toDumpData(o, pageContext,maxlevel,dp));
    }
    return table;
  }
View Full Code Here


    return Operator.compare(value, str);
  }

  @Override
  public DumpData toDumpData(PageContext pageContext, int maxlevel, DumpProperties dp) {
    DumpTable table=new DumpTable("timespan","#ff9900","#ffcc00","#000000");
    if(milli>0)table.appendRow(1, new SimpleDumpData("Timespan"), new SimpleDumpData("createTimeSpan("+day+","+hour+","+minute+","+second+","+milli+")"));
    else table.appendRow(1, new SimpleDumpData("Timespan"), new SimpleDumpData("createTimeSpan("+day+","+hour+","+minute+","+second+")"));
   
   
   
    return table;
  }
View Full Code Here

    }

    @Override
  public DumpData toDumpData(PageContext pageContext, int maxlevel, DumpProperties dp) {
    String str=castToString("");
        DumpTable table=new DumpTable("date","#ff9900","#ffcc00","#000000");
        table.appendRow(1, new SimpleDumpData("Date"), new SimpleDumpData(str));
        return table;
    }
View Full Code Here

    this.returnValue = returnValue;
  }

  @Override
  public DumpData toDumpData(PageContext pageContext, int maxlevel, DumpProperties properties) {
    DumpTable table = new DumpTable("#669999","#ccffff","#000000");
    table.setTitle("UDFCacheEntry");
    table.appendRow(1,new SimpleDumpData("Return Value"),DumpUtil.toDumpData(returnValue, pageContext, maxlevel, properties));
    table.appendRow(1,new SimpleDumpData("Output"),DumpUtil.toDumpData(new SimpleDumpData(output), pageContext, maxlevel, properties));
    return table;
  }
View Full Code Here

    return al;
  }*/
 
  @Override
  public DumpData toDumpData(PageContext pageContext, int maxlevel, DumpProperties dp) {
    DumpTable table = new DumpTable("array","#99cc33","#ccff33","#000000");
    table.setTitle("Array");

    int top = dp.getMaxlevel();

    if( size() > top )
      table.setComment("Rows: " + size() + " (showing top " + top + ")");

    int length=size();

    for(int i=1;i<=length;i++) {
      Object o=null;
      try {
        o = getE(i);
      }
      catch (Exception e) {}

      table.appendRow( 1, new SimpleDumpData(i), DumpUtil.toDumpData(o, pageContext, maxlevel, dp) );

      if ( i == top )
        break;
    }

View Full Code Here

    throw new ExpressionException("invalid index ["+intKey+"] for argument scope")
  }
 
  @Override
  public DumpData toDumpData(PageContext pageContext, int maxlevel, DumpProperties dp) {
    DumpTable htmlBox = new DumpTable("struct","#9999ff","#ccccff","#000000");
    htmlBox.setTitle("Scope Arguments");
    if(size()>10 && dp.getMetainfo())htmlBox.setComment("Entries:"+size());
     
    maxlevel--;
    //Map mapx=getMap();
    Iterator<Key> it = keyIterator();//mapx.keySet().iterator();
    int count=0;
    Collection.Key key;
    int maxkeys=dp.getMaxKeys();
    int index=0;
    while(it.hasNext()) {
      key=it.next();//it.next();
     
      if(DumpUtil.keyValid(dp, maxlevel,key)){
        if(maxkeys<=index++)break;
        htmlBox.appendRow(3,
            new SimpleDumpData(key.getString()),
            new SimpleDumpData(++count),
            DumpUtil.toDumpData(get(key,null),
            pageContext,maxlevel,dp));
      }
View Full Code Here

     
      DumpProperties properties=new DumpProperties((int)maxLevel,setShow,setHide,(int)keys,metainfo,showUDFs);
      DumpData dd = DumpUtil.toDumpData(object, pc,(int)maxLevel,properties);
     
      if(!StringUtil.isEmpty(label)) {
        DumpTable table=new DumpTable("#ffffff","#cccccc","#000000");
        table.appendRow(1,new SimpleDumpData(label));
        //table.appendRow(1,new SimpleDumpData(getContext()));
        table.appendRow(0,dd);
        dd=table;
      }
     
      boolean isText="text".equalsIgnoreCase(format);//formatType==FORMAT_TYPE_TEXT
      if(OUTPUT_TYPE_BROWSER==outputType || outputType==OUTPUT_TYPE_NONE) {
View Full Code Here

  @Override
  public DumpData toDumpData(PageContext pageContext, int maxlevel, DumpProperties dp) {
    try {
      Array args;
      Struct sct = getMetaData(pageContext),val,a;
      DumpTable cfc = new DumpTable("udf","#66ccff","#ccffff","#000000"),udf,arg;
      cfc.setTitle("Web Service (HTTP)");
      if(dp.getMetainfo())cfc.setComment(url.toExternalForm());
      Iterator<Entry<Key, Object>> it = sct.entryIterator();
      Entry<Key, Object> e;
      // Loop UDFs
      while(it.hasNext()){
        e = it.next();
        val=Caster.toStruct(e.getValue());
       
        // udf name
        udf = new DumpTable("udf","#66ccff","#ccffff","#000000");
        arg = new DumpTable("udf","#66ccff","#ccffff","#000000");
       
        cfc.appendRow(1, new SimpleDumpData(e.getKey().getString()),udf);
       
        // args
        args = Caster.toArray(val.get(KeyConstants._arguments));
        udf.appendRow(1,new SimpleDumpData("arguments"),arg);
        arg.appendRow(7,new SimpleDumpData("name"),new SimpleDumpData("required"),new SimpleDumpData("type"));
View Full Code Here

 
  @Override
  public DumpData toDumpData(PageContext pageContext, int maxlevel, DumpProperties dp) {
   
    //FFFFCF
      DumpTable htmlBox = new DumpTable("exception","#ff9900","#FFCC00","#000000");
    htmlBox.setTitle("Railo ["+Info.getVersionAsString()+"] - Error ("+StringUtil.ucFirst(getTypeAsString())+")");
   
   
    // Message
    htmlBox.appendRow(1,new SimpleDumpData("Message"),new SimpleDumpData(getMessage()));
   
    // Detail
    String detail=getDetail();
    if(!StringUtil.isEmpty(detail,true))
      htmlBox.appendRow(1,new SimpleDumpData("Detail"),new SimpleDumpData(detail));
   
    // additional
    Iterator<Key> it = additional.keyIterator();
    Collection.Key k;
    while(it.hasNext()) {
      k=it.next();
      htmlBox.appendRow(1,new SimpleDumpData(k.getString()),new SimpleDumpData(additional.get(k,"").toString()));
    }
   
    Array tagContext = getTagContext(pageContext.getConfig());
    // Context MUSTMUST
    if(tagContext.size()>0) {
      //Collection.Key[] keys=tagContext.keys();
      Iterator<Object> vit = tagContext.valueIterator();
      //Entry<Key, Object> te;
      DumpTable context=new DumpTable("#ff9900","#FFCC00","#000000");
      //context.setTitle("The Error Occurred in");
      //context.appendRow(0,new SimpleDumpData("The Error Occurred in"));
      context.appendRow(7,
          new SimpleDumpData(""),
          new SimpleDumpData("template"),
          new SimpleDumpData("line"));
      try {
        boolean first=true;
        while(vit.hasNext()) {
          Struct struct=(Struct)vit.next();
          context.appendRow(1,
              new SimpleDumpData(first?"called from ":"occurred in"),
              new SimpleDumpData(struct.get(KeyConstants._template,"")+""),
              new SimpleDumpData(Caster.toString(struct.get(KeyConstants._line,null))));
          first=false;
        }
        htmlBox.appendRow(1,new SimpleDumpData("Context"),context);
       
       
        // Code
        String strCode=((Struct)tagContext.get(1,null)).get(KeyConstants._codePrintPlain,"").toString();
        String[] arrCode = ListUtil.listToStringArray(strCode, '\n');
        arrCode=ListUtil.trim(arrCode);
        DumpTable code=new DumpTable("#ff9900","#FFCC00","#000000");
       
        for(int i=0;i<arrCode.length;i++) {
          code.appendRow(i==2?1:0,new SimpleDumpData(arrCode[i]));
        }
        htmlBox.appendRow(1,new SimpleDumpData("Code"),code);

      }
            catch (PageException e) {}
    }
   
   
    // Java Stacktrace
    String strST=getStackTraceAsString();
    String[] arrST = ListUtil.listToStringArray(strST, '\n');
    arrST=ListUtil.trim(arrST);
    DumpTable st=new DumpTable("#ff9900","#FFCC00","#000000");
   
    for(int i=0;i<arrST.length;i++) {
      st.appendRow(i==0?1:0,new SimpleDumpData(arrST[i]));
    }
    htmlBox.appendRow(1,new SimpleDumpData("Java Stacktrace"),st);

    return htmlBox;
 
View Full Code Here

TOP

Related Classes of railo.runtime.dump.DumpTable

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.