当前位置: 首页>>代码示例>>Java>>正文


Java BooleanUtils.isFalse方法代码示例

本文整理汇总了Java中org.apache.commons.lang.BooleanUtils.isFalse方法的典型用法代码示例。如果您正苦于以下问题:Java BooleanUtils.isFalse方法的具体用法?Java BooleanUtils.isFalse怎么用?Java BooleanUtils.isFalse使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.commons.lang.BooleanUtils的用法示例。


在下文中一共展示了BooleanUtils.isFalse方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: answerServerAciService

import org.apache.commons.lang.BooleanUtils; //导入方法依赖的package包/类
@Bean
@ConditionalOnMissingBean(name = ANSWER_SERVER_ACI_SERVICE_BEAN_NAME)
public AciService answerServerAciService(@Qualifier(ACI_SERVICE_BEAN_NAME)
                                       final AciService aciService,
                                       final ConfigService<C> configService) {
    return new AbstractConfigurableAciService(aciService) {
        @Override
        public AciServerDetails getServerDetails() {
            final AnswerServerConfig answerServerConfig = configService.getConfig().getAnswerServer();
            if (answerServerConfig == null || BooleanUtils.isFalse(answerServerConfig.getEnabled())) {
                throw new IllegalStateException("Attempted to contact AnswerServer but AnswerServer is not configured");
            }

            return answerServerConfig.toAciServerDetails();
        }
    };
}
 
开发者ID:hpe-idol,项目名称:haven-search-components,代码行数:18,代码来源:HavenSearchIdolConfiguration.java

示例2: matchesRoleRelation

import org.apache.commons.lang.BooleanUtils; //导入方法依赖的package包/类
private <O extends ObjectType> boolean matchesRoleRelation(PrismObject<O> object, ObjectReferenceType subjectRoleMembershipRef,
		RoleRelationObjectSpecificationType specRoleRelation, String autzHumanReadableDesc, String desc) throws SchemaException {
	if (!MiscSchemaUtil.compareRelation(specRoleRelation.getSubjectRelation(), subjectRoleMembershipRef.getRelation())) {
		return false;
	}
	if (BooleanUtils.isTrue(specRoleRelation.isIncludeReferenceRole()) && subjectRoleMembershipRef.getOid().equals(object.getOid())) {
		return true;
	}
	if (!BooleanUtils.isFalse(specRoleRelation.isIncludeMembers())) {
		if (!object.canRepresent(FocusType.class)) {
			return false;
		}
		for (ObjectReferenceType objectRoleMembershipRef: ((FocusType)object.asObjectable()).getRoleMembershipRef()) {
			if (!subjectRoleMembershipRef.getOid().equals(objectRoleMembershipRef.getOid())) {
				continue;
			}
			if (!MiscSchemaUtil.compareRelation(specRoleRelation.getObjectRelation(), objectRoleMembershipRef.getRelation())) {
				continue;
			}
			return true;
		}
	}
	return false;
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:25,代码来源:SecurityEnforcerImpl.java

示例3: createTextField

import org.apache.commons.lang.BooleanUtils; //导入方法依赖的package包/类
protected TextField createTextField(Datatype datatype) {
    TextField textField = componentsFactory.createComponent(TextField.class);
    textField.setDatatype(datatype);

    if (!BooleanUtils.isFalse(editable)) {
        FilterHelper.ShortcutListener shortcutListener = new FilterHelper.ShortcutListener("add", new KeyCombination(KeyCombination.Key.ENTER)) {
            @Override
            public void handleShortcutPressed() {
                _addValue(textField);
            }
        };
        AppBeans.get(FilterHelper.class).addShortcutListener(textField, shortcutListener);
    }
    return textField;
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:16,代码来源:ListEditorPopupWindow.java

示例4: addValueToLayout

import org.apache.commons.lang.BooleanUtils; //导入方法依赖的package包/类
protected void addValueToLayout(final Object value, String str) {
    final BoxLayout itemLayout = componentsFactory.createComponent(HBoxLayout.class);
    itemLayout.setSpacing(true);

    Label itemLab = componentsFactory.createComponent(Label.class);
    if (optionsMap != null) {
        str = optionsMap.entrySet()
                .stream()
                .filter(entry -> Objects.equals(entry.getValue(), value))
                .findFirst()
                .get().getKey();
    }
    itemLab.setValue(str);
    itemLayout.add(itemLab);
    itemLab.setAlignment(Alignment.MIDDLE_LEFT);

    LinkButton delItemBtn = componentsFactory.createComponent(LinkButton.class);
    delItemBtn.setIcon("icons/item-remove.png");
    delItemBtn.setAction(new AbstractAction("") {
        @Override
        public void actionPerform(Component component) {
            valuesMap.remove(value);
            valuesLayout.remove(itemLayout);
        }
    });
    itemLayout.add(delItemBtn);

    if (BooleanUtils.isFalse(editable)) {
        delItemBtn.setEnabled(false);
    }

    valuesLayout.add(itemLayout);
    valuesMap.put(value, str);
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:35,代码来源:ListEditorPopupWindow.java

示例5: updateText

import org.apache.commons.lang.BooleanUtils; //导入方法依赖的package包/类
@Override
protected void updateText() {
    if (operator == Op.NOT_EMPTY) {
        if (BooleanUtils.isTrue((Boolean) param.getValue())) {
            text = text.replace("not exists", "exists");
        } else if (BooleanUtils.isFalse((Boolean) param.getValue()) && !text.contains("not exists")) {
            text = text.replace("exists ", "not exists ");
        }
    }

    if (!isCollection) {
        if (operator == Op.ENDS_WITH || operator == Op.STARTS_WITH || operator == Op.CONTAINS || operator == Op.DOES_NOT_CONTAIN) {
            Matcher matcher = LIKE_PATTERN.matcher(text);
            if (matcher.find()) {
                String escapeCharacter = ("\\".equals(QueryUtils.ESCAPE_CHARACTER) || "$".equals(QueryUtils.ESCAPE_CHARACTER))
                        ? QueryUtils.ESCAPE_CHARACTER + QueryUtils.ESCAPE_CHARACTER
                        : QueryUtils.ESCAPE_CHARACTER;
                text = matcher.replaceAll("$1 ESCAPE '" + escapeCharacter + "' ");
            }
        }
    } else {
        if (operator == Op.CONTAINS) {
            text = text.replace("not exists", "exists");
        } else if (operator == Op.DOES_NOT_CONTAIN && !text.contains("not exists")) {
            text = text.replace("exists ", "not exists ");
        }
    }
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:29,代码来源:DynamicAttributesCondition.java

示例6: copyItemsCollection

import org.apache.commons.lang.BooleanUtils; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
protected <T> List<T> copyItemsCollection(Collection<T> items) {
    List<T> result = Lists.newArrayList();
    for (T item : items) {
        if (item instanceof BaseGenericIdEntity
                && BooleanUtils.isFalse(BaseEntityInternalAccess.isDetached((BaseGenericIdEntity) item)))
            item = (T) copy((BaseGenericIdEntity) item);
        result.add(item);
    }

    return result;
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:13,代码来源:ObjectsCache.java

示例7: processRoleRelationFilter

import org.apache.commons.lang.BooleanUtils; //导入方法依赖的package包/类
/**
 * Very rudimentary and experimental implementation.
 */
private ObjectFilter processRoleRelationFilter(MidPointPrincipal principal, Authorization autz,
		RoleRelationObjectSpecificationType specRoleRelation, QueryItemsSpec queryItemsSpec, ObjectFilter origFilter) {
	ObjectFilter refRoleFilter = null;
	if (BooleanUtils.isTrue(specRoleRelation.isIncludeReferenceRole())) {
		// This could mean that we will need to add filters for all roles in 
		// subject's roleMembershipRef. There may be thousands of these.
		if (!autz.maySkipOnSearch()) {
			throw new UnsupportedOperationException("Inefficient roleRelation search (includeReferenceRole=true) is not supported yet");
		}
	}
	
	ObjectFilter membersFilter = null;
	if (!BooleanUtils.isFalse(specRoleRelation.isIncludeMembers())) {
		List<PrismReferenceValue> queryRoleRefs = getRoleOidsFromFilter(origFilter);
		if (queryRoleRefs == null || queryRoleRefs.isEmpty()) {
			// Cannot find specific role OID in original query. This could mean that we
			// will need to add filters for all roles in subject's roleMembershipRef.
			// There may be thousands of these.
			if (!autz.maySkipOnSearch()) {
				throw new UnsupportedOperationException("Inefficient roleRelation search (includeMembers=true without role in the original query) is not supported yet");
			}
		} else {
			QName subjectRelation = specRoleRelation.getSubjectRelation();
			boolean isRoleOidOk = false;
			for (ObjectReferenceType subjectRoleMembershipRef: principal.getUser().getRoleMembershipRef()) {
				if (!MiscSchemaUtil.compareRelation(subjectRelation, subjectRoleMembershipRef.getRelation())) {
					continue;
				}
				if (!PrismReferenceValue.containsOid(queryRoleRefs, subjectRoleMembershipRef.getOid())) {
					continue;
				}
				isRoleOidOk = true;
				break;
			}
			if (isRoleOidOk) {
				// There is already a good filter in the origFilter
				// TODO: mind the objectRelation
				membersFilter = AllFilter.createAll();
			} else {
				membersFilter = NoneFilter.createNone();
			}
		}
	}
	
	return ObjectQueryUtil.filterOr(refRoleFilter, membersFilter);
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:50,代码来源:SecurityEnforcerImpl.java

示例8: requiresExplicitReferentialIntegrity

import org.apache.commons.lang.BooleanUtils; //导入方法依赖的package包/类
public boolean requiresExplicitReferentialIntegrity() {
	return !BooleanUtils.isFalse(getResourceObjectAssociationType().isExplicitReferentialIntegrity());	// because default is TRUE
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:4,代码来源:RefinedAssociationDefinition.java

示例9: isListen

import org.apache.commons.lang.BooleanUtils; //导入方法依赖的package包/类
public static boolean isListen() {
    return BooleanUtils.isFalse(validationAlert);
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:4,代码来源:ValidationAlertHolder.java

示例10: loadAppFolders

import org.apache.commons.lang.BooleanUtils; //导入方法依赖的package包/类
@Override
public List<AppFolder> loadAppFolders() {
    log.debug("Loading AppFolders");

    StopWatch stopWatch = new Slf4JStopWatch("AppFolders");
    stopWatch.start();

    List<AppFolder> resultList;
    try (Transaction tx = persistence.createTransaction()) {
        String metaClassName = metadata.getExtendedEntities().getEffectiveMetaClass(AppFolder.class).getName();
        TypedQuery<AppFolder> q = persistence.getEntityManager().createQuery(
                "select f from " + metaClassName + " f order by f.sortOrder, f.name", AppFolder.class);

        resultList = q.getResultList();
        // fetch parent folder
        resultList.forEach(Folder::getParent);

        tx.commit();
    } finally {
        stopWatch.stop();
    }

    if (CollectionUtils.isNotEmpty(resultList)) {
        Binding binding = new Binding();
        binding.setVariable("persistence", persistence);
        binding.setVariable("metadata", metadata);
        binding.setVariable("userSession", userSessionSource.getUserSession());

        Iterator<AppFolder> iterator = resultList.iterator();
        while (iterator.hasNext()) {
            AppFolder folder = iterator.next();
            try (Transaction tx = persistence.createTransaction()) {
                boolean evaluatedVisibilityScript = true;
                try {
                    if (!StringUtils.isBlank(folder.getVisibilityScript())) {
                        binding.setVariable("folder", folder);
                        Boolean visible = runScript(folder.getVisibilityScript(), binding);
                        if (BooleanUtils.isFalse(visible)) {
                            iterator.remove();
                            continue;
                        }
                    }
                } catch (Exception e) {
                    log.warn("Unable to evaluate AppFolder visibility script for folder: id: {}  name: {}",
                            folder.getId(), folder.getName(), e);
                    // because EclipseLink Query marks transaction as rollback-only on JPQL syntax errors
                    evaluatedVisibilityScript = false;
                }

                boolean evaluatedQuantityScript = loadFolderQuantity(binding, folder);

                if (evaluatedVisibilityScript && evaluatedQuantityScript) {
                    tx.commit();
                }
            }
        }
    }

    return resultList;
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:61,代码来源:FoldersServiceBean.java


注:本文中的org.apache.commons.lang.BooleanUtils.isFalse方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。