Search in sources :

Example 1 with SimpleDumpData

use of lucee.runtime.dump.SimpleDumpData in project Lucee by lucee.

the class FTPPath method toDumpData.

@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;
}
Also used : DumpTable(lucee.runtime.dump.DumpTable) SimpleDumpData(lucee.runtime.dump.SimpleDumpData)

Example 2 with SimpleDumpData

use of lucee.runtime.dump.SimpleDumpData in project Lucee by lucee.

the class JaxWSClient method toDumpData.

private DumpData toDumpData(BindingOperation bo) {
    Map<QName, Message> messages = wsdl.getMessages();
    DumpTable table = new DumpTable("#99cc99", "#ccffcc", "#000000");
    DumpTable attributes = new DumpTable("#99cc99", "#ccffcc", "#000000");
    String returns = "void";
    attributes.appendRow(3, new SimpleDumpData("name"), new SimpleDumpData("type"));
    Operation op = bo.getOperation();
    // attributes
    Input in = op.getInput();
    Message msg = in.getMessage();
    // msg=WSUtil.getMessageByLocalName(messages,bo.getBindingInput().getName());
    // print.e(msg.getQName());
    List<Part> parts = msg.getOrderedParts(null);
    Iterator<Part> it = parts.iterator();
    Part p;
    QName en;
    QName type;
    while (it.hasNext()) {
        p = it.next();
        en = p.getElementName();
        if (en != null) {
            type = en;
            Types types = wsdl.getTypes();
        } else
            type = p.getTypeName();
        attributes.appendRow(0, new SimpleDumpData(en + ":" + p.getName()), new SimpleDumpData(toLuceeType(type)));
    }
    // return
    msg = bo.getOperation().getOutput().getMessage();
    msg = wsdl.getMessage(msg.getQName());
    parts = msg.getOrderedParts(null);
    it = parts.iterator();
    while (it.hasNext()) {
        p = it.next();
        returns = toLuceeType(p.getTypeName());
    }
    table.appendRow(1, new SimpleDumpData("arguments"), attributes);
    table.appendRow(1, new SimpleDumpData("return type"), new SimpleDumpData(returns));
    return table;
}
Also used : DumpTable(lucee.runtime.dump.DumpTable) Types(javax.wsdl.Types) Input(javax.wsdl.Input) Message(javax.wsdl.Message) QName(javax.xml.namespace.QName) Part(javax.wsdl.Part) SimpleDumpData(lucee.runtime.dump.SimpleDumpData) Operation(javax.wsdl.Operation) BindingOperation(javax.wsdl.BindingOperation)

Example 3 with SimpleDumpData

use of lucee.runtime.dump.SimpleDumpData in project Lucee by lucee.

the class JaxWSClient method _toDumpData.

private DumpData _toDumpData(PageContext pageContext, int maxlevel, DumpProperties dp) throws RPCException {
    DumpTable functions = new DumpTable("webservice", "#99cc99", "#ccffcc", "#000000");
    functions.setTitle("Web Service (JAX WS)");
    if (dp.getMetainfo())
        functions.setComment(wsdlUrl);
    Port port = WSUtil.getSoapPort(service);
    Binding binding = port.getBinding();
    List<BindingOperation> operations = binding.getBindingOperations();
    Iterator<BindingOperation> it = operations.iterator();
    BindingOperation bo;
    while (it.hasNext()) {
        bo = it.next();
        functions.appendRow(1, new SimpleDumpData(bo.getName()), toDumpData(bo));
    }
    return functions;
}
Also used : DumpTable(lucee.runtime.dump.DumpTable) Binding(javax.wsdl.Binding) BindingOperation(javax.wsdl.BindingOperation) Port(javax.wsdl.Port) SimpleDumpData(lucee.runtime.dump.SimpleDumpData)

Example 4 with SimpleDumpData

use of lucee.runtime.dump.SimpleDumpData in project Lucee by lucee.

the class Stopwatch method doEndTag.

@Override
public int doEndTag() throws PageException {
    long exe = (System.currentTimeMillis() - time);
    if (variable != null) {
        pageContext.setVariable(variable, new Double(exe));
    } else {
        DumpTable table = new DumpTable("#ff9900", "#ffcc00", "#000000");
        table.appendRow(1, new SimpleDumpData(label == null ? "Stopwatch" : label), new SimpleDumpData(exe));
        DumpWriter writer = pageContext.getConfig().getDefaultDumpWriter(DumpWriter.DEFAULT_RICH);
        try {
            pageContext.forceWrite(writer.toString(pageContext, table, true));
        } catch (IOException e) {
        }
    }
    return EVAL_PAGE;
}
Also used : DumpTable(lucee.runtime.dump.DumpTable) SimpleDumpData(lucee.runtime.dump.SimpleDumpData) DumpWriter(lucee.runtime.dump.DumpWriter) IOException(java.io.IOException)

Example 5 with SimpleDumpData

use of lucee.runtime.dump.SimpleDumpData in project Lucee by lucee.

the class StructImplKey method toDumpData.

/**
 * @see lucee.runtime.dump.Dumpable#toDumpData(lucee.runtime.PageContext, int)
 */
@Override
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;
}
Also used : DumpTable(lucee.runtime.dump.DumpTable) SimpleDumpData(lucee.runtime.dump.SimpleDumpData) Iterator(java.util.Iterator) StringIterator(lucee.runtime.type.it.StringIterator) EntryIterator(lucee.runtime.type.it.EntryIterator)

Aggregations

DumpTable (lucee.runtime.dump.DumpTable)39 SimpleDumpData (lucee.runtime.dump.SimpleDumpData)39 DumpData (lucee.runtime.dump.DumpData)5 PageException (lucee.runtime.exp.PageException)4 Collection (lucee.runtime.type.Collection)4 Key (lucee.runtime.type.Collection.Key)4 DumpRow (lucee.runtime.dump.DumpRow)3 PageRuntimeException (lucee.runtime.exp.PageRuntimeException)3 Struct (lucee.runtime.type.Struct)3 IOException (java.io.IOException)2 Iterator (java.util.Iterator)2 Binding (javax.wsdl.Binding)2 BindingOperation (javax.wsdl.BindingOperation)2 Operation (javax.wsdl.Operation)2 Port (javax.wsdl.Port)2 QName (javax.xml.namespace.QName)2 DumpProperties (lucee.runtime.dump.DumpProperties)2 DumpWriter (lucee.runtime.dump.DumpWriter)2 ExpressionException (lucee.runtime.exp.ExpressionException)2 Array (lucee.runtime.type.Array)2