本文整理匯總了Java中org.apache.commons.lang.BooleanUtils.isNotTrue方法的典型用法代碼示例。如果您正苦於以下問題:Java BooleanUtils.isNotTrue方法的具體用法?Java BooleanUtils.isNotTrue怎麽用?Java BooleanUtils.isNotTrue使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.apache.commons.lang.BooleanUtils
的用法示例。
在下文中一共展示了BooleanUtils.isNotTrue方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: extractWorkItemResult
import org.apache.commons.lang.BooleanUtils; //導入方法依賴的package包/類
@Override
public WorkItemResultType extractWorkItemResult(Map<String, Object> variables) {
Boolean wasCompleted = ActivitiUtil.getVariable(variables, VARIABLE_WORK_ITEM_WAS_COMPLETED, Boolean.class, prismContext);
if (BooleanUtils.isNotTrue(wasCompleted)) {
return null;
}
WorkItemResultType result = new WorkItemResultType(prismContext);
result.setOutcome(ActivitiUtil.getVariable(variables, FORM_FIELD_OUTCOME, String.class, prismContext));
result.setComment(ActivitiUtil.getVariable(variables, FORM_FIELD_COMMENT, String.class, prismContext));
String additionalDeltaString = ActivitiUtil.getVariable(variables, FORM_FIELD_ADDITIONAL_DELTA, String.class, prismContext);
boolean isApproved = ApprovalUtils.isApproved(result);
if (isApproved && StringUtils.isNotEmpty(additionalDeltaString)) {
try {
ObjectDeltaType additionalDelta = prismContext.parserFor(additionalDeltaString).parseRealValue(ObjectDeltaType.class);
ObjectTreeDeltasType treeDeltas = new ObjectTreeDeltasType();
treeDeltas.setFocusPrimaryDelta(additionalDelta);
result.setAdditionalDeltas(treeDeltas);
} catch (SchemaException e) {
LoggingUtils.logUnexpectedException(LOGGER, "Couldn't parse delta received from the activiti form:\n{}", e, additionalDeltaString);
throw new SystemException("Couldn't parse delta received from the activiti form: " + e.getMessage(), e);
}
}
return result;
}
示例2: getAllAttributes
import org.apache.commons.lang.BooleanUtils; //導入方法依賴的package包/類
protected Set<String> getAllAttributes(Entity entity) {
if (entity == null) {
return null;
}
Set<String> attributes = new HashSet<>();
MetaClass metaClass = metadata.getClassNN(entity.getClass());
for (MetaProperty metaProperty : metaClass.getProperties()) {
Range range = metaProperty.getRange();
if (range.isClass() && range.getCardinality().isMany()) {
continue;
}
attributes.add(metaProperty.getName());
}
Collection<CategoryAttribute> categoryAttributes = dynamicAttributes.getAttributesForMetaClass(metaClass);
if (categoryAttributes != null) {
for (CategoryAttribute categoryAttribute : categoryAttributes) {
if (BooleanUtils.isNotTrue(categoryAttribute.getIsCollection())) {
attributes.add(
DynamicAttributesUtils.getMetaPropertyPath(metaClass, categoryAttribute).getMetaProperty().getName());
}
}
}
return attributes;
}
示例3: getStandardStatsList
import org.apache.commons.lang.BooleanUtils; //導入方法依賴的package包/類
@Override
public Map<Integer, Map<String, List<InstanceCommandStats>>> getStandardStatsList(Long appId, long beginTime,
long endTime, List<String> commands) {
if (appId == null) {
return Collections.emptyMap();
}
List<InstanceInfo> list = instanceDao.getInstListByAppId(appId);
if (list == null || list.isEmpty()) {
return Collections.emptyMap();
}
Map<Integer, Map<String, List<InstanceCommandStats>>> resultMap = new LinkedHashMap<Integer, Map<String, List<InstanceCommandStats>>>();
for (InstanceInfo instance : list) {
if (instance.isOffline()) {
continue;
}
int instanceId = instance.getId();
String ip = instance.getIp();
int port = instance.getPort();
int type = instance.getType();
Boolean isMaster = redisCenter.isMaster(appId, ip, port);
if (BooleanUtils.isNotTrue(isMaster)){
continue;
}
List<Map<String, Object>> objectList = this.queryDiffMapList(beginTime, endTime, ip, port, ConstUtils.REDIS);;
if (objectList != null) {
Map<String, List<InstanceCommandStats>> commandMap = new LinkedHashMap<String, List<InstanceCommandStats>>();
for (String commandName : commands) {
List<InstanceCommandStats> resultList = new ArrayList<InstanceCommandStats>(objectList.size());
for (Map<String, Object> map : objectList) {
InstanceCommandStats stats = parseCommand(instanceId, commandName, map, false, type);
if (stats != null) {
resultList.add(stats);
}
}
commandMap.put(commandName, resultList);
}
resultMap.put(instanceId, commandMap);
}
}
return resultMap;
}