本文整理了Java中org.springframework.webflow.engine.Flow.getGlobalTransitionSet()
方法的一些代码示例,展示了Flow.getGlobalTransitionSet()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Flow.getGlobalTransitionSet()
方法的具体详情如下:
包路径:org.springframework.webflow.engine.Flow
类名称:Flow
方法名:getGlobalTransitionSet
[英]Returns the set of transitions eligible for execution by this flow if no state-level transition is matched. The returned set is mutable.
[中]如果没有匹配的状态级转换,则返回符合此流执行条件的转换集。返回的集合是可变的。
代码示例来源:origin: org.springframework.webflow/spring-webflow
/**
* Builds any transitions shared by all states of the flow.
* @throws FlowBuilderException an exception occurred building the flow
*/
public void buildGlobalTransitions() throws FlowBuilderException {
getFlow().getGlobalTransitionSet().addAll(parseTransitions(flowModel.getGlobalTransitions()));
}
代码示例来源:origin: org.springframework/spring-webflow
private void parseAndAddGlobalTransitions(Element element, Flow flow) {
Element globalTransitionsElement = getChildElementByTagName(element, GLOBAL_TRANSITIONS_ELEMENT);
if (globalTransitionsElement != null) {
flow.getGlobalTransitionSet().addAll(parseTransitions(globalTransitionsElement));
}
}
代码示例来源:origin: spring-projects/spring-webflow
/**
* Builds any transitions shared by all states of the flow.
* @throws FlowBuilderException an exception occurred building the flow
*/
public void buildGlobalTransitions() throws FlowBuilderException {
getFlow().getGlobalTransitionSet().addAll(parseTransitions(flowModel.getGlobalTransitions()));
}
代码示例来源:origin: org.springframework.webflow/org.springframework.webflow
/**
* Builds any transitions shared by all states of the flow.
* @throws FlowBuilderException an exception occurred building the flow
*/
public void buildGlobalTransitions() throws FlowBuilderException {
getFlow().getGlobalTransitionSet().addAll(parseTransitions(flowModel.getGlobalTransitions()));
}
代码示例来源:origin: org.apereo.cas/cas-server-support-reports
acts = StreamSupport.stream(def.getGlobalTransitionSet().spliterator(), false)
.map(tr -> tr.getId() + " -> " + tr.getTargetStateId() + " @ " + tr.getExecutionCriteria().toString())
.collect(Collectors.toList());
代码示例来源:origin: spring-projects/spring-webflow
public void testAddGlobalTransition() {
Transition t = new Transition(to("myState2"));
flow.getGlobalTransitionSet().add(t);
assertSame(t, flow.getGlobalTransitionSet().toArray()[1]);
}
代码示例来源:origin: spring-projects/spring-webflow
public void testFlowSecuredTransition() {
model.setStates(asList(new EndStateModel("end")));
TransitionModel transition = new TransitionModel();
transition.setTo("end");
transition.setSecured(new SecuredModel("ROLE_USER"));
model.setGlobalTransitions(asList(transition));
Flow flow = getFlow(model);
SecurityRule rule = (SecurityRule) flow.getGlobalTransitionSet().toArray()[0].getAttributes().get(
SecurityRule.SECURITY_ATTRIBUTE_NAME);
assertNotNull(rule);
assertEquals(SecurityRule.COMPARISON_ANY, rule.getComparisonType());
assertEquals(1, rule.getAttributes().size());
assertTrue(rule.getAttributes().contains("ROLE_USER"));
}
代码示例来源:origin: spring-projects/spring-webflow
private Flow createSimpleFlow() {
flow = new Flow("myFlow");
ViewState state1 = new ViewState(flow, "myState1", new StubViewFactory());
state1.getTransitionSet().add(new Transition(on("submit"), to("myState2")));
new EndState(flow, "myState2");
flow.getGlobalTransitionSet().add(new Transition(on("globalEvent"), to("myState2")));
return flow;
}
内容来源于网络,如有侵权,请联系作者删除!