private void parseAndAddEndState(EndStateModel state, Flow flow) { MutableAttributeMap<Object> attributes = parseMetaAttributes(state.getAttributes()); if (StringUtils.hasText(state.getCommit())) { attributes.put("commit", fromStringTo(Boolean.class).execute(state.getCommit())); } parseAndPutSecured(state.getSecured(), attributes); Action finalResponseAction; ViewFactory viewFactory = parseViewFactory(state.getView(), state.getId(), true, null); if (viewFactory != null) { finalResponseAction = new ViewFactoryActionAdapter(viewFactory); } else { finalResponseAction = null; } getLocalContext().getFlowArtifactFactory().createEndState(state.getId(), flow, parseActions(state.getOnEntryActions()), finalResponseAction, parseFlowOutputMapper(state.getOutputs()), parseExceptionHandlers(state.getExceptionHandlers(), null), attributes); }
/** * Adds an end state to the flow built by this builder. * @param stateId the state identifier * @return the fully constructed end state instance */ protected State addEndState(String stateId) { return getFlowArtifactFactory().createEndState(stateId, getFlow(), null, null, null, null, null); }
/** * Adds an end state to the flow built by this builder. * @param stateId the state identifier * @param entryActions the actions to execute when the state is entered * @param viewSelector the view selector that will make the view selection when the state is entered * @param outputMapper the output mapper to map output attributes for the end state (a flow outcome) * @param exceptionHandlers any exception handlers to attach to the state * @param attributes attributes to assign to the state that may be used to affect state construction and execution * @return the fully constructed end state instance */ protected State addEndState(String stateId, Action[] entryActions, ViewSelector viewSelector, AttributeMapper outputMapper, FlowExecutionExceptionHandler[] exceptionHandlers, AttributeMap attributes) { return getFlowArtifactFactory().createEndState(stateId, getFlow(), entryActions, viewSelector, outputMapper, exceptionHandlers, attributes); }
/** * Adds an end state to the flow built by this builder. * @param stateId the state identifier * @param viewName the string-encoded view selector * @return the fully constructed end state instance */ protected State addEndState(String stateId, String viewName) { return getFlowArtifactFactory().createEndState(stateId, getFlow(), null, viewSelector(viewName), null, null, null); }
/** * Adds an end state to the flow built by this builder. * @param stateId the state identifier * @param viewName the string-encoded view selector * @param outputMapper the output mapper to map output attributes for the end state (a flow outcome) * @return the fully constructed end state instance */ protected State addEndState(String stateId, String viewName, AttributeMapper outputMapper) { return getFlowArtifactFactory().createEndState(stateId, getFlow(), null, viewSelector(viewName), outputMapper, null, null); }
private void parseAndAddEndState(Element element, Flow flow) { getFlowArtifactFactory().createEndState(parseId(element), flow, parseEntryActions(element), parseViewSelector(element), parseOutputMapper(element), parseExceptionHandlers(element), parseAttributes(element)); }
private void parseAndAddEndState(EndStateModel state, Flow flow) { MutableAttributeMap<Object> attributes = parseMetaAttributes(state.getAttributes()); if (StringUtils.hasText(state.getCommit())) { attributes.put("commit", fromStringTo(Boolean.class).execute(state.getCommit())); } parseAndPutSecured(state.getSecured(), attributes); Action finalResponseAction; ViewFactory viewFactory = parseViewFactory(state.getView(), state.getId(), true, null); if (viewFactory != null) { finalResponseAction = new ViewFactoryActionAdapter(viewFactory); } else { finalResponseAction = null; } getLocalContext().getFlowArtifactFactory().createEndState(state.getId(), flow, parseActions(state.getOnEntryActions()), finalResponseAction, parseFlowOutputMapper(state.getOutputs()), parseExceptionHandlers(state.getExceptionHandlers(), null), attributes); }
private void parseAndAddEndState(EndStateModel state, Flow flow) { MutableAttributeMap attributes = parseMetaAttributes(state.getAttributes()); if (StringUtils.hasText(state.getCommit())) { attributes.put("commit", fromStringTo(Boolean.class).execute(state.getCommit())); } parseAndPutSecured(state.getSecured(), attributes); Action finalResponseAction; ViewFactory viewFactory = parseViewFactory(state.getView(), state.getId(), true, null); if (viewFactory != null) { finalResponseAction = new ViewFactoryActionAdapter(viewFactory); } else { finalResponseAction = null; } getLocalContext().getFlowArtifactFactory().createEndState(state.getId(), flow, parseActions(state.getOnEntryActions()), finalResponseAction, parseFlowOutputMapper(state.getOutputs()), parseExceptionHandlers(state.getExceptionHandlers(), null), attributes); }