本文整理了Java中org.springframework.webflow.engine.Flow.getTransitionableState()
方法的一些代码示例,展示了Flow.getTransitionableState()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Flow.getTransitionableState()
方法的具体详情如下:
包路径:org.springframework.webflow.engine.Flow
类名称:Flow
方法名:getTransitionableState
[英]Return the TransitionableState
with given stateId
.
[中]返回带有给定stateId
的TransitionableState
。
代码示例来源:origin: org.apereo.cas/cas-server-core-webflow-api
/**
* Gets transitionable state.
*
* @param flow the flow
* @param stateId the state id
* @return the transitionable state
*/
public TransitionableState getTransitionableState(final Flow flow, final String stateId) {
if (containsFlowState(flow, stateId)) {
return (TransitionableState) flow.getTransitionableState(stateId);
}
return null;
}
代码示例来源:origin: org.apereo.cas/cas-server-core-webflow-api
/**
* Gets transitionable state.
*
* @param <T> the type parameter
* @param flow the flow
* @param stateId the state id
* @param clazz the clazz
* @return the transitionable state
*/
public <T extends TransitionableState> T getTransitionableState(final Flow flow, final String stateId, final Class<T> clazz) {
if (containsFlowState(flow, stateId)) {
val state = flow.getTransitionableState(stateId);
return clazz.cast(state);
}
return null;
}
代码示例来源:origin: spring-projects/spring-webflow
public void testGetStateNoSuchTransitionableState() {
try {
flow.getTransitionableState("myState2");
fail("End states aren't transtionable");
} catch (ClassCastException e) {
// expected
}
try {
flow.getTransitionableState("doesNotExist");
} catch (IllegalArgumentException e) {
// expected
}
}
代码示例来源:origin: spring-projects/spring-webflow
public void testGetTransitionableState() {
assertEquals("Wrong state:", "myState1", flow.getTransitionableState("myState1").getId());
assertEquals("Wrong state:", "myState1", flow.getState("myState1").getId());
}
代码示例来源:origin: org.apereo.cas/cas-server-core-webflow-mfa-api
val startState = flow.getTransitionableState(flow.getStartState().getId());
createTransitionForState(startState, subflowId, subflowId);
});
内容来源于网络,如有侵权,请联系作者删除!