Example usage for java.lang Boolean toString

List of usage examples for java.lang Boolean toString

Introduction

In this page you can find the example usage for java.lang Boolean toString.

Prototype

public static String toString(boolean b) 

Source Link

Document

Returns a String object representing the specified boolean.

Usage

From source file:com.datatorrent.flume.storage.HDFSStorageTest.java

private HDFSStorage getStorage(String id, boolean restore) {
    Context ctx = new Context();
    STORAGE_DIRECTORY = testMeta.baseDir;
    ctx.put(HDFSStorage.BASE_DIR_KEY, testMeta.baseDir);
    ctx.put(HDFSStorage.RESTORE_KEY, Boolean.toString(restore));
    ctx.put(HDFSStorage.ID, id);//from w ww .  ja v a2  s. c om
    ctx.put(HDFSStorage.BLOCKSIZE, "256");
    HDFSStorage lstorage = new HDFSStorage();
    lstorage.configure(ctx);
    lstorage.setup(null);
    return lstorage;
}

From source file:com.igormaznitsa.ideamindmap.facet.InMemoryPreferenceNode.java

@Override
public void putBoolean(String key, boolean value) {
    this.put(key, Boolean.toString(value));
}

From source file:com.esri.geoportal.harvester.gpt.GptBrokerDefinitionAdaptor.java

/**
 * Sets to force add flag.//from   w  w w.ja v  a  2  s.  c  om
 * @param forceAdd <code>true</code> if to force add
 */
public void setForceAdd(boolean forceAdd) {
    this.forceAdd = forceAdd;
    set(P_FORCE_ADD, Boolean.toString(forceAdd));
}

From source file:org.opencastproject.distribution.download.remote.DownloadDistributionServiceRemoteImpl.java

@Override
public Job distribute(String channelId, final MediaPackage mediaPackage, final String elementId,
        boolean checkAvailability) throws DistributionException {
    logger.info(format("Distributing %s to %s@%s", elementId, channelId, distributionChannel));
    final HttpPost req = post(param(PARAM_CHANNEL_ID, channelId),
            param(PARAM_MEDIAPACKAGE, MediaPackageParser.getAsXml(mediaPackage)),
            param(PARAM_ELEMENT_ID, elementId),
            param(PARAM_CHECK_AVAILABILITY, Boolean.toString(checkAvailability)));
    for (Job job : join(runRequest(req, jobFromHttpResponse))) {
        return job;
    }// ww  w.  j a  v a  2  s .  com
    throw new DistributionException(format(
            "Unable to distribute element '%s' of "
                    + "mediapackage '%s' using a remote destribution service proxy",
            elementId, mediaPackage.getIdentifier().toString()));
}

From source file:de.codesourcery.jasm16.ide.WorkspaceConfig.java

public boolean isProjectOpen(String projectName) {
    final String key = createProjectStateKey(projectName);
    String value = configProperties.get(key);
    if (StringUtils.isBlank(value)) {
        value = Boolean.toString(true);
    }//from ww w.  j  a  v a 2s .c  om
    return Boolean.parseBoolean(value);
}

From source file:byps.BBufferJson.java

public void putBoolean(String name, boolean v) {
    putJsonValueAscii(name, Boolean.toString(v), STRING_WITHOUT_QUOTE);
}

From source file:com.surevine.alfresco.audit.repo.JdbcAuditRepository.java

/**
 * Simple write to the database of the audit object.
 * //  w w w . j a  va 2s . c o  m
 * @see com.surevine.alfresco.audit.AuditRepository#audit(com.surevine.alfresco.audit.Auditable)
 */
public void audit(final Auditable toAudit) {
    this.jdbcTemplate.update(UPDATE_SQL, new PreparedStatementSetter() {

        public void setValues(PreparedStatement ps) throws SQLException {
            ps.setString(1, truncate(toAudit.getUser(), 40));
            ps.setString(2, truncate(toAudit.getAction(), 40));
            ps.setString(3, truncate(toAudit.getSource(), 80));
            ps.setString(4, truncate(toAudit.getSecLabel(), 1024));
            ps.setString(5, truncate(toAudit.getSite(), 80));
            ps.setString(6, truncate(toAudit.getDetails(), 256));
            ps.setString(7, truncate(toAudit.getUrl(), 256));
            ps.setString(8, truncate(toAudit.getVersion(), 10));
            ps.setTimestamp(9, new java.sql.Timestamp(System.currentTimeMillis()));
            ps.setString(10, truncate(toAudit.getRemoteAddress(), 40));
            ps.setString(11, Boolean.toString(toAudit.isSuccess()));
            ps.setString(12, truncate(toAudit.getTags(), 256));
            ps.setString(13, truncate(toAudit.getNodeRef(), 80));
            ps.setLong(14, toAudit.getTimeSpent());
        }
    });
}

From source file:de.micromata.genome.gwiki.page.gspt.BodyContentImpl.java

@Override
public void print(boolean arg0) throws IOException {
    write(Boolean.toString(arg0));
}

From source file:br.com.hslife.orcamento.service.OpcaoSistemaService.java

public void salvarOpcoesGlobalAdmin(Map<String, Object> opcoesSistema) {
    OpcaoSistema opcao = new OpcaoSistema();
    for (String chave : opcoesSistema.keySet()) {
        opcao = getRepository().findOpcaoGlobalAdminByChave(chave);
        validarValorOpcaoSistema(opcao, opcoesSistema.get(opcao.getChave()));
        if (opcoesSistema.get(chave) instanceof String) {
            opcao.setTipoValor("STRING");
            opcao.setValor((String) opcoesSistema.get(chave));
        }// ww w .  j  ava 2  s  .co  m
        if (opcoesSistema.get(chave) instanceof Boolean) {
            opcao.setTipoValor("BOOLEAN");
            opcao.setValor(Boolean.toString((Boolean) opcoesSistema.get(chave)));
        }
        if (opcoesSistema.get(chave) instanceof Integer) {
            opcao.setTipoValor("INTEGER");
            opcao.setValor(Integer.toString((Integer) opcoesSistema.get(chave)));
        }
        //opcao.setValor((String)opcoesSistema.get(chave)); -- Mudana decorrente de usar o JSF 2.2.10 e PrimeFaces 5.2
        getRepository().update(opcao);
    }
}

From source file:com.norconex.importer.handler.filter.impl.RegexContentFilter.java

@Override
protected void saveFilterToXML(EnhancedXMLStreamWriter writer) throws XMLStreamException {
    writer.writeAttribute("caseSensitive", Boolean.toString(caseSensitive));
    writer.writeCharacters(regex == null ? "" : regex);
}