Example usage for org.apache.commons.lang3 BooleanUtils toStringTrueFalse

List of usage examples for org.apache.commons.lang3 BooleanUtils toStringTrueFalse

Introduction

In this page you can find the example usage for org.apache.commons.lang3 BooleanUtils toStringTrueFalse.

Prototype

public static String toStringTrueFalse(final boolean bool) 

Source Link

Document

Converts a boolean to a String returning 'true' or 'false' .

 BooleanUtils.toStringTrueFalse(true)   = "true" BooleanUtils.toStringTrueFalse(false)  = "false" 

Usage

From source file:com.autonomy.nonaci.indexing.impl.DreCreateDBaseCommand.java

/**
 * Specify <tt>true</tt> to create an internal database. 
 * //www  . jav  a  2  s. c o  m
 * @param internal Specifies if the database is internal.
 */
public void setInternal(final boolean internal) {
    put(PARAM_INTERNAL, BooleanUtils.toStringTrueFalse(internal));
}

From source file:io.cloudslang.content.amazon.inputs.VolumeInputsTest.java

@Test
public void volumeInputsBuilderTest() {
    final VolumeInputs volumeInputs = new VolumeInputs.Builder().withDescription(DESCRIPTION)
            .withDeviceName(DEVICE_NAME).withEncrypted(BooleanUtils.toStringTrueFalse(true))
            .withForce(BooleanUtils.toStringTrueFalse(false)).withIops(EMPTY)
            .withMaxResults(String.valueOf(MAX_RESULTS)).withSize(String.valueOf(SIZE)).withNextToken(EMPTY)
            .build();/*from   w  w w . java 2 s . co m*/

    assertEquals(DESCRIPTION, volumeInputs.getDescription());
    assertEquals(DEVICE_NAME, volumeInputs.getDeviceName());
    assertEquals(NOT_RELEVANT, volumeInputs.getIops());
    assertEquals(EMPTY, volumeInputs.getNextToken());

    assertEquals(String.valueOf(MAX_RESULTS), volumeInputs.getMaxResults());
    assertEquals(String.valueOf(SIZE), volumeInputs.getSize());

    assertTrue(volumeInputs.isEncrypted());
    assertFalse(volumeInputs.isForce());
}

From source file:com.autonomy.nonaci.indexing.impl.AbstractExportCommand.java

/**
 * Enter <tt>true</tt> if you want to compress the exported files. Enter <tt>false</tt> if you don't want to
 * compress the files.// w  w  w. jav  a 2  s .co m
 * 
 * @param compress <tt>true</tt> to compress the exported files.
 */
public void setCompress(final boolean compress) {
    put(PARAM_COMPRESS, BooleanUtils.toStringTrueFalse(compress));
}

From source file:com.autonomy.nonaci.indexing.impl.DreCreateDBaseCommand.java

/**
 * Specify <tt>true</tt> to create a database that is read-only. 
 * /*w ww. j a v  a  2 s.c o m*/
 * @param readOnly Specifies if the database is read-only. 
 */
public void setReadOnly(final boolean readOnly) {
    put(PARAM_READ_ONLY, BooleanUtils.toStringTrueFalse(readOnly));
}

From source file:com.autonomy.nonaci.indexing.impl.DreReplaceCommand.java

/**
 * If you specify <strong>true</strong>, the specified field and value are simply added to the specified document.
 * If there are existing instances of the field, the data is added as a new instance. If you specify <strong>false
 * </strong>, all fields whose name matches the specified field are removed from the document before the specified
 * field and value are written into it. The specified data replaces any pre-existing data for that field.
 *
 * @param insertValue Whether to add new instances of a specified field, or just replace values in existing
 *         instances.//  www .  j ava2  s.  co  m
 */
public void setInsertValue(final boolean insertValue) {
    put(PARAM_INSERT_VALUE, BooleanUtils.toStringTrueFalse(insertValue));
}

From source file:com.autonomy.nonaci.indexing.impl.AbstractExportCommand.java

/**
 * Enter <strong>true</strong> if you want to delete the documents from IDOL server after exporting them. (Documents
 * are deleted only if the export is successful.)
 * <p />// w  w  w  .  jav  a2s.  c o m
* Enter <strong>false</strong> if you don't want to delete the documents.
 *
 * @param delete Specifies whether the exported documents are to be deleted.
 */
public void setDelete(final boolean delete) {
    put(PARAM_DELETE, BooleanUtils.toStringTrueFalse(delete));
}

From source file:com.autonomy.nonaci.indexing.impl.DreReplaceCommand.java

/**
 * Specify <strong>true</strong> to allow the data to contain multiple #DREFIELDNAME/#DREFIELDVALUE pairs in which
 * #DREFIELDNAME has the same value. This allows you to create multiple instances of the same field with different
 * values. Specify <strong>false</strong> to require that the data contain only one #DREFIELDNAME/#DREFIELDVALUE
 * pair for each field name.//from w  w w.ja va 2 s  .  c o  m
 *
 * @param multipleValues Whether to allow multiple #DREFIELDNAME/#DREFIELDVALUE pairs for the same field name.
 */
public void setMultipleValues(final boolean multipleValues) {
    put(PARAM_MULTIPLE_VALUES, BooleanUtils.toStringTrueFalse(multipleValues));
}

From source file:com.autonomy.nonaci.indexing.impl.DreReplaceCommand.java

/**
 * If you specify <strong>true</strong>, and if you use #DREDOCREF in the replacement data to identify documents,
 * the <strong>DREREPLACE</strong> command will affect all documents with a reference field whose value matches the
 * value supplied in #DREDOCREF./*from w w  w .j  a va 2 s . c  om*/
 * <p />
 * If you specify <strong>false</strong>, the command will affect only the <em>first</em> matching document.
 *
 * @param replaceAllRefs Whether to replace values in all matching documents, or just the first one.
 */
public void setReplaceAllRefs(final boolean replaceAllRefs) {
    put(PARAM_REPLACE_ALL_REFS, BooleanUtils.toStringTrueFalse(replaceAllRefs));
}

From source file:com.esri.geoportal.harvester.ckan.CkanBrokerDefinitionAdaptor.java

public void setEmitXml(boolean emitXml) {
    this.emitXml = emitXml;
    set(P_EMIT_XML, BooleanUtils.toStringTrueFalse(emitXml));
}

From source file:com.esri.geoportal.harvester.ckan.CkanBrokerDefinitionAdaptor.java

public void setEmitJson(boolean emitJson) {
    this.emitJson = emitJson;
    set(P_EMIT_JSON, BooleanUtils.toStringTrueFalse(emitJson));
}