本文整理了Java中org.springframework.webflow.engine.Flow.getStartActionList()
方法的一些代码示例,展示了Flow.getStartActionList()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Flow.getStartActionList()
方法的具体详情如下:
包路径:org.springframework.webflow.engine.Flow
类名称:Flow
方法名:getStartActionList
[英]Returns the list of actions executed by this flow when an execution of the flow starts. The returned list is mutable.
[中]返回流开始执行时此流执行的操作列表。返回的列表是可变的。
代码示例来源:origin: org.springframework.webflow/spring-webflow
/**
* Builds any start actions to execute when the flow starts.
* @throws FlowBuilderException an exception occurred building the flow
*/
public void buildStartActions() throws FlowBuilderException {
getFlow().getStartActionList().addAll(parseActions(flowModel.getOnStartActions()));
}
代码示例来源:origin: org.apereo.cas/cas-server-core-webflow-api
/**
* Create initial flow actions.
*
* @param flow the flow
*/
protected void createInitialFlowActions(final Flow flow) {
flow.getStartActionList().add(createEvaluateAction(CasWebflowConstants.ACTION_ID_INIT_FLOW_SETUP));
}
代码示例来源:origin: org.springframework/spring-webflow
private void parseAndAddStartActions(Element element, Flow flow) {
Element startElement = getChildElementByTagName(element, START_ACTIONS_ELEMENT);
if (startElement != null) {
flow.getStartActionList().addAll(parseAnnotatedActions(startElement));
}
}
代码示例来源:origin: spring-projects/spring-webflow
/**
* Builds any start actions to execute when the flow starts.
* @throws FlowBuilderException an exception occurred building the flow
*/
public void buildStartActions() throws FlowBuilderException {
getFlow().getStartActionList().addAll(parseActions(flowModel.getOnStartActions()));
}
代码示例来源:origin: org.springframework.webflow/org.springframework.webflow
/**
* Builds any start actions to execute when the flow starts.
* @throws FlowBuilderException an exception occurred building the flow
*/
public void buildStartActions() throws FlowBuilderException {
getFlow().getStartActionList().addAll(parseActions(flowModel.getOnStartActions()));
}
代码示例来源:origin: spring-projects/spring-webflow
public void testAddActions() {
flow.getStartActionList().add(new TestMultiAction());
flow.getStartActionList().add(new TestMultiAction());
flow.getEndActionList().add(new TestMultiAction());
assertEquals(2, flow.getStartActionList().size());
assertEquals(1, flow.getEndActionList().size());
}
代码示例来源:origin: org.apereo.cas/cas-server-core-webflow-mfa-api
val mfaFlow = (Flow) mfaProviderFlowRegistry.getFlowDefinition(subflowId);
mfaFlow.getStartActionList().add(createSetAction("flowScope.".concat(CasWebflowConstants.VAR_ID_MFA_PROVIDER_ID), StringUtils.quote(providerId)));
代码示例来源:origin: spring-projects/spring-webflow
public void testStartWithAction() {
MockRequestControlContext context = new MockRequestControlContext(flow);
TestAction action = new TestAction();
flow.getStartActionList().add(action);
flow.start(context, new LocalAttributeMap<>());
assertEquals("Wrong start state", "myState1", context.getCurrentState().getId());
assertEquals(1, action.getExecutionCount());
}
代码示例来源:origin: spring-projects/spring-webflow
public void testSetActionWithResultType() throws Exception {
SetModel setModel = new SetModel("flowScope.stringArray", "intArray");
setModel.setType("java.lang.String[]");
model.setOnStartActions(asList(setModel));
model.setStates(asList(new ViewStateModel("view")));
Flow flow = getFlow(model);
AnnotatedAction action = (AnnotatedAction) flow.getStartActionList().get(0);
MockRequestContext context = new MockRequestContext(flow);
context.getFlowScope().put("intArray", new int[] { 1, 2 });
action.execute(context);
String[] expected = (String[]) context.getFlowScope().get("stringArray");
assertEquals("1", expected[0]);
assertEquals("2", expected[1]);
}
代码示例来源:origin: spring-projects/spring-webflow
public void testEvaluateActionWithELExpression() throws Exception {
EvaluateModel evaluateModel = new EvaluateModel("testBean.getIntegers()");
evaluateModel.setResult("flowScope.stringArray");
evaluateModel.setResultType("java.lang.String[]");
model.setOnStartActions(asList(evaluateModel));
model.setStates(asList(new ViewStateModel("view")));
Flow flow = getFlow(model);
AnnotatedAction action = (AnnotatedAction) flow.getStartActionList().get(0);
MockRequestContext context = new MockRequestContext(flow);
context.getFlowScope().put("testBean", new TestBean());
action.execute(context);
String[] expected = (String[]) context.getFlowScope().get("stringArray");
assertEquals("1", expected[0]);
assertEquals("2", expected[1]);
}
代码示例来源:origin: spring-projects/spring-webflow
public void testSetActionWithImplicitTypeConversion() throws Exception {
SetModel setModel = new SetModel("testBean.stringArray", "intArray");
model.setOnStartActions(asList(setModel));
ViewStateModel state = new ViewStateModel("view");
model.setStates(asList(state));
Flow flow = getFlow(model);
AnnotatedAction action = (AnnotatedAction) flow.getStartActionList().get(0);
MockRequestContext context = new MockRequestContext(flow);
context.getFlowScope().put("testBean", new TestBean());
context.getFlowScope().put("intArray", new int[] { 1, 2 });
action.execute(context);
TestBean expected = (TestBean) context.getFlowScope().get("testBean");
assertEquals("1", expected.stringArray[0]);
assertEquals("2", expected.stringArray[1]);
}
代码示例来源:origin: spring-projects/spring-webflow
public void testEvaluateActionWithResultType() throws Exception {
EvaluateModel evaluateModel = new EvaluateModel("testBean.getIntegers()");
evaluateModel.setResult("flowScope.stringArray");
evaluateModel.setResultType("java.lang.String[]");
model.setOnStartActions(asList(evaluateModel));
model.setStates(asList(new ViewStateModel("view")));
Flow flow = getFlow(model);
AnnotatedAction action = (AnnotatedAction) flow.getStartActionList().get(0);
MockRequestContext context = new MockRequestContext(flow);
context.getFlowScope().put("testBean", new TestBean());
action.execute(context);
String[] expected = (String[]) context.getFlowScope().get("stringArray");
assertEquals("1", expected[0]);
assertEquals("2", expected[1]);
}
内容来源于网络,如有侵权,请联系作者删除!