if(root.getState() == State.DELETED)
if (root.getState() == State.DELETED)
private List<ConfiguredObject<?>> getChildrenInState(final ConfiguredObject<?> configuredObject, final State state, final DescendantScope descendantScope) { List<ConfiguredObject<?>> foundChildren = new ArrayList<>(); Class<? extends ConfiguredObject> categoryClass = configuredObject.getCategoryClass(); for (final Class<? extends ConfiguredObject> childClass : getModel().getChildTypes(categoryClass)) { final Collection<? extends ConfiguredObject> children = configuredObject.getChildren(childClass); for (final ConfiguredObject<?> child : children) { if (child.getState() == state) { foundChildren.add(child); } if (descendantScope == DescendantScope.ALL) { foundChildren.addAll(getChildrenInState(child, state, descendantScope)); } } } return foundChildren; }
@Override public void performAction(final ConfiguredObject<?> child) { if (child.getState() != State.ERRORED) { try { if(child instanceof AbstractConfiguredObject) { AbstractConfiguredObject configuredObject = (AbstractConfiguredObject) child; configuredObject.doValidation(false, exceptionHandler); } else if(child instanceof AbstractConfiguredObjectProxy) { AbstractConfiguredObjectProxy configuredObject = (AbstractConfiguredObjectProxy) child; configuredObject.doValidation(false, exceptionHandler); } } catch (RuntimeException e) { exceptionHandler.handleException(e, child); } } } });
@Override public void performAction(final ConfiguredObject<?> child) { if (child.getState() != State.ERRORED) { try { if(child instanceof AbstractConfiguredObject) { AbstractConfiguredObject configuredObject = (AbstractConfiguredObject) child; configuredObject.doOpening(false, exceptionHandler); } else if(child instanceof AbstractConfiguredObjectProxy) { AbstractConfiguredObjectProxy configuredObject = (AbstractConfiguredObjectProxy) child; configuredObject.doOpening(false, exceptionHandler); } } catch (RuntimeException e) { exceptionHandler.handleException(e, child); } } } });
if (source.getState() != State.DELETED)