Example usage for org.apache.commons.lang.builder ToStringBuilder append

List of usage examples for org.apache.commons.lang.builder ToStringBuilder append

Introduction

In this page you can find the example usage for org.apache.commons.lang.builder ToStringBuilder append.

Prototype

public ToStringBuilder append(String fieldName, short[] array) 

Source Link

Document

Append to the toString a short array.

Usage

From source file:edu.internet2.middleware.psp.util.PSPUtil.java

public static String toString(LookupRequest lookupRequest) {
    ToStringBuilder toStringBuilder = new ToStringBuilder(lookupRequest, ToStringStyle.SHORT_PREFIX_STYLE);
    toStringBuilder.append("psoID", PSPUtil.toString(lookupRequest.getPsoID()));
    toStringBuilder.append("returnData", lookupRequest.getReturnData());
    toStringBuilder.append("requestID", lookupRequest.getRequestID());
    return toStringBuilder.toString();
}

From source file:edu.internet2.middleware.psp.util.PSPUtil.java

public static String toString(LookupResponse lookupResponse) {
    ToStringBuilder toStringBuilder = new ToStringBuilder(lookupResponse, ToStringStyle.SHORT_PREFIX_STYLE);
    toStringBuilder.append("pso", PSPUtil.toString(lookupResponse.getPso()));
    toStringBuilder.appendSuper(PSPUtil.toString((Response) lookupResponse));
    return toStringBuilder.toString();
}

From source file:edu.internet2.middleware.psp.util.PSPUtil.java

public static String toString(ModifyResponse modifyResponse) {
    ToStringBuilder toStringBuilder = new ToStringBuilder(modifyResponse, ToStringStyle.SHORT_PREFIX_STYLE);
    toStringBuilder.append("pso", PSPUtil.toString(modifyResponse.getPso()));
    toStringBuilder.appendSuper(PSPUtil.toString((Response) modifyResponse));
    return toStringBuilder.toString();
}

From source file:edu.internet2.middleware.psp.util.PSPUtil.java

public static String toString(SearchResponse searchResponse) {
    ToStringBuilder toStringBuilder = new ToStringBuilder(searchResponse, ToStringStyle.SHORT_PREFIX_STYLE);
    toStringBuilder.append("psos", searchResponse.getPSOs().length);
    toStringBuilder.appendSuper(PSPUtil.toString((Response) searchResponse));
    return toStringBuilder.toString();
}

From source file:edu.internet2.middleware.psp.util.PSPUtil.java

public static String toString(SearchRequest searchRequest) {
    ToStringBuilder toStringBuilder = new ToStringBuilder(searchRequest, ToStringStyle.SHORT_PREFIX_STYLE);
    toStringBuilder.append("query", PSPUtil.toString(searchRequest.getQuery()));
    toStringBuilder.append("returnData", searchRequest.getReturnData());
    toStringBuilder.append("maxSelect", searchRequest.getMaxSelect());
    toStringBuilder.appendSuper(PSPUtil.toString((Request) searchRequest));
    return toStringBuilder.toString();
}

From source file:edu.internet2.middleware.psp.util.PSPUtil.java

public static String toString(DSMLModification dsmlModification) {
    ToStringBuilder toStringBuilder = new ToStringBuilder(dsmlModification, ToStringStyle.SHORT_PREFIX_STYLE);
    toStringBuilder.append("name", dsmlModification.getName());
    toStringBuilder.append("op", dsmlModification.getOperation());
    return toStringBuilder.toString();
}

From source file:edu.internet2.middleware.psp.util.PSPUtil.java

public static String toString(PSOIdentifier psoIdentifier) {
    if (psoIdentifier == null) {
        return null;
    }//  ww w. j  a v  a  2 s  . c o m
    ToStringBuilder toStringBuilder = new ToStringBuilder(psoIdentifier, ToStringStyle.SHORT_PREFIX_STYLE);
    toStringBuilder.append("id", "'" + psoIdentifier.getID() + "'");
    toStringBuilder.append("targetID", psoIdentifier.getTargetID());
    toStringBuilder.append("containerID", PSPUtil.getString(psoIdentifier.getContainerID()));
    return toStringBuilder.toString();
}

From source file:edu.internet2.middleware.psp.util.PSPUtil.java

public static String toString(ModifyRequest modifyRequest) {
    ToStringBuilder toStringBuilder = new ToStringBuilder(modifyRequest, ToStringStyle.SHORT_PREFIX_STYLE);
    toStringBuilder.append("psoID", PSPUtil.toString(modifyRequest.getPsoID()));
    for (Modification modification : modifyRequest.getModifications()) {
        for (Object object : modification.getOpenContentElements(DSMLModification.class)) {
            toStringBuilder.append("mod", PSPUtil.toString((DSMLModification) object));
        }/*from  w w  w .j  a v  a2s .co  m*/
        try {
            Map<String, List<Reference>> references = PSPUtil.getReferences(modification.getCapabilityData());
            for (String typeOfReference : references.keySet()) {
                toStringBuilder.append("typeOfReference", typeOfReference);
            }
        } catch (PspException e) {
            // (Probably not a good idea, but this should never happen. ;-)
            throw new RuntimeException(e);
        }
    }
    toStringBuilder.append("returnData", modifyRequest.getReturnData());
    toStringBuilder.appendSuper(PSPUtil.toString((Request) modifyRequest));
    return toStringBuilder.toString();
}

From source file:edu.internet2.middleware.psp.util.PSPUtil.java

public static String toString(PSO pso) {
    ToStringBuilder toStringBuilder = new ToStringBuilder(pso, ToStringStyle.SHORT_PREFIX_STYLE);
    if (pso != null) {
        toStringBuilder.append("psoID", PSPUtil.toString(pso.getPsoID()));
        // TODO data ? or leave for trace xml
        // TODO capability ?
        List<AlternateIdentifier> altIds = pso.getOpenContentElements(AlternateIdentifier.class);
        if (!altIds.isEmpty()) {
            toStringBuilder.append("alternateIdentifiers", altIds);
        }/*  w w w. j  a  v a 2s  .c  om*/
    }
    return toStringBuilder.toString();
}

From source file:edu.internet2.middleware.psp.util.PSPUtil.java

public static String toString(SchemaEntityRef schemaEntityRef) {
    ToStringBuilder toStringBuilder = new ToStringBuilder(schemaEntityRef, ToStringStyle.SHORT_PREFIX_STYLE);
    if (schemaEntityRef != null) {
        toStringBuilder.append("targetID", schemaEntityRef.getTargetID());
        toStringBuilder.append("entityName", schemaEntityRef.getEntityName());
        toStringBuilder.append("isContainer", schemaEntityRef.isContainer());
    }/*from w  ww.j av a2  s.c om*/
    return toStringBuilder.toString();
}