Package railo.runtime.dump

Examples of railo.runtime.dump.SimpleDumpData


    Iterator<Object> it = pageSources.keySet().iterator();
   
   
    DumpTable table = new DumpTable("#FFCC00","#FFFF00","#000000");
    table.setTitle("Page Source Pool");
    table.appendRow(1,new SimpleDumpData("Count"),new SimpleDumpData(pageSources.size()));
    while(it.hasNext()) {
        PageSource ps= pageSources.get(it.next());
        DumpTable inner = new DumpTable("#FFCC00","#FFFF00","#000000");
      inner.setWidth("100%");
      inner.appendRow(1,new SimpleDumpData("source"),new SimpleDumpData(ps.getDisplayPath()));
      inner.appendRow(1,new SimpleDumpData("last access"),DumpUtil.toDumpData(new DateTimeImpl(pageContext,ps.getLastAccessTime(),false), pageContext,maxlevel,dp));
      inner.appendRow(1,new SimpleDumpData("access count"),new SimpleDumpData(ps.getAccessCount()));
      table.appendRow(1,new SimpleDumpData("Sources"),inner);
    }
    return table;
  }
View Full Code Here


    }

    @Override
  public DumpData toDumpData(PageContext pageContext, int maxlevel, DumpProperties dp) {
    DumpTable table = new DumpTable("com","#ff3300","#ff9966","#660000");
    table.appendRow(1,new SimpleDumpData("COM Object"),new SimpleDumpData(name));
    return table;
    }
View Full Code Here

  @Override
  public DumpData toDumpData(PageContext pageContext, int maxlevel, DumpProperties dp) {
    DumpTable table=new DumpTable("#cccc66","#cccc99","#000000");
    table.setTitle(file.getAbsolutePath());
    table.appendRow(1, new SimpleDumpData("min (ms)"), new SimpleDumpData(min));
    table.appendRow(1, new SimpleDumpData("avg (ms)"), new SimpleDumpData(getAverageExecutionTime()));
    table.appendRow(1, new SimpleDumpData("max (ms)"), new SimpleDumpData(max));
    table.appendRow(1, new SimpleDumpData("total (ms)"), new SimpleDumpData(all));
    return table;
  }
View Full Code Here

    for(int i=0;i<keys.length;i++) {
      k=keys[i];
     
      if(DumpUtil.keyValid(dp,maxlevel, k)){
        if(maxkeys<=index++)break;
        table.appendRow(1,new SimpleDumpData(k.getString()),DumpUtil.toDumpData(get(k.getString(),null), pageContext,maxlevel,dp));
      }
    }
    return table;
  }
View Full Code Here

    int index=0;
    for(int i=0;i<keys.length;i++) {
      Key key=keys[i];
      if(maxkeys<=index++)break;
      if(DumpUtil.keyValid(dp,maxlevel, key))
        table.appendRow(1,new SimpleDumpData(key.getString()),DumpUtil.toDumpData(get(key,null), pageContext,maxlevel,dp));
    }
    return table;
  }
View Full Code Here

       
   
   
    DumpTable htmlBox = new DumpTable("mapping","#ff6600","#ffcc99","#000000");
    htmlBox.setTitle("Mapping");
    htmlBox.appendRow(1,new SimpleDumpData("virtual"),new SimpleDumpData(virtual));
    htmlBox.appendRow(1,new SimpleDumpData("physical"),DumpUtil.toDumpData(strPhysical,pageContext,maxlevel,dp));
    htmlBox.appendRow(1,new SimpleDumpData("archive"),DumpUtil.toDumpData(strArchive,pageContext,maxlevel,dp));
    htmlBox.appendRow(1,new SimpleDumpData("inspect"),new SimpleDumpData(ConfigWebUtil.inspectTemplate(getInspectTemplateRaw(),"")));
    htmlBox.appendRow(1,new SimpleDumpData("physicalFirst"),new SimpleDumpData(Caster.toString(physicalFirst)));
    htmlBox.appendRow(1,new SimpleDumpData("readonly"),new SimpleDumpData(Caster.toString(readonly)));
    htmlBox.appendRow(1,new SimpleDumpData("hidden"),new SimpleDumpData(Caster.toString(hidden)));
    htmlBox.appendRow(1,new SimpleDumpData("appmapping"),new SimpleDumpData(Caster.toBoolean(appMapping)));
    htmlBox.appendRow(1,new SimpleDumpData("toplevel"),new SimpleDumpData(Caster.toString(topLevel)));
    htmlBox.appendRow(1,new SimpleDumpData("ClassLoaderMaxElements"),new SimpleDumpData(Caster.toString(classLoaderMaxElements)));
    return htmlBox;
    }
View Full Code Here

    maxlevel--;
    // Document
    if(node instanceof Document) {
      DumpTable table = new DumpTable("xml","#cc9999","#ffffff","#000000");
      table.setTitle("XML Document");
      table.appendRow(1,new SimpleDumpData("XmlComment"),new SimpleDumpData(XMLUtil.getProperty(node,XMLUtil.XMLCOMMENT,null).toString()));
      table.appendRow(1,new SimpleDumpData("XmlRoot"),  DumpUtil.toDumpData(XMLUtil.getProperty(node,XMLUtil.XMLROOT,null), pageContext,maxlevel,props));
      return table;
     
    }
    // Element
    if(node instanceof Element) {
      DumpTable table = new DumpTable("xml","#cc9999","#ffffff","#000000");
      table.setTitle("XML Element");
      table.appendRow(1,new SimpleDumpData("xmlName"),    new SimpleDumpData(XMLUtil.getProperty(node,XMLUtil.XMLNAME,null).toString()));
      table.appendRow(1,new SimpleDumpData("XmlNsPrefix")new SimpleDumpData(XMLUtil.getProperty(node,XMLUtil.XMLNSPREFIX,null).toString()));
      table.appendRow(1,new SimpleDumpData("XmlNsURI"),    new SimpleDumpData(XMLUtil.getProperty(node,XMLUtil.XMLNSURI,null).toString()));
      table.appendRow(1,new SimpleDumpData("XmlText"),    DumpUtil.toDumpData(XMLUtil.getProperty(node,XMLUtil.XMLTEXT,null), pageContext,maxlevel,props));
      table.appendRow(1,new SimpleDumpData("XmlComment")new SimpleDumpData(XMLUtil.getProperty(node,XMLUtil.XMLCOMMENT,null).toString()));
      table.appendRow(1,new SimpleDumpData("XmlAttributes"),DumpUtil.toDumpData(XMLUtil.getProperty(node,XMLUtil.XMLATTRIBUTES,null), pageContext,maxlevel,props));
      table.appendRow(1,new SimpleDumpData("XmlChildren"),  DumpUtil.toDumpData(XMLUtil.getProperty(node,XMLUtil.XMLCHILDREN,null), pageContext,maxlevel,props));
      return table;
     
    }
    // Attr
    if(node instanceof Attr) {
      DumpTable table = new DumpTable("xml","#cc9999","#ffffff","#000000");
      table.setTitle("XML Attr");
      table.appendRow(1,new SimpleDumpData("xmlName"),    new SimpleDumpData(XMLUtil.getProperty(node,XMLUtil.XMLNAME,null).toString()));
      table.appendRow(1,new SimpleDumpData("XmlValue"),  DumpUtil.toDumpData(((Attr)node).getValue(), pageContext,maxlevel,props));
      table.appendRow(1,new SimpleDumpData("XmlType")new SimpleDumpData(XMLUtil.getTypeAsString(node,true)));
     
      return table;
     
    }
    // Node
    DumpTable table = new DumpTable("xml","#cc9999","#ffffff","#000000");
    table.setTitle("XML Node ("+ListLast.call(null,node.getClass().getName(),".")+")");
    table.appendRow(1,new SimpleDumpData("xmlName"),    new SimpleDumpData(XMLUtil.getProperty(node,XMLUtil.XMLNAME,null).toString()));
    table.appendRow(1,new SimpleDumpData("XmlNsPrefix")new SimpleDumpData(XMLUtil.getProperty(node,XMLUtil.XMLNSPREFIX,null).toString()));
    table.appendRow(1,new SimpleDumpData("XmlNsURI"),    new SimpleDumpData(XMLUtil.getProperty(node,XMLUtil.XMLNSURI,null).toString()));
    table.appendRow(1,new SimpleDumpData("XmlText"),    DumpUtil.toDumpData(XMLUtil.getProperty(node,XMLUtil.XMLTEXT,null), pageContext,maxlevel,props));
    table.appendRow(1,new SimpleDumpData("XmlComment")new SimpleDumpData(XMLUtil.getProperty(node,XMLUtil.XMLCOMMENT,null).toString()));
    table.appendRow(1,new SimpleDumpData("XmlAttributes"),DumpUtil.toDumpData(XMLUtil.getProperty(node,XMLUtil.XMLATTRIBUTES,null), pageContext,maxlevel,props));
    table.appendRow(1,new SimpleDumpData("XmlChildren"),  DumpUtil.toDumpData(XMLUtil.getProperty(node,XMLUtil.XMLCHILDREN,null), pageContext,maxlevel,props));
     
    table.appendRow(1,new SimpleDumpData("XmlType")new SimpleDumpData(XMLUtil.getTypeAsString(node,true)));
   
    return table; 
  }
View Full Code Here

    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

    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

 

  public static DumpData toDumpData(PageContext pageContext, int maxlevel, DumpProperties dp,UDF udf, boolean closure) {
 
    if(!dp.getShowUDFs())
      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

TOP

Related Classes of railo.runtime.dump.SimpleDumpData

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.