本文整理了Java中org.springframework.webflow.engine.Flow.getStateIds()
方法的一些代码示例,展示了Flow.getStateIds()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Flow.getStateIds()
方法的具体详情如下:
包路径:org.springframework.webflow.engine.Flow
类名称:Flow
方法名:getStateIds
[英]Convenience accessor that returns an ordered array of the String ids
for the state definitions associated with this flow definition.
[中]方便访问器,返回与此流定义关联的状态定义的字符串ids
的有序数组。
代码示例来源:origin: org.springframework.webflow/spring-webflow
/**
* Lookup the identified state instance of this flow.
* @param stateId the state id
* @return the state
* @throws IllegalArgumentException if the identified state cannot be found
*/
public State getStateInstance(String stateId) throws IllegalArgumentException {
if (!StringUtils.hasText(stateId)) {
throw new IllegalArgumentException("The specified stateId is invalid: state identifiers must be non-blank");
}
for (State state : states) {
if (state.getId().equals(stateId)) {
return state;
}
}
throw new IllegalArgumentException("Cannot find state with id '" + stateId + "' in flow '" + getId() + "' -- "
+ "Known state ids are '" + StylerUtils.style(getStateIds()) + "'");
}
代码示例来源:origin: org.springframework.webflow/spring-webflow
/**
* 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.
* @param state the state to add
* @throws IllegalArgumentException when the state cannot be added to the flow; for instance if another state shares
* the same id as the one provided or if given state already belongs to another flow
*/
protected void add(State state) throws IllegalArgumentException {
if (this != state.getFlow() && state.getFlow() != null) {
throw new IllegalArgumentException("State " + state + " cannot be added to this flow '" + getId()
+ "' -- it already belongs to a different flow: '" + state.getFlow().getId() + "'");
}
if (this.states.contains(state) || this.containsState(state.getId())) {
throw new IllegalArgumentException("This flow '" + getId() + "' already contains a state with id '"
+ state.getId() + "' -- state ids must be locally unique to the flow definition; "
+ "existing state-ids of this flow include: " + StylerUtils.style(getStateIds()));
}
boolean firstAdd = states.isEmpty();
states.add(state);
if (firstAdd) {
setStartState(state);
}
}
代码示例来源:origin: org.springframework.webflow/org.springframework.webflow
/**
* Lookup the identified state instance of this flow.
* @param stateId the state id
* @return the state
* @throws IllegalArgumentException if the identified state cannot be found
*/
public State getStateInstance(String stateId) throws IllegalArgumentException {
if (!StringUtils.hasText(stateId)) {
throw new IllegalArgumentException("The specified stateId is invalid: state identifiers must be non-blank");
}
Iterator it = states.iterator();
while (it.hasNext()) {
State state = (State) it.next();
if (state.getId().equals(stateId)) {
return state;
}
}
throw new IllegalArgumentException("Cannot find state with id '" + stateId + "' in flow '" + getId() + "' -- "
+ "Known state ids are '" + StylerUtils.style(getStateIds()) + "'");
}
代码示例来源:origin: org.springframework/spring-webflow
/**
* Lookup the identified state instance of this flow.
* @param stateId the state id
* @return the state
* @throws IllegalArgumentException if the identified state cannot be found
*/
public State getStateInstance(String stateId) throws IllegalArgumentException {
if (!StringUtils.hasText(stateId)) {
throw new IllegalArgumentException("The specified stateId is invalid: state identifiers must be non-blank");
}
Iterator it = states.iterator();
while (it.hasNext()) {
State state = (State) it.next();
if (state.getId().equals(stateId)) {
return state;
}
}
throw new IllegalArgumentException("Cannot find state with id '" + stateId + "' in flow '" + getId() + "' -- "
+ "Known state ids are '" + StylerUtils.style(getStateIds()) + "'");
}
代码示例来源:origin: spring-projects/spring-webflow
/**
* Lookup the identified state instance of this flow.
* @param stateId the state id
* @return the state
* @throws IllegalArgumentException if the identified state cannot be found
*/
public State getStateInstance(String stateId) throws IllegalArgumentException {
if (!StringUtils.hasText(stateId)) {
throw new IllegalArgumentException("The specified stateId is invalid: state identifiers must be non-blank");
}
for (State state : states) {
if (state.getId().equals(stateId)) {
return state;
}
}
throw new IllegalArgumentException("Cannot find state with id '" + stateId + "' in flow '" + getId() + "' -- "
+ "Known state ids are '" + StylerUtils.style(getStateIds()) + "'");
}
代码示例来源:origin: org.apereo.cas/cas-server-support-reports
Arrays.stream(def.getStateIds()).forEach(st -> {
代码示例来源:origin: spring-projects/spring-webflow
/**
* 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.
* @param state the state to add
* @throws IllegalArgumentException when the state cannot be added to the flow; for instance if another state shares
* the same id as the one provided or if given state already belongs to another flow
*/
protected void add(State state) throws IllegalArgumentException {
if (this != state.getFlow() && state.getFlow() != null) {
throw new IllegalArgumentException("State " + state + " cannot be added to this flow '" + getId()
+ "' -- it already belongs to a different flow: '" + state.getFlow().getId() + "'");
}
if (this.states.contains(state) || this.containsState(state.getId())) {
throw new IllegalArgumentException("This flow '" + getId() + "' already contains a state with id '"
+ state.getId() + "' -- state ids must be locally unique to the flow definition; "
+ "existing state-ids of this flow include: " + StylerUtils.style(getStateIds()));
}
boolean firstAdd = states.isEmpty();
states.add(state);
if (firstAdd) {
setStartState(state);
}
}
代码示例来源:origin: org.springframework.webflow/org.springframework.webflow
/**
* 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.
* @param state the state to add
* @throws IllegalArgumentException when the state cannot be added to the flow; for instance if another state shares
* the same id as the one provided or if given state already belongs to another flow
*/
protected void add(State state) throws IllegalArgumentException {
if (this != state.getFlow() && state.getFlow() != null) {
throw new IllegalArgumentException("State " + state + " cannot be added to this flow '" + getId()
+ "' -- it already belongs to a different flow: '" + state.getFlow().getId() + "'");
}
if (this.states.contains(state) || this.containsState(state.getId())) {
throw new IllegalArgumentException("This flow '" + getId() + "' already contains a state with id '"
+ state.getId() + "' -- state ids must be locally unique to the flow definition; "
+ "existing state-ids of this flow include: " + StylerUtils.style(getStateIds()));
}
boolean firstAdd = states.isEmpty();
states.add(state);
if (firstAdd) {
setStartState(state);
}
}
代码示例来源:origin: org.springframework/spring-webflow
/**
* 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.
* @param state the state to add
* @throws IllegalArgumentException when the state cannot be added to the flow; for instance if another state shares
* the same id as the one provided or if given state already belongs to another flow
*/
protected void add(State state) throws IllegalArgumentException {
if (this != state.getFlow() && state.getFlow() != null) {
throw new IllegalArgumentException("State " + state + " cannot be added to this flow '" + getId()
+ "' -- it already belongs to a different flow: '" + state.getFlow().getId() + "'");
}
if (this.states.contains(state) || this.containsState(state.getId())) {
throw new IllegalArgumentException("This flow '" + getId() + "' already contains a state with id '"
+ state.getId() + "' -- state ids must be locally unique to the flow definition; "
+ "existing state-ids of this flow include: " + StylerUtils.style(getStateIds()));
}
boolean firstAdd = states.isEmpty();
states.add(state);
if (firstAdd) {
setStartState(state);
}
}
代码示例来源:origin: org.wicketstuff/spring-webflow
stateIds = flow.getStateIds();
内容来源于网络,如有侵权,请联系作者删除!