public Model createCopy() { return new ExceptionHandlerModel(bean); }
private ExceptionHandlerModel parseExceptionHandler(Element element) { return new ExceptionHandlerModel(element.getAttribute("bean")); }
public Model createCopy() { return new ExceptionHandlerModel(bean); }
private ExceptionHandlerModel parseExceptionHandler(Element element) { return new ExceptionHandlerModel(element.getAttribute("bean")); }
private ExceptionHandlerModel parseExceptionHandler(Element element) { return new ExceptionHandlerModel(element.getAttribute("bean")); }
public void testMergeExceptionHandlers() { FlowModel child = new FlowModel(); child.setExceptionHandlers(asList(new ExceptionHandlerModel("bean1"), new ExceptionHandlerModel("bean2"))); FlowModel parent = new FlowModel(); parent.setExceptionHandlers(asList(new ExceptionHandlerModel("bean2"), new ExceptionHandlerModel("bean3"))); child.merge(parent); assertEquals(4, child.getExceptionHandlers().size()); }
public void testNotMergeable() { ExceptionHandlerModel child = new ExceptionHandlerModel("child"); assertFalse(child.isMergeableWith(child)); }
eh.add(new ExceptionHandlerModel("foo")); parent.setExceptionHandlers(eh);
public void testExceptionHandlers() { FlowModel model = new FlowModel(); model.setStates(asList(new EndStateModel("state"))); model.setExceptionHandlers(asList(new ExceptionHandlerModel("exceptionHandler"))); FlowExecutionExceptionHandler handler = new FlowExecutionExceptionHandler() { public boolean canHandle(FlowExecutionException exception) { return true; } public void handle(FlowExecutionException exception, RequestControlContext context) { } }; FlowModelFlowBuilder builder = new FlowModelFlowBuilder(new StaticFlowModelHolder(model)); MockFlowBuilderContext context = new MockFlowBuilderContext("foo"); context.registerBean("exceptionHandler", handler); FlowAssembler assembler = new FlowAssembler(builder, context); Flow flow = assembler.assembleFlow(); assertEquals(1, flow.getExceptionHandlerSet().size()); }