List of usage examples for java.lang Boolean toString
public static String toString(boolean b)
From source file:com.polyvi.xface.extension.XExtensionResult.java
public XExtensionResult(Status status, boolean b) { this.mStatus = status.ordinal(); this.messageType = MESSAGE_TYPE_BOOLEAN; this.mEncodedMessage = Boolean.toString(b); }
From source file:fr.paris.lutece.plugins.workflow.modules.rest.service.formatters.ActionFormatterXml.java
/** * Format the action//from w ww . ja v a 2 s . c om * @param sbXml the XML * @param action the action */ private void formatAction(StringBuffer sbXml, Action action) { XmlUtil.beginElement(sbXml, WorkflowRestConstants.TAG_ACTION); XmlUtil.addElement(sbXml, WorkflowRestConstants.TAG_ID_ACTION, action.getId()); XmlUtil.addElement(sbXml, WorkflowRestConstants.TAG_NAME, action.getName()); XmlUtil.addElement(sbXml, WorkflowRestConstants.TAG_DESCRIPTION, action.getDescription()); XmlUtil.addElement(sbXml, WorkflowRestConstants.TAG_ID_WORKFLOW, action.getWorkflow().getId()); XmlUtil.addElement(sbXml, WorkflowRestConstants.TAG_ID_STATE_BEFORE, action.getStateBefore().getId()); XmlUtil.addElement(sbXml, WorkflowRestConstants.TAG_ID_STATE_AFTER, action.getStateAfter().getId()); XmlUtil.addElement(sbXml, WorkflowRestConstants.TAG_IS_AUTOMATIC_STATE, Boolean.toString(action.isAutomaticState())); XmlUtil.addElement(sbXml, WorkflowRestConstants.TAG_IS_MASS_ACTION, Boolean.toString(action.isMassAction())); XmlUtil.endElement(sbXml, WorkflowRestConstants.TAG_ACTION); }
From source file:com.norconex.importer.handler.tagger.impl.RenameTagger.java
@Override protected void saveHandlerToXML(EnhancedXMLStreamWriter writer) throws XMLStreamException { for (String fromField : renames.keySet()) { RenameDetails details = renames.get(fromField); writer.writeStartElement("rename"); writer.writeAttribute("fromField", details.fromField); writer.writeAttribute("toField", details.toField); writer.writeAttribute("overwrite", Boolean.toString(details.overwrite)); writer.writeEndElement();/*w w w . ja v a 2 s .co m*/ } }
From source file:com.sds.acube.jstor.XNDiscXNApi.java
/** * ??(? )/* www .j a v a 2s .c om*/ * * @param useCache * ? */ public XNDiscXNApi(boolean useCache) { System.setProperty("xndisc_xnapi_use_cache", Boolean.toString(useCache)); this.useCache = useCache; }
From source file:com.aurel.track.admin.server.siteConfig.OutgoingEmailBL.java
/** * Updates the site bean (server configuration bean) with new information from * the outgoing e-mail configuration transfer object. * * @param siteBean contains all data for the server configuration * @param outgoingEmailTO transfer object with SMTP server configuration data * *//*from w w w . j a v a 2 s. com*/ static void updateOutgoingEmail(TSiteBean siteBean, OutgoingEmailTO outgoingEmailTO) { siteBean.setEmailPersonalName(outgoingEmailTO.getEmailPersonalName()); siteBean.setTrackEmail(outgoingEmailTO.getTrackEmail()); siteBean.setSmtpServerName(outgoingEmailTO.getServerName()); siteBean.setSmtpSecurityConnection(outgoingEmailTO.getSecurityConnection()); siteBean.setSmtpReqAuth(Boolean.toString(outgoingEmailTO.isReqAuth())); if (outgoingEmailTO.getAuthMode() == null) { siteBean.setSmtpAuthMode( Integer.toString(TSiteBean.SMTP_AUTHENTICATION_MODES.CONNECT_USING_SMTP_SETTINGS)); } else { siteBean.setSmtpAuthMode(outgoingEmailTO.getAuthMode().toString()); } siteBean.setSmtpUser(outgoingEmailTO.getUser()); if (outgoingEmailTO.getPassword() != null && outgoingEmailTO.getPassword().trim().length() > 0) { siteBean.setSmtpPassWord(outgoingEmailTO.getPassword()); } siteBean.setUseTrackFromAddressDisplay(outgoingEmailTO.getSendFromMode()); siteBean.setMailEncoding(outgoingEmailTO.getMailEncoding()); if (outgoingEmailTO.getPort() == null || outgoingEmailTO.getPort().intValue() < 1) { outgoingEmailTO.setPort(new Integer(25)); // set port to default value } siteBean.setSmtpPort(outgoingEmailTO.getPort()); }
From source file:com.googlecode.janrain4j.api.engage.EngageServiceImpl.java
public UserDataResponse authInfo(String token, boolean extended) throws EngageFailureException, ErrorResponeException { Map<String, String> params = new HashMap<String, String>(); params.put(TOKEN_PARAM, token);// w w w . ja v a 2s .co m params.put(EXTENDED_PARAM, Boolean.toString(extended)); String jsonResponse = apiCall(AUTH_INFO_METHOD, params); return new UserDataResponse(jsonResponse); }
From source file:com.jaeksoft.searchlib.ocr.OcrManager.java
private void save() throws IOException { Properties properties = new Properties(); properties.setProperty(OCR_PROPERTY_ENABLED, Boolean.toString(enabled)); if (tesseractPath != null) properties.setProperty(OCR_PROPERTY_TESSERACT_PATH, tesseractPath); if (defaultLanguage != null) properties.setProperty(OCR_PROPERTY_DEFAULT_LANGUAGE, defaultLanguage.name()); PropertiesUtils.storeToXml(properties, propFile); }
From source file:fr.paris.lutece.plugins.workflow.modules.rest.service.formatters.WorkflowFormatterXml.java
/** * Format the workflow/*w ww.j av a2s. co m*/ * @param sbXml the XML * @param workflow the workflow */ private void formatWorkflow(StringBuffer sbXml, Workflow workflow) { DateFormat dateFormat = DateFormat.getDateInstance(DateFormat.SHORT, I18nService.getDefaultLocale()); String strDate = dateFormat.format(workflow.getCreationDate()); XmlUtil.beginElement(sbXml, WorkflowRestConstants.TAG_WORKFLOW); XmlUtil.addElement(sbXml, WorkflowRestConstants.TAG_ID_WORKFLOW, workflow.getId()); XmlUtil.addElement(sbXml, WorkflowRestConstants.TAG_NAME, workflow.getName()); XmlUtil.addElement(sbXml, WorkflowRestConstants.TAG_DESCRIPTION, workflow.getDescription()); XmlUtil.addElement(sbXml, WorkflowRestConstants.TAG_CREATION_DATE, strDate); XmlUtil.addElement(sbXml, WorkflowRestConstants.TAG_IS_ENABLE, Boolean.toString(workflow.isEnabled())); XmlUtil.addElement(sbXml, WorkflowRestConstants.TAG_WORKGROUP_KEY, workflow.getWorkgroup()); XmlUtil.endElement(sbXml, WorkflowRestConstants.TAG_WORKFLOW); }
From source file:com.sybase365.mobiliser.custom.project.jobs.event.handler.blacklist.BlacklistEventHandler.java
@Transactional @Override/* w w w. j a va 2s. c o m*/ public boolean process(final Event e) { final BlacklistEvent blacklistEvent = new BlacklistEvent(e.getData()); if (LOG.isDebugEnabled()) { LOG.debug( "Processing BlacklistEvent [id = #{}, " + "blacklistId = #{}, blacklistType = {}, " + "addedToBlacklist = {}, customerId = #{}] ", new Object[] { Long.toString(e.getId()), Long.toString(blacklistEvent.getBlacklistId()), Integer.toString(blacklistEvent.getBlacklistType()), Boolean.toString(blacklistEvent.isAddedToBlacklist()), Long.toString(blacklistEvent.getCustomerId()) }); } if (getConfiguration().getUsername() == null) { LOG.warn("!!!! MISSING PREFERENCE CONFIGURATION FOR INTERNAL USERNAME !!!"); LOG.info("Check preference values: Class {} username {}", new Object[] { this.getClass().getCanonicalName(), InternalServiceCallConfiguration.PREFS_USERNAME }); LOG.warn("!!! Skipp processing of BlacklistEvent #{} !!!", Long.toString(e.getId())); return false; } final boolean processed = sendNotification(blacklistEvent); if (LOG.isDebugEnabled() && processed) { LOG.debug("processed event #{}", Long.toString(e.getId())); } return processed; }
From source file:it.biztech.btable.util.Utils.java
public static void buildJsonResult(final OutputStream out, final Boolean success, final Object result) { final JSONObject jsonResult = new JSONObject(); jsonResult.put("status", Boolean.toString(success)); if (result != null) { jsonResult.put("result", result); }/* w ww .j a va 2 s . com*/ PrintWriter pw = null; try { pw = new PrintWriter(out); pw.print(jsonResult.toString(2)); pw.flush(); } finally { IOUtils.closeQuietly(pw); } }