Example usage for org.apache.commons.lang3.builder ToStringStyle SHORT_PREFIX_STYLE

List of usage examples for org.apache.commons.lang3.builder ToStringStyle SHORT_PREFIX_STYLE

Introduction

In this page you can find the example usage for org.apache.commons.lang3.builder ToStringStyle SHORT_PREFIX_STYLE.

Prototype

ToStringStyle SHORT_PREFIX_STYLE

To view the source code for org.apache.commons.lang3.builder ToStringStyle SHORT_PREFIX_STYLE.

Click Source Link

Document

The short prefix toString style.

Usage

From source file:org.apache.nifi.security.util.EncryptionMethod.java

@Override
public String toString() {
    final ToStringBuilder builder = new ToStringBuilder(this);
    ToStringBuilder.setDefaultStyle(ToStringStyle.SHORT_PREFIX_STYLE);
    builder.append("Algorithm name", algorithm);
    builder.append("Requires unlimited strength JCE policy", unlimitedStrength);
    builder.append("Algorithm Provider", provider);
    builder.append("Compatible with strong KDFs", compatibleWithStrongKDFs);
    builder.append("Keyed cipher", isKeyedCipher());
    return builder.toString();
}

From source file:org.apache.nifi.security.util.KeyDerivationFunction.java

@Override
public String toString() {
    final ToStringBuilder builder = new ToStringBuilder(this);
    ToStringBuilder.setDefaultStyle(ToStringStyle.SHORT_PREFIX_STYLE);
    builder.append("KDF Name", name);
    builder.append("Description", description);
    return builder.toString();
}

From source file:org.apache.openejb.server.cli.StreamManager.java

private static String string(final Object out, final String lineSep) {
    if (!out.getClass().getName().startsWith("java")) {
        try {// ww w .j a va 2  s .c  o  m
            return new GsonBuilder().setPrettyPrinting().create().toJson(out).replace(OS_LINE_SEP, lineSep);
        } catch (RuntimeException re) {
            return ToStringBuilder.reflectionToString(out, ToStringStyle.SHORT_PREFIX_STYLE)
                    .replace(OS_LINE_SEP, lineSep);
        }
    }
    return out.toString();
}

From source file:org.apache.pulsar.io.kinesis.KinesisSink.java

@Override
public void open(Map<String, Object> config, SinkContext sinkContext) throws Exception {
    kinesisSinkConfig = KinesisSinkConfig.load(config);
    this.sinkContext = sinkContext;

    checkArgument(isNotBlank(kinesisSinkConfig.getAwsKinesisStreamName()), "empty kinesis-stream name");
    checkArgument(isNotBlank(kinesisSinkConfig.getAwsEndpoint()), "empty aws-end-point");
    checkArgument(isNotBlank(kinesisSinkConfig.getAwsRegion()), "empty aws region name");
    checkArgument(isNotBlank(kinesisSinkConfig.getAwsKinesisStreamName()), "empty kinesis stream name");
    checkArgument(isNotBlank(kinesisSinkConfig.getAwsCredentialPluginParam()), "empty aws-credential param");

    KinesisProducerConfiguration kinesisConfig = new KinesisProducerConfiguration();
    kinesisConfig.setKinesisEndpoint(kinesisSinkConfig.getAwsEndpoint());
    kinesisConfig.setRegion(kinesisSinkConfig.getAwsRegion());
    kinesisConfig.setThreadingModel(ThreadingModel.POOLED);
    kinesisConfig.setThreadPoolSize(4);//from  w  w  w .j a v  a 2  s .c  o  m
    kinesisConfig.setCollectionMaxCount(1);
    AWSCredentialsProvider credentialsProvider = createCredentialProvider(
            kinesisSinkConfig.getAwsCredentialPluginName(), kinesisSinkConfig.getAwsCredentialPluginParam());
    kinesisConfig.setCredentialsProvider(credentialsProvider);

    this.streamName = kinesisSinkConfig.getAwsKinesisStreamName();
    this.kinesisProducer = new KinesisProducer(kinesisConfig);
    IS_PUBLISH_FAILED.set(this, FALSE);

    LOG.info("Kinesis sink started. {}",
            (ReflectionToStringBuilder.toString(kinesisConfig, ToStringStyle.SHORT_PREFIX_STYLE)));
}

From source file:org.apereo.portal.EntityIdentifier.java

/**
 * @see java.lang.Object#toString()/*from ww  w .  jav  a  2 s . co  m*/
 */
@Override
public String toString() {
    return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", this.type)
            .append("key", this.key).toString();
}

From source file:org.apereo.portal.layout.profile.ChainingProfileMapperImpl.java

@Override
public String toString() {
    return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("subMappers", subMappers)
            .append("defaultProfileName", defaultProfileName).toString();
}

From source file:org.apereo.portal.layout.profile.ServerNameGuestChainingProfileMapper.java

@Override
public String toString() {
    return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE)
            .append("defaultProfileName", this.defaultProfileName).append("subMappers", this.subMappers)
            .toString();// w  w w  .  j  a v a 2s  . c  om
}

From source file:org.apereo.portal.layout.profile.SessionAttributeProfileMapperImpl.java

@Override
public String toString() {
    return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE)
            .append("attributeName", this.attributeName).append("mappings", this.mappings)
            .append("defaultProfileName", this.defaultProfileName).toString();
}

From source file:org.apereo.portal.utils.threading.SingletonDoubleCheckedCreator.java

/**
 * @see java.lang.Object#toString()/*from  ww  w.  j  a va 2  s.  co  m*/
 */
@Override
public String toString() {
    return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("instance", this.instance)
            .toString();
}

From source file:org.apereo.services.persondir.support.AdditionalDescriptors.java

/**
 * @see java.lang.Object#toString()/* w w  w.ja va2 s .c o  m*/
 */
@Override
public String toString() {
    return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("name", this.name)
            .append("attributes", this.attributes).toString();
}