📄 abstractflowbuilder.java
字号:
* Adds a <code>ViewState</code> marker to the flow built by this builder.
* <p>
* A marker has a <code>null</code> <code>viewName</code> and assumes
* the HTTP response has already been written when entered. The marker notes
* that control should be returned to the HTTP client.
* @param stateId the <code>ViewState</code> id; must be unique in the
* context of the flow built by this builder
* @param transition a single supported transition for this state, mapping a
* path from this state to another state (triggered by an event)
* @return the view marker state
* @throws IllegalArgumentException the stateId was not unique
*/
protected ViewState addViewStateMarker(String stateId, Transition transition) throws IllegalArgumentException {
return addViewState(stateId, (String)null, transition);
}
/**
* Adds a <code>ViewState</code> marker to the flow built by this builder.
* <p>
* A view marker has a <code>null</code> <code>viewName</code> and
* assumes the HTTP response has already been written when entered. The
* marker notes that control should be returned to the HTTP client.
* <p>
* @param stateId the <code>ViewState</code> id; must be unique in the
* context of the flow built by this builder
* @param transitions the supported transitions for this state, where each
* transition maps a path from this state to another state (triggered
* by an event)
* @return the view marker state
* @throws IllegalArgumentException the stateId was not unique
*/
protected ViewState addViewStateMarker(String stateId, Transition[] transitions) throws IllegalArgumentException {
return addViewState(stateId, (String)null, transitions);
}
/**
* Adds a <code>ViewState</code> marker to the flow built by this builder.
* <p>
* A view marker has a <code>null</code> <code>viewName</code> and
* assumes the HTTP response has already been written when entered. The
* marker notes that control should be returned to the HTTP client.
* <p>
* @param stateId the <code>ViewState</code> id; must be unique in the
* context of the flow built by this builder
* @param transitions the supported transitions for this state, where each
* transition maps a path from this state to another state (triggered
* by an event)
* @param properties additional properties describing the state
* @return the view marker state
* @throws IllegalArgumentException the stateId was not unique
*/
protected ViewState addViewStateMarker(String stateId, Transition[] transitions, Map properties) throws IllegalArgumentException {
return addViewState(stateId, (String)null, transitions, properties);
}
/**
* Adds an <code>ActionState</code> to the flow built by this builder. An
* action state executes an <code>Action</code> implementation when
* entered.
* @param stateId the qualified stateId for the state; must be unique in the
* context of the flow built by this builder
* @param targetAction the action implementation
* @param transition a single supported transition for this state, mapping a
* path from this state to another state (triggered by an event)
* @return the action state
* @throws IllegalArgumentException the stateId was not unique
*/
protected ActionState addActionState(String stateId, Action targetAction, Transition transition)
throws IllegalArgumentException {
return new ActionState(getFlow(), stateId, targetAction, transition);
}
/**
* Adds an <code>ActionState</code> to the flow built by this builder. An
* action state executes an <code>Action</code> implementation when
* entered.
* @param stateId the qualified stateId for the state; must be unique in the
* context of the flow built by this builder
* @param targetAction the action implementation
* @param transitions the supported transitions for this state, where each
* transition maps a path from this state to another state (triggered
* by an event)
* @return the action state
* @throws IllegalArgumentException the stateId was not unique
*/
protected ActionState addActionState(String stateId, Action targetAction, Transition[] transitions)
throws IllegalArgumentException {
return new ActionState(getFlow(), stateId, targetAction, transitions);
}
/**
* Adds an <code>ActionState</code> to the flow built by this builder. An
* action state executes an <code>Action</code> implementation when
* entered.
* @param stateId the qualified stateId for the state; must be unique in the
* context of the flow built by this builder
* @param targetAction the action implementation
* @param transitions the supported transitions for this state, where each
* transition maps a path from this state to another state (triggered
* by an event)
* @param properties additional properties describing the state
* @return the action state
* @throws IllegalArgumentException the stateId was not unique
*/
protected ActionState addActionState(String stateId, Action targetAction, Transition[] transitions, Map properties)
throws IllegalArgumentException {
return new ActionState(getFlow(), stateId, targetAction, transitions, properties);
}
/**
* Adds an <code>ActionState</code> to the flow built by this builder. An
* action state executes an <code>Action</code> implementation when
* entered.
* @param stateId the qualified stateId for the state; must be unique in the
* context of the flow built by this builder
* @param action the action implementation
* @param transition a single supported transition for this state, mapping a
* path from this state to another state (triggered by an event)
* @return the action state
* @throws IllegalArgumentException the stateId was not unique
*/
protected ActionState addActionState(String stateId, AnnotatedAction action, Transition transition)
throws IllegalArgumentException {
return new ActionState(getFlow(), stateId, action, transition);
}
/**
* Adds an <code>ActionState</code> to the flow built by this builder. An
* action state executes an <code>Action</code> implementation when
* entered.
* @param stateId the qualified stateId for the state; must be unique in the
* context of the flow built by this builder
* @param action the action implementation
* @param transitions the supported transitions for this state, where each
* transition maps a path from this state to another state (triggered
* by an event)
* @return the action state
* @throws IllegalArgumentException the stateId was not unique
*/
protected ActionState addActionState(String stateId, AnnotatedAction action, Transition[] transitions)
throws IllegalArgumentException {
return new ActionState(getFlow(), stateId, action, transitions);
}
/**
* Adds an <code>ActionState</code> to the flow built by this builder. An
* action state executes an <code>Action</code> implementation when
* entered.
* @param stateId the qualified stateId for the state; must be unique in the
* context of the flow built by this builder
* @param action the action implementation
* @param transitions the supported transitions for this state, where each
* transition maps a path from this state to another state (triggered
* by an event)
* @param properties additional properties describing the state
* @return the action state
* @throws IllegalArgumentException the stateId was not unique
*/
protected ActionState addActionState(String stateId, AnnotatedAction action, Transition[] transitions, Map properties)
throws IllegalArgumentException {
return new ActionState(getFlow(), stateId, action, transitions, properties);
}
/**
* Adds an <code>ActionState</code> to the flow built by this builder. An
* action state executes one or more <code>Action</code> implementations
* when entered.
* @param stateId the qualified stateId for the state; must be unique in the
* context of the flow built by this builder
* @param targetActions the action implementations, to be executed in order
* until a valid transitional result is returned (Chain of
* Responsibility)
* @param transitions the supported transitions for this state, where each
* transition maps a path from this state to another state (triggered
* by an event)
* @return the action state
* @throws IllegalArgumentException the stateId was not unique
*/
protected ActionState addActionState(String stateId, Action[] targetActions, Transition[] transitions)
throws IllegalArgumentException {
return new ActionState(getFlow(), stateId, targetActions, transitions);
}
/**
* Adds an <code>ActionState</code> to the flow built by this builder. An
* action state executes one or more <code>Action</code> implementations
* when entered.
* @param stateId the qualified stateId for the state; must be unique in the
* context of the flow built by this builder
* @param targetActions the action implementations, to be executed in order
* until a valid transitional result is returned (Chain of
* Responsibility)
* @param transitions the supported transitions for this state, where each
* transition maps a path from this state to another state (triggered
* by an event)
* @param properties additional properties describing the state
* @return the action state
* @throws IllegalArgumentException the stateId was not unique
*/
protected ActionState addActionState(String stateId, Action[] targetActions, Transition[] transitions, Map properties)
throws IllegalArgumentException {
return new ActionState(getFlow(), stateId, targetActions, transitions, properties);
}
/**
* Adds an <code>ActionState</code> to the flow built by this builder. An
* action state executes one or more <code>Action</code> implementations
* when entered.
* @param stateId the qualified stateId for the state; must be unique in the
* context of the flow built by this builder
* @param actions the action implementations, to be executed in order until
* a valid transitional result is returned (Chain of Responsibility)
* @param transitions the supported transitions for this state, where each
* transition maps a path from this state to another state (triggered
* by an event)
* @return the action state
* @throws IllegalArgumentException the stateId was not unique
*/
protected ActionState addActionState(String stateId, AnnotatedAction[] actions, Transition[] transitions)
throws IllegalArgumentException {
return new ActionState(getFlow(), stateId, actions, transitions);
}
/**
* Adds an <code>ActionState</code> to the flow built by this builder. An
* action state executes one or more <code>Action</code> implementations
* when entered.
* @param stateId the qualified stateId for the state; must be unique in the
* context of the flow built by this builder
* @param actions the action implementations, to be executed in order until
* a valid transitional result is returned (Chain of Responsibility)
* @param transitions the supported transitions for this state, where each
* transition maps a path from this state to another state (triggered
* by an event)
* @param properties additional properties describing the state
* @return the action state
* @throws IllegalArgumentException the stateId was not unique
*/
protected ActionState addActionState(String stateId, AnnotatedAction[] actions, Transition[] transitions, Map properties)
throws IllegalArgumentException {
return new ActionState(getFlow(), stateId, actions, transitions, properties);
}
/**
* Request that the action with the specified id be executed when the action
* state being built is entered. Simply looks the action up by name and
* returns it.
* @param actionId the action id
* @return the action
* @throws ServiceLookupException the action could not be resolved
*/
protected Action action(String actionId) throws ServiceLookupException {
return getFlowServiceLocator().getAction(actionId);
}
/**
* Request that the action with the specified id be executed when the action
* state being built is entered. Simply looks the action up by name and
* returns it.
* @param actionId the action id
* @return the action
* @throws ServiceLookupException the action could not be resolved
*/
protected AnnotatedAction annotatedAction(String actionId, Map properties) throws ServiceLookupException {
return new AnnotatedAction(action(actionId), properties);
}
/**
* Return a delegating action that delegates to an action instance retrieved by
* messaging a flow-scoped action locator.
* @param actionLocatorAttribute the action locator
* @param actionId the action id
* @return the delegating action
*/
protected Action delegateAction(String actionLocatorAttribute, String actionId) {
return new DelegatingAction(actionLocatorAttribute, actionId);
}
/**
* Request that the action with the specified implementation be instantiated
* and executed when the action state being built is entered. Creates the
* action instance.
* @param actionImplementationClass the action implementation to instantiate
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -