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:net.sourceforge.fenixedu.dataTransferObject.inquiries.InquiryBlockDTO.java

public String validateMandatoryConditions(Set<InquiryBlockDTO> inquiryBlocks) {
    Set<InquiryGroupQuestionBean> groups = getInquiryGroups();
    String validationResult = null;
    for (InquiryGroupQuestionBean group : groups) {
        validationResult = group.validateMandatoryConditions(inquiryBlocks);
        if (!Boolean.valueOf(validationResult)) {
            return validationResult;
        }//from   w  ww  .jav a2s. co m
    }
    return Boolean.toString(true);
}

From source file:nl.kadaster.geodatastore.LifeCycleSteps.java

@When("^I publish the uploaded dataset with valid metadata$")
public void iPublishTheUploadedDatasetWithValidMetadata() throws Throwable {
    logger.debug("Start: I publish the uploaded dataset with valid metadata");

    String url = conf.getDataset(true) + "/" + datasetId;

    boolean publish = true;
    tc.addPostString("publish", Boolean.toString(publish));

    response = tc.sendRequest(url, TestClient.HTTPPOST);
    Assert.assertNotNull(response);/*  w w  w .j a v  a  2  s  .c o m*/
    Assert.assertEquals(200, tc.getStatusCode());
}

From source file:org.springframework.social.slack.api.impl.ChatTemplate.java

@Override
public SlackMessageResponse deleteMessage(String timestamp, String channelNameOrId, boolean asUser) {
    MultiValueMap<String, String> map = new LinkedMultiValueMap<String, String>();
    map.add("ts", timestamp);
    map.add("channel", channelNameOrId);
    map.add("as_user", Boolean.toString(asUser));

    SlackMessageResponse slackResponse = get("/chat.delete", map, SlackMessageResponse.class);
    return slackResponse;

}

From source file:com.norconex.importer.handler.transformer.impl.StripAfterTransformer.java

@Override
protected void saveHandlerToXML(EnhancedXMLStreamWriter writer) throws XMLStreamException {
    writer.writeAttribute("caseSensitive", Boolean.toString(isCaseSensitive()));
    writer.writeAttribute("inclusive", Boolean.toString(isInclusive()));
    writer.writeStartElement("stripAfterRegex");
    writer.writeCharacters(stripAfterRegex);
    writer.writeEndElement();/*  ww  w  .j  av  a  2s  .c om*/
}

From source file:com.norconex.importer.handler.transformer.impl.StripBeforeTransformer.java

@Override
protected void saveHandlerToXML(EnhancedXMLStreamWriter writer) throws XMLStreamException {
    writer.writeAttribute("caseSensitive", Boolean.toString(isCaseSensitive()));
    writer.writeAttribute("inclusive", Boolean.toString(isInclusive()));
    writer.writeStartElement("stripBeforeRegex");
    writer.writeCharacters(stripBeforeRegex);
    writer.writeEndElement();/*  w  ww  .  j a  v  a2s. co  m*/
}

From source file:de.codesourcery.eve.skills.production.impl.FileBlueprintLibrary.java

private String[] blueprintToArray(BlueprintWithAttributesImpl impl) {
    final String[] data = new String[COL_COUNT];

    data[COL_CHARACTER_ID] = impl.getOwningCharacterId().getValue();
    data[COL_TYPE_ID] = Long.toString(impl.getBlueprintTypeId());
    data[COL_ME] = Integer.toString(impl.getMeLevel());
    data[COL_PE] = Integer.toString(impl.getPeLevel());
    data[COL_FOUND_IN_ASSETS] = Boolean.toString(impl.isFoundInAssets());

    return data;/*from w w  w .  j  a va  2 s  .  c o  m*/
}

From source file:gov.nih.nci.cabig.caaers.web.admin.AgentAjaxFacade.java

public AjaxOutput addAgentSpecificTerms(Integer agentID, String type, int[] agentIDs) {
    AjaxOutput out = new AjaxOutput();
    AgentCommand c = (AgentCommand) extractCommand();
    Agent a = agentRepository.getAgentByID(agentID);
    int firstIndex = c.getAgentSpecificTerms().size();

    if (type.equals("ctep")) {
        for (int i : agentIDs) {
            AgentSpecificCtcTerm at = new AgentSpecificCtcTerm();
            CtcTerm ctcTerm = ctcTermDao.getById(i);
            if (c.isDuplicate(ctcTerm))
                continue;
            at.setTerm(ctcTerm);/*from   w  ww  . j  a  v a  2s  .  c o m*/
            at.setAgent(a);
            c.getAgentSpecificTerms().add(at);
        }
    } else {
        for (int i : agentIDs) {
            AgentSpecificMeddraLowLevelTerm at = new AgentSpecificMeddraLowLevelTerm();
            LowLevelTerm lowLevelTerm = lowLevelTermDao.getById(i);
            if (c.isDuplicate(lowLevelTerm))
                continue;
            at.setTerm(lowLevelTerm);
            at.setAgent(a);
            c.getAgentSpecificTerms().add(at);
        }
    }

    Map<String, String> params = new LinkedHashMap<String, String>();
    int lastIndex = c.getAgentSpecificTerms().size() - 1;

    params.put("firstIndex", Integer.toString(firstIndex));
    params.put("lastIndex", Integer.toString(lastIndex));
    params.put("isADD", Boolean.toString(true));

    out.setHtmlContent(renderAjaxView("agentSpecificTermSection", params));
    return out;
}

From source file:com.norconex.collector.core.filter.impl.RegexReferenceFilter.java

@Override
public void saveToXML(Writer out) throws IOException {
    XMLOutputFactory factory = XMLOutputFactory.newInstance();
    try {//ww  w  . j av a 2s  .c  o m
        XMLStreamWriter writer = factory.createXMLStreamWriter(out);
        writer.writeStartElement("filter");
        writer.writeAttribute("class", getClass().getCanonicalName());
        super.saveToXML(writer);
        writer.writeAttribute("caseSensitive", Boolean.toString(caseSensitive));
        writer.writeCharacters(regex == null ? "" : regex);
        writer.writeEndElement();
        writer.flush();
        writer.close();
    } catch (XMLStreamException e) {
        throw new IOException("Cannot save as XML.", e);
    }
}

From source file:de.burrotinto.jKabel.config.ConfigReader.java

public void setTypeInOrder(boolean inOrder) throws IOException {
    prop.setProperty(SORTTYPINORDER, Boolean.toString(inOrder));
    save();
}