Add missing javadocs for StateConfigurer

This commit is contained in:
Janne Valkealahti
2015-04-12 09:09:25 +01:00
parent 247c90ad90
commit 29da80c6f7

View File

@@ -21,27 +21,98 @@ import java.util.Set;
import org.springframework.statemachine.action.Action;
import org.springframework.statemachine.config.builders.StateMachineStateConfigurer;
import org.springframework.statemachine.config.common.annotation.AnnotationConfigurerBuilder;
import org.springframework.statemachine.state.State;
/**
* Base {@code StateConfigurer} interface for configuring {@link State}s.
*
* @author Janne Valkealahti
*
* @param <S> the type of state
* @param <E> the type of event
*/
public interface StateConfigurer<S, E> extends
AnnotationConfigurerBuilder<StateMachineStateConfigurer<S, E>> {
/**
* Specify a initial state {@code S}.
*
* @param initial the initial state
* @return configurer for chaining
*/
StateConfigurer<S, E> initial(S initial);
/**
* Specify a initial state {@code S} with an {@link Action} to be executed
* with it. Action can be i.e. used to init extended variables.
*
* @param initial the initial state
* @param action the action
* @return configurer for chaining
*/
StateConfigurer<S, E> initial(S initial, Action<S, E> action);
/**
* Specify a states configured by this configurer instance to be
* substates of state {@code S}.
*
* @param state the parent state
* @return configurer for chaining
*/
StateConfigurer<S, E> parent(S state);
/**
* Specify a state {@code S}.
*
* @param state the state
* @return configurer for chaining
*/
StateConfigurer<S, E> state(S state);
/**
* Specify a state {@code S} with entry and exit {@link Actions}s.
*
* @param state the state
* @param entryActions the state entry actions
* @param exitActions the state exit actions
* @return configurer for chaining
*/
StateConfigurer<S, E> state(S state, Collection<? extends Action<S, E>> entryActions,
Collection<? extends Action<S, E>> exitActions);
/**
* Specify a state {@code S} with entry and exit {@link Actions}.
*
* @param state the state
* @param entryAction the state entry action
* @param exitAction the state exit action
* @return configurer for chaining
*/
StateConfigurer<S, E> state(S state, Action<S, E> entryAction, Action<S, E> exitAction);
/**
* Specify a state {@code S} with a deferred events {@code E}.
*
* @param state the state
* @param deferred the deferred events
* @return configurer for chaining
*/
StateConfigurer<S, E> state(S state, E... deferred);
/**
* Specify a states {@code S}.
*
* @param states the states
* @return configurer for chaining
*/
StateConfigurer<S, E> states(Set<S> states);
/**
* Specify a state {@code S} to be end state.
*
* @param end the end state
* @return configurer for chaining
*/
StateConfigurer<S, E> end(S end);
}