org.springframework.webflow.engine.Flow.add()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(2.7k)|赞(0)|评价(0)|浏览(105)

本文整理了Java中org.springframework.webflow.engine.Flow.add()方法的一些代码示例,展示了Flow.add()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Flow.add()方法的具体详情如下:
包路径:org.springframework.webflow.engine.Flow
类名称:Flow
方法名:add

Flow.add介绍

[英]Add given state definition to this flow definition. Marked protected, as this method is to be called by the (privileged) state definition classes themselves during state construction as part of a FlowBuilder invocation.
[中]将给定的状态定义添加到此流定义。标记为protected,因为在状态构造期间,作为FlowBuilder调用的一部分,(特权)状态定义类本身将调用此方法。

代码示例

代码示例来源:origin: org.springframework.webflow/spring-webflow

/**
 * Set the owning flow.
 * @throws IllegalArgumentException if this state cannot be added to the flow
 */
private void setFlow(Flow flow) throws IllegalArgumentException {
  Assert.hasText(getId(), "The id of the state should be set before adding the state to a flow");
  Assert.notNull(flow, "The owning flow is required");
  this.flow = flow;
  flow.add(this);
}

代码示例来源:origin: spring-projects/spring-webflow

/**
 * Set the owning flow.
 * @throws IllegalArgumentException if this state cannot be added to the flow
 */
private void setFlow(Flow flow) throws IllegalArgumentException {
  Assert.hasText(getId(), "The id of the state should be set before adding the state to a flow");
  Assert.notNull(flow, "The owning flow is required");
  this.flow = flow;
  flow.add(this);
}

代码示例来源:origin: org.springframework/spring-webflow

/**
 * Set the owning flow.
 * @throws IllegalArgumentException if this state cannot be added to the flow
 */
private void setFlow(Flow flow) throws IllegalArgumentException {
  Assert.hasText(getId(), "The id of the state should be set before adding the state to a flow");
  Assert.notNull(flow, "The owning flow is required");
  this.flow = flow;
  flow.add(this);
}

代码示例来源:origin: org.springframework.webflow/org.springframework.webflow

/**
 * Set the owning flow.
 * @throws IllegalArgumentException if this state cannot be added to the flow
 */
private void setFlow(Flow flow) throws IllegalArgumentException {
  Assert.hasText(getId(), "The id of the state should be set before adding the state to a flow");
  Assert.notNull(flow, "The owning flow is required");
  this.flow = flow;
  flow.add(this);
}

代码示例来源:origin: spring-projects/spring-webflow

public void testAddStateAlreadyInOtherFlow() {
  Flow otherFlow = new Flow("myOtherFlow");
  State state = new EndState(otherFlow, "myState1");
  Flow flow = new Flow("myFlow");
  try {
    flow.add(state);
    fail("Added state part of another flow");
  } catch (IllegalArgumentException e) {
    // expected
  }
}

代码示例来源:origin: spring-projects/spring-webflow

public void testAddSameStateTwice() {
  Flow flow = new Flow("myFlow");
  EndState state = new EndState(flow, "myState1");
  try {
    flow.add(state);
    fail("Should have failed");
  } catch (IllegalArgumentException e) {
  }
  assertEquals("State count wrong:", 1, flow.getStateCount());
}

相关文章