本文整理了Java中org.springframework.webflow.engine.Flow.getStartState()
方法的一些代码示例,展示了Flow.getStartState()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Flow.getStartState()
方法的具体详情如下:
包路径:org.springframework.webflow.engine.Flow
类名称:Flow
方法名:getStartState
暂无
代码示例来源:origin: org.springframework.webflow/spring-webflow
/**
* Returns a flag indicating if this state is the start state of its owning flow.
* @return true if the flow is the start state, false otherwise
*/
public boolean isStartState() {
return flow.getStartState() == this;
}
代码示例来源:origin: spring-projects/spring-webflow
/**
* Returns a flag indicating if this state is the start state of its owning flow.
* @return true if the flow is the start state, false otherwise
*/
public boolean isStartState() {
return flow.getStartState() == this;
}
代码示例来源:origin: org.springframework.webflow/org.springframework.webflow
/**
* Returns a flag indicating if this state is the start state of its owning flow.
* @return true if the flow is the start state, false otherwise
*/
public boolean isStartState() {
return flow.getStartState() == this;
}
代码示例来源:origin: org.apereo.cas/cas-server-core-webflow-api
@Override
public TransitionableState getStartState(final Flow flow) {
return (TransitionableState) flow.getStartState();
}
代码示例来源:origin: org.springframework/spring-webflow
/**
* Returns a flag indicating if this state is the start state of its owning flow.
* @return true if the flow is the start state, false otherwise
*/
public boolean isStartState() {
return flow.getStartState() == this;
}
代码示例来源:origin: org.jasig.cas/cas-server-core-webflow
/**
* Gets start state.
*
* @param flow the flow
* @return the start state
*/
protected TransitionableState getStartState(final Flow flow) {
final TransitionableState currentStartState = TransitionableState.class.cast(flow.getStartState());
return currentStartState;
}
代码示例来源:origin: spring-projects/spring-webflow
public void testGetStateNoStartState() {
Flow flow = new Flow("myFlow");
try {
flow.getStartState();
fail("Retrieved start state when no such state");
} catch (IllegalStateException e) {
// expected
}
}
代码示例来源:origin: org.apereo.cas/cas-server-support-reports
val flowDetails = new LinkedHashMap<String, Object>();
val def = Flow.class.cast(v.getFlowDefinition(id));
flowDetails.put("startState", def.getStartState().getId());
代码示例来源:origin: net.unicon/cas-mfa-java
addTransitionToActionState(actionState, flowId, flowId);
final TransitionableState currentStartState = TransitionableState.class.cast(flow.getStartState());
LOGGER.debug("Replaced flow {} start state with {}", flow.getId(), flow.getStartState().getId());
} catch (final Exception e) {
LOGGER.error(e.getMessage(), e);
代码示例来源:origin: org.springframework/spring-webflow
public ViewSelection start(Flow flow, MutableAttributeMap input) throws FlowExecutionException {
if (input == null) {
// create a mutable map so entries can be added by listeners!
input = new LocalAttributeMap();
}
if (logger.isDebugEnabled()) {
logger.debug("Activating new session for flow '" + flow.getId() + "' in state '"
+ flow.getStartState().getId() + "' with input " + input);
}
getExecutionListeners().fireSessionStarting(this, flow, input);
FlowSession session = flowExecution.activateSession(flow);
getExecutionListeners().fireSessionCreated(this, session);
ViewSelection selectedView = flow.start(this, input);
getExecutionListeners().fireSessionStarted(this, session);
return selectedView;
}
代码示例来源:origin: spring-projects/spring-webflow
public void testResourceBackedFlowBuilder() {
ClassPathResource resource = new ClassPathResource("flow-endstate.xml", XmlFlowModelBuilderTests.class);
Flow flow = getFlow(resource);
assertEquals("flow", flow.getId());
assertEquals("end", flow.getStartState().getId());
}
代码示例来源:origin: org.apereo.cas/cas-server-core-webflow-mfa-api
val initStartState = (ActionState) mfaFlow.getStartState();
val transition = (Transition) initStartState.getTransition(CasWebflowConstants.TRANSITION_ID_SUCCESS);
val targetStateId = transition.getTargetStateId();
val startState = flow.getTransitionableState(flow.getStartState().getId());
createTransitionForState(startState, subflowId, subflowId);
});
代码示例来源:origin: spring-projects/spring-webflow
public void testHandleExceptionNoMatch() {
MockRequestControlContext context = new MockRequestControlContext(flow);
FlowExecutionException e = new FlowExecutionException(flow.getId(), flow.getStartState().getId(), "Oops!",
new TestException());
try {
flow.handleException(e, context);
} catch (FlowExecutionException ex) {
// expected
}
}
代码示例来源:origin: spring-projects/spring-webflow
public void testBuildFlowWithEndState() {
model.setStates(asList(new EndStateModel("end")));
Flow flow = getFlow(model);
assertEquals("flow", flow.getId());
assertEquals("end", flow.getStartState().getId());
}
代码示例来源:origin: spring-projects/spring-webflow
public void testBuildFlowWithDefaultStartState() {
model.setStates(asList(new EndStateModel("end")));
Flow flow = getFlow(model);
assertEquals("flow", flow.getId());
assertEquals("end", flow.getStartState().getId());
}
代码示例来源:origin: spring-projects/spring-webflow
public void testBuildFlowWithStartStateAttribute() {
model.setStartStateId("end");
model.setStates(asList(new EndStateModel("foo"), new EndStateModel("end")));
Flow flow = getFlow(model);
assertEquals("flow", flow.getId());
assertEquals("end", flow.getStartState().getId());
}
代码示例来源:origin: spring-projects/spring-webflow
public void testHandleException() {
flow.getExceptionHandlerSet().add(
new TransitionExecutingFlowExecutionExceptionHandler().add(TestException.class, "myState2"));
MockRequestControlContext context = new MockRequestControlContext(flow);
context.setCurrentState(flow.getStateInstance("myState1"));
FlowExecutionException e = new FlowExecutionException(flow.getId(), flow.getStartState().getId(), "Oops!",
new TestException());
flow.handleException(e, context);
assertFalse(context.getFlowExecutionContext().isActive());
}
代码示例来源:origin: spring-projects/spring-webflow
public void testAddStates() {
Flow flow = new Flow("myFlow");
new EndState(flow, "myState1");
new EndState(flow, "myState2");
assertEquals("Wrong start state:", "myState1", flow.getStartState().getId());
assertEquals("State count wrong:", 2, flow.getStateCount());
assertTrue(flow.containsState("myState1"));
assertTrue(flow.containsState("myState2"));
State state = flow.getStateInstance("myState1");
assertEquals("Wrong flow:", flow.getId(), state.getFlow().getId());
assertEquals("Wrong state:", "myState1", flow.getState("myState1").getId());
assertEquals("Wrong state:", "myState2", flow.getState("myState2").getId());
}
内容来源于网络,如有侵权,请联系作者删除!