* active.
*/
contextIdItr = contextIds.iterator();
while (contextIdItr.hasNext()) {
String contextId = (String) contextIdItr.next();
Context context = contextManager.getContext(contextId);
try {
String parentId = context.getParentId();
while (parentId != null) {
if (IContextIds.CONTEXT_ID_DIALOG.equals(parentId)) {
if (!dialog) {
contextIdItr.remove();
}
break;
}
if (IContextIds.CONTEXT_ID_WINDOW.equals(parentId)) {
if (!window) {
contextIdItr.remove();
}
break;
}
if (IContextIds.CONTEXT_ID_DIALOG_AND_WINDOW
.equals(parentId)) {
if ((!window) && (!dialog)) {
contextIdItr.remove();
}
break;
}
context = contextManager.getContext(parentId);
parentId = context.getParentId();
}
} catch (NotDefinedException e) {
// since this context was part of an undefined hierarchy,
// I'm going to yank it out as a bad bet
contextIdItr.remove();
// This is a logging optimization, only log the error once.
if (context == null || !bindingErrors.contains(context.getId())) {
if (context != null) {
bindingErrors.add(context.getId());
}
// now log like you've never logged before!
Policy
.getLog()