use of org.apache.commons.lang3.builder.ToStringBuilder in project cas by apereo.
the class CasCoreAuditConfiguration method nullableReturnValueResourceResolver.
@Bean
public AuditResourceResolver nullableReturnValueResourceResolver() {
return new AuditResourceResolver() {
@Override
public String[] resolveFrom(final JoinPoint joinPoint, final Object o) {
if (o == null) {
return new String[0];
}
if (o instanceof Event) {
final Event event = Event.class.cast(o);
final String sourceName = event.getSource().getClass().getSimpleName();
final String result = new ToStringBuilder(event, ToStringStyle.NO_CLASS_NAME_STYLE).append("event", event.getId()).append("timestamp", new Date(event.getTimestamp())).append("source", sourceName).toString();
return new String[] { result };
}
return returnValueResourceResolver().resolveFrom(joinPoint, o);
}
@Override
public String[] resolveFrom(final JoinPoint joinPoint, final Exception e) {
return returnValueResourceResolver().resolveFrom(joinPoint, e);
}
};
}
use of org.apache.commons.lang3.builder.ToStringBuilder in project cas by apereo.
the class AbstractRegisteredService method toString.
@Override
public String toString() {
final ToStringBuilder toStringBuilder = new ToStringBuilder(null, ToStringStyle.SHORT_PREFIX_STYLE);
toStringBuilder.append("id", this.id);
toStringBuilder.append("name", this.name);
toStringBuilder.append("description", this.description);
toStringBuilder.append("serviceId", this.serviceId);
toStringBuilder.append("usernameAttributeProvider", this.usernameAttributeProvider);
toStringBuilder.append("theme", this.theme);
toStringBuilder.append("evaluationOrder", this.evaluationOrder);
toStringBuilder.append("logoutType", this.logoutType);
toStringBuilder.append("attributeReleasePolicy", this.attributeReleasePolicy);
toStringBuilder.append("accessStrategy", this.accessStrategy);
toStringBuilder.append("publicKey", this.publicKey);
toStringBuilder.append("proxyPolicy", this.proxyPolicy);
toStringBuilder.append("logo", this.logo);
toStringBuilder.append("logoutUrl", this.logoutUrl);
toStringBuilder.append("requiredHandlers", this.requiredHandlers);
toStringBuilder.append("properties", this.properties);
toStringBuilder.append("multifactorPolicy", this.multifactorPolicy);
toStringBuilder.append("informationUrl", this.informationUrl);
toStringBuilder.append("privacyUrl", this.privacyUrl);
return toStringBuilder.toString();
}
use of org.apache.commons.lang3.builder.ToStringBuilder in project pinot by linkedin.
the class Cube method toString.
@Override
public String toString() {
ToStringBuilder tsb = new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE);
tsb.append("Baseline Value", topBaselineValue).append("Current Value", topCurrentValue).append("Ratio", topRatio).append("Dimentions", this.dimensions).append("#Detailed Rows", hierarchicalRows.get(hierarchicalRows.size() - 1).size());
return tsb.toString();
}
use of org.apache.commons.lang3.builder.ToStringBuilder in project cas by apereo.
the class OAuthRegisteredService method toString.
@Override
public String toString() {
final ToStringBuilder builder = new ToStringBuilder(this);
builder.appendSuper(super.toString());
builder.append("clientId", getClientId());
builder.append("approvalPrompt", isBypassApprovalPrompt());
builder.append("generateRefreshToken", isGenerateRefreshToken());
builder.append("jsonFormat", isJsonFormat());
return builder.toString();
}
use of org.apache.commons.lang3.builder.ToStringBuilder in project nifi by apache.
the class StandardFlowFileRecord method toString.
@Override
public String toString() {
final ToStringBuilder builder = new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE);
builder.append("uuid", getAttribute(CoreAttributes.UUID.key()));
builder.append("claim", claim == null ? "" : claim.toString());
builder.append("offset", claimOffset);
builder.append("name", getAttribute(CoreAttributes.FILENAME.key())).append("size", size);
return builder.toString();
}
Aggregations