Package railo.runtime.dump

Examples of railo.runtime.dump.DumpTable


  }

  @Override
  public DumpData toDumpData(PageContext pageContext, int maxlevel, DumpProperties dp) {
    maxlevel--;
    DumpTable table = new DumpTable("xml","#cc9999","#ffffff","#000000");
    table.setTitle("Array (XML Node List)");
    int len=size();
   
    for(int i=1;i<=len;i++) {
      table.appendRow(1,new SimpleDumpData(i),DumpUtil.toDumpData(item(i-1), pageContext,maxlevel,dp));
    }
    return table;
  }
View Full Code Here


   * @see railo.runtime.dump.Dumpable#toDumpData(railo.runtime.PageContext, int)
   */
  public DumpData toDumpData(PageContext pageContext, int maxlevel, DumpProperties dp) {
      Iterator it=_map.keySet().iterator();
   
    DumpTable table = new DumpTable("struct","#9999ff","#ccccff","#000000");
    table.setTitle("Struct");
    maxlevel--;
    int maxkeys=dp.getMaxKeys();
    int index=0;
    while(it.hasNext()) {
      Object key=it.next();
      if(DumpUtil.keyValid(dp, maxlevel,key.toString())){
        if(maxkeys<=index++)break;
        table.appendRow(1,new SimpleDumpData(key.toString()),DumpUtil.toDumpData(_map.get(key), pageContext,maxlevel,dp));
      }
    }
    return table;
  }
View Full Code Here

      return new SimpleDumpData(closure?"<Closure>":"<UDF>");
   
    // arguments
    FunctionArgument[] args = udf.getFunctionArguments();
       
        DumpTable atts = closure?new DumpTable("udf","#ff00ff","#ffccff","#000000"):new DumpTable("udf","#cc66ff","#ffccff","#000000");
       
    atts.appendRow(new DumpRow(63,new DumpData[]{new SimpleDumpData("label"),new SimpleDumpData("name"),new SimpleDumpData("required"),new SimpleDumpData("type"),new SimpleDumpData("default"),new SimpleDumpData("hint")}));
    for(int i=0;i<args.length;i++) {
      FunctionArgument arg=args[i];
      DumpData def;
      try {
        Object oa=null;
                try {
                    oa = UDFUtil.getDefaultValue(pageContext, (UDFPlus)udf, i, null);//udf.getDefaultValue(pageContext,i,null);
                } catch (PageException e1) {
                }
                if(oa==null)oa="null";
        def=new SimpleDumpData(Caster.toString(oa));
      } catch (PageException e) {
        def=new SimpleDumpData("");
      }
      atts.appendRow(new DumpRow(0,new DumpData[]{
          new SimpleDumpData(arg.getDisplayName()),
          new SimpleDumpData(arg.getName().getString()),
          new SimpleDumpData(arg.isRequired()),
          new SimpleDumpData(arg.getTypeAsString()),
          def,
          new SimpleDumpData(arg.getHint())}));
      //atts.setRow(0,arg.getHint());
     
    }
   
    DumpTable func = closure?new DumpTable("#ff00ff","#ffccff","#000000"):new DumpTable("#cc66ff","#ffccff","#000000");
    if(closure) func.setTitle("Closure");
    else {
      String f="Function ";
      try {
        f=StringUtil.ucFirst(ComponentUtil.toStringAccess(udf.getAccess()).toLowerCase())+" "+f;
      }
      catch (ExpressionException e) {}
      f+=udf.getFunctionName();
      if(udf instanceof UDFGSProperty) f+=" (generated)";
      func.setTitle(f);
    }

    if(udf instanceof UDFPlus)func.setComment("source:"+((UDFPlus)udf).getPageSource().getDisplayPath());

    if(!StringUtil.isEmpty(udf.getDescription()))func.setComment(udf.getDescription());
   
    func.appendRow(1,new SimpleDumpData("arguments"),atts);
    func.appendRow(1,new SimpleDumpData("return type"),new SimpleDumpData(udf.getReturnTypeAsString()));
   
    boolean hasLabel=!StringUtil.isEmpty(udf.getDisplayName());//displayName!=null && !displayName.equals("");
    boolean hasHint=!StringUtil.isEmpty(udf.getHint());//hint!=null && !hint.equals("");
   
    if(hasLabel || hasHint) {
      DumpTable box = new DumpTable("#ffffff","#cccccc","#000000");
      box.setTitle(hasLabel?udf.getDisplayName():udf.getFunctionName());
      if(hasHint)box.appendRow(0,new SimpleDumpData(udf.getHint()));
      box.appendRow(0,func);
      return box;
    }
    return func;
  }
View Full Code Here

    return sct;
  }

  @Override
  public DumpData toDumpData(PageContext pageContext, int maxlevel, DumpProperties dp) {
    DumpTable table = (DumpTable) super.toDumpData(pageContext, maxlevel, dp);
    try{
      table.setTitle("Double Struct ("+castToString()+")");
    }
    catch(PageException pe){}
    return table;
  }
View Full Code Here

    return ListUtil.arrayToList(this, ",");
  }

  @Override
  public DumpData toDumpData(PageContext pageContext, int maxlevel,DumpProperties dp) {
    DumpTable dt= (DumpTable) super.toDumpData(pageContext, maxlevel, dp);
    dt.setTitle("Castable Array");
    return dt;
  }
View Full Code Here

        return path+name;//+" - "+"path("+getPath()+");"+"name("+getName()+");"+"parent("+getParentPath()+");";
    }
   
    @Override
  public DumpData toDumpData(PageContext pageContext, int maxlevel, DumpProperties dp) {
    DumpTable table = new DumpTable("string","#ff6600","#ffcc99","#000000");
    table.appendRow(1,new SimpleDumpData("FTPPath"),new SimpleDumpData(toString()));
    return table;
    }
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(0,dd);
      dd=table;
    }
    RefBoolean hasReference=new RefBooleanImpl(false);
    Struct sct = toStruct(dd,object,hasReference);
    sct.setEL("hasReference", hasReference.toBoolean());
View Full Code Here

    sct.setEL("hasReference", hasReference.toBoolean());
    return sct;
  }

  private static Struct toStruct(DumpData dd, Object object, RefBoolean hasReference) {
    DumpTable table;
    if(dd instanceof DumpTable) table=(DumpTable) dd;
    else {
      if(dd==null) dd= new SimpleDumpData("null");
      table=new DumpTable("#ffffff","#cccccc","#000000");
      table.appendRow(1,dd);
    }
    return toCFML(table,object,hasReference);
  }
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("Time"), new SimpleDumpData(str));
        return table;
    }
View Full Code Here

 
 
  @Override
  public DumpData toDumpData(PageContext pageContext, int maxlevel, DumpProperties dp) {
    String str=castToString(pageContext.getTimeZone());
        DumpTable table=new DumpTable("date","#ff6600","#ffcc99","#000000");
        if(dp.getMetainfo())
          table.appendRow(1, new SimpleDumpData("Date Time ("+pageContext.getTimeZone().getID()+")"));
        else
          table.appendRow(1, new SimpleDumpData("Date Time"));
        table.appendRow(0, new SimpleDumpData(str));
        return table;
  }
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.