use of com.dexels.navajo.document.ExpressionChangedException in project navajo by Dexels.
the class DefaultExpressionEvaluator method processRefreshQueue.
// private boolean dependsOn(Property expressionProperty, Property target) {
//
// }
//
private final List<Property> processRefreshQueue(List<Property> queue) throws NavajoException {
Object o = null;
Object p = null;
List<Property> refreshQueue = null;
for (int i = 0; i < queue.size(); i++) {
Property current = queue.get(i);
o = current.peekEvaluatedValue();
try {
try {
current.refreshExpression();
} catch (ExpressionChangedException e) {
}
} catch (NavajoException e) {
logger.info("Expression failed: " + current.getValue());
} catch (Throwable e) {
logger.info("Expression changed");
}
p = current.peekEvaluatedValue();
if (o == null && p == null) {
continue;
}
if (o == null || p == null) {
if (refreshQueue == null) {
refreshQueue = new ArrayList<Property>();
}
refreshQueue.add(current);
continue;
}
// } else {
if (refreshQueue == null) {
refreshQueue = new ArrayList<Property>();
}
refreshQueue.add(current);
// }
}
if (refreshQueue == null) {
refreshQueue = new ArrayList<Property>();
}
return refreshQueue;
}
Aggregations