@Test public void test_toStringTrueFalse_Boolean() { assertNull(BooleanUtils.toStringTrueFalse(null)); assertEquals("true", BooleanUtils.toStringTrueFalse(Boolean.TRUE)); assertEquals("false", BooleanUtils.toStringTrueFalse(Boolean.FALSE)); }
@Test public void test_toStringTrueFalse_boolean() { assertEquals("true", BooleanUtils.toStringTrueFalse(true)); assertEquals("false", BooleanUtils.toStringTrueFalse(false)); }
@Override public void addProperty(String name, boolean value) { Document doc = this.content.getOwnerDocument(); Element ele = doc.createElement(name); ele.appendChild(doc.createTextNode(BooleanUtils.toStringTrueFalse(value))); this.content.appendChild(ele); }
/** * If you have set <strong>KillDuplicates</strong> to <strong>Reference</strong>, <strong>ReferenceMatch<i>N</i> * </strong> or <strong><i>FieldName</i></strong>, you can set <strong>KeepExisting</strong> to <strong>true * </strong> if you want IDOL server to discard the document it has received for indexing and keep the matching * document that it already contains instead. * * @param keepExisting Modifies the <strong>KillDuplicates</strong> operation. */ public void setKeepExisting(final boolean keepExisting) { put(PARAM_KEEP_EXISTING, BooleanUtils.toStringTrueFalse(keepExisting)); }
/** * Adds host details to the exported filename. For example, the following action could generate a series of files * named <strong>backup-myservername.domain.com-16502-0.idx.gz</strong>: * <p /> * <strong>DREEXPORTIDX&filename=backup&hostdetails=true</strong> * * @param hostDetails Adds host details to the exported filename. */ public void setHostDetails(final boolean hostDetails) { put(PARAM_HOST_DETAILS, BooleanUtils.toStringTrueFalse(hostDetails)); }
/** * When set to <tt>true</tt>, IDOL server deletes the file you are indexing after it is indexed. * * @param delete <tt>true</tt> to delete the IDX or XML file after indexing. */ public void setDelete(final boolean delete) { put(PARAM_DELETE, BooleanUtils.toStringTrueFalse(delete)); }
/** * 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. */ public void setInsertValue(final boolean insertValue) { put(PARAM_INSERT_VALUE, BooleanUtils.toStringTrueFalse(insertValue)); }
/** * 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. * * @param compress <tt>true</tt> to compress the exported files. */ public void setCompress(final boolean compress) { put(PARAM_COMPRESS, BooleanUtils.toStringTrueFalse(compress)); }
/** * Specify <tt>true</tt> to create a database that is read-only. * * @param readOnly Specifies if the database is read-only. */ public void setReadOnly(final boolean readOnly) { put(PARAM_READ_ONLY, BooleanUtils.toStringTrueFalse(readOnly)); }
@Override public void setLoggedIn(boolean loggedIn){ this.hSet(DEFAULT_GROUP,LOGIN_KEY, BooleanUtils.toStringTrueFalse(loggedIn), true); }
/** * 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. * * @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)); }
/** * If set to <tt>true</tt>, the database into which the document is to be indexed is searched for duplicate matches. * * @param killDuplicatesMatchTargetDB If set to <tt>true</tt>, the database into which the document is to be indexed * is searched for duplicate matches. */ public void setKillDuplicatesMatchTargetDB(final boolean killDuplicatesMatchTargetDB) { put(PARAM_KILL_DUPLICATES_MATCH_TARGET_DB, BooleanUtils.toStringTrueFalse(killDuplicatesMatchTargetDB)); }
/** * 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.) 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)); }
/** * Specify <strong>true</strong> if you want each DREADD command on the target IDOL server to complete before * another indexing command starts. Specify <strong>false</strong> if you don’t want <strong>DREEXPORTREMOTE * </strong>to wait for each indexing command to complete before executing the next. * * @param blocking Specifies whether each indexing command on target IDOL server should finish before next one * starts. */ public void setBlocking(final boolean blocking) { put(PARAM_BLOCKING, BooleanUtils.toStringTrueFalse(blocking)); }
/** * 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 /> * 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)); }
/** * Specify <tt>true</tt> to create an internal database. * * @param internal Specifies if the database is internal. */ public void setInternal(final boolean internal) { put(PARAM_INTERNAL, BooleanUtils.toStringTrueFalse(internal)); }
@Override protected void onExecute(Session session, XsObject root, XsObject current, LogicletContext ctx, ExecuteWatcher watcher) { ctx.SetValue(ID_SESSION_ID, session.getId()); ctx.SetValue(ID_SESSION_IS_LOGIN, BooleanUtils.toStringTrueFalse(session.isLoggedIn())); ctx.SetValue(ID_SESSION_IS_EXPIRE, BooleanUtils.toStringTrueFalse(session.isExpired())); } }
@Override protected void onExecute(XsObject root,XsObject current, LogicletContext ctx, ExecuteWatcher watcher) { VirtualFileSystem vfs = ctx.getObject(pid); if (vfs == null){ throw new BaseException("core.e1001",String.format("Can not find vfs:%s", pid)); } String pathValue = ctx.transform(path); ctx.SetValue(id, BooleanUtils.toStringTrueFalse(vfs.deleteFile(pathValue))); } }
@Override protected void onExecute(CacheObject cache, Map<String, Object> root, Map<String, Object> current, LogicletContext ctx, ExecuteWatcher watcher) { String id = PropertiesConstants.transform(ctx, $id, "$" + getXmlTag()); if (StringUtils.isNotEmpty(id)){ ctx.SetValue(id, BooleanUtils.toStringTrueFalse(cache.sExist( PropertiesConstants.transform(ctx, $group, CacheObject.DEFAULT_GROUP), PropertiesConstants.transform(ctx, $member, "")))); } }
/** * @return the value of the selected option, or null if no selected * option. */ @Override public String getValue() { if (isReadOnly()) { return super.getAttribute(SeleniumWComponentWebProperties.ATTRIBUTE_WRAPPED_VALUE.toString()); } return BooleanUtils.toStringTrueFalse(getInputField().isSelected()); }