@Test public void test_isNotFalse_Boolean() { assertTrue(BooleanUtils.isNotFalse(Boolean.TRUE)); assertFalse(BooleanUtils.isNotFalse(Boolean.FALSE)); assertTrue(BooleanUtils.isNotFalse(null)); }
public boolean isCacheConnection() { return isNotFalse(cacheConnection); }
public boolean isCacheConnection() { return isNotFalse(cacheConnection); }
/** * <p>Checks if a {@code Boolean} value is <i>not</i> {@code false}, * handling {@code null} by returning {@code true}.</p> * * <pre> * BooleanUtils.isNotFalse(Boolean.TRUE) = true * BooleanUtils.isNotFalse(Boolean.FALSE) = false * BooleanUtils.isNotFalse(null) = true * </pre> * * @param bool the boolean to check, null returns {@code true} * @return {@code true} if the input is null or true * @since 2.3 */ public static boolean isNotFalse(Boolean bool) { return org.apache.commons.lang3.BooleanUtils.isNotFalse(bool); }
domReady = BooleanUtils.isNotFalse(BooleanUtils.toBooleanObject(domReadyAttr)); } catch (final StaleElementReferenceException e) {
@Override protected void init() { this.fileChooser.addElementsMarkListener((ElementsChooser.ElementsMarkListener<HybrisModuleDescriptor>) (element, isMarked) -> { if (isMarked) { for (HybrisModuleDescriptor moduleDescriptor : element.getDependenciesPlainList()) { if (BooleanUtils.isNotFalse(fileChooser.getElementMarkStates().get(moduleDescriptor))) { continue; } fileChooser.setElementMarked(moduleDescriptor, true); if (selectionMode == MANDATORY) { moduleDescriptor.setImportStatus(MANDATORY); } } } fileChooser.repaint(); }); }
if (BooleanUtils.isNotFalse(objectMetadata.getOngoingRestore()))
if (BooleanUtils.isNotFalse(objectMetadata.getOngoingRestore()))
protected void loadVisible(FieldGroup resultComponent, FieldGroup.FieldConfig field) { Element element = field.getXmlDescriptor(); if (element != null) { String visible = element.attributeValue("visible"); if (StringUtils.isNotEmpty(visible)) { field.setVisible(Boolean.parseBoolean(visible)); } } if (!field.isCustom() && BooleanUtils.isNotFalse(field.isVisible())) { MetaClass metaClass = getMetaClass(resultComponent, field); MetaPropertyPath propertyPath = getMetadataTools().resolveMetaPropertyPath(metaClass, field.getProperty()); checkNotNullArgument(propertyPath, "Could not resolve property path '%s' in '%s'", field.getId(), metaClass); if (!getSecurity().isEntityAttrReadPermitted(metaClass, propertyPath.toString())) { field.setVisible(false); } } }
protected void loadEditable(FieldGroup resultComponent, FieldGroup.FieldConfig field) { Element element = field.getXmlDescriptor(); if (element != null) { String editable = element.attributeValue("editable"); if (StringUtils.isNotEmpty(editable)) { field.setEditable(Boolean.parseBoolean(editable)); } } if (!field.isCustom() && BooleanUtils.isNotFalse(field.isEditable())) { MetaClass metaClass = getMetaClass(resultComponent, field); MetaPropertyPath propertyPath = getMetadataTools().resolveMetaPropertyPath(metaClass, field.getProperty()); checkNotNullArgument(propertyPath, "Could not resolve property path '%s' in '%s'", field.getId(), metaClass); if (!getSecurity().isEntityAttrUpdatePermitted(metaClass, propertyPath.toString())) { field.setEditable(false); } } }
@Override public String resolveThumbnailUrl(BriefDictionaryData briefElementData) { String contextPath = getContextPathIfExists(); if (briefElementData instanceof ElementWithThumbnailData && ((ElementWithThumbnailData) briefElementData).getThumbnailPath() != null) { return resolveThumbnailUrl((ElementWithThumbnailData) briefElementData, contextPath); } else if (briefElementData instanceof ObjectDetails && ((ObjectDetails) briefElementData).getObjectType() != null) { return resolveThumbnailUrl((ObjectDetails) briefElementData, contextPath); } else if (briefElementData instanceof PersonData) { PersonData person = (PersonData) briefElementData; //TODO userProfile requests optimalization (do tego moentntu rpofil jest pobierany z 2-3 razy) if (USER_ROLES.contains(person.getPortalRole()) && BooleanUtils.isNotFalse(person.isHasAvatar()) && userBusinessService.getUserAvatar(person.getId()) != null) { return contextPath + "/user/" + briefElementData.getId() + "/avatar.jpg"; } else { return contextPath + DefaultThumbnailUrlEnum.PERSON.getThumbnailUrl(); } } else if (briefElementData instanceof DiscussionGroup) { return contextPath + DefaultThumbnailUrlEnum.DISCUSSION_GROUP.getThumbnailUrl(); } else if (briefElementData instanceof DiscussionThread) { return contextPath + DefaultThumbnailUrlEnum.DISCUSSION_THREAD.getThumbnailUrl(); } else { return contextPath + DefaultThumbnailUrlEnum.DEFAULT.getThumbnailUrl(); // TODO We should have some generic thumbnail withasterisk. } }
filterEntity.setApplyDefault(BooleanUtils.isNotFalse(folder.getApplyDefault())); if (folder instanceof SearchFolder) { filterEntity.setIsSet(((SearchFolder) folder).getIsSet());
|| (filterEntity.getFolder() != null && BooleanUtils.isNotFalse(filterEntity.getApplyDefault()))) { apply(true);
if ( BooleanUtils.isNotFalse( prepareRequest.getResume() ) )
if ( BooleanUtils.isNotFalse( performRequest.getClean() ) )