Reference doc updates

This commit is contained in:
Janne Valkealahti
2015-04-05 22:22:45 +01:00
parent 3f3a8bbc65
commit e5c67b1c22
13 changed files with 289 additions and 42 deletions

View File

@@ -23,12 +23,12 @@ import org.springframework.statemachine.guard.Guard;
@Configuration
public class Application {
//tag::snippetA[]
@Configuration
@EnableStateMachine
static class StateMachineConfig
extends EnumStateMachineConfigurerAdapter<States, Events> {
//tag::snippetAA[]
@Override
public void configure(StateMachineStateConfigurer<States, Events> states)
throws Exception {
@@ -53,7 +53,9 @@ public class Application {
.state(States.PAUSED);
}
//end::snippetAA[]
//tag::snippetAB[]
@Override
public void configure(StateMachineTransitionConfigurer<States, Events> transitions)
throws Exception {
@@ -97,7 +99,9 @@ public class Application {
.withInternal()
.source(States.OPEN).event(Events.LOAD).action(loadAction());
}
//end::snippetAB[]
//tag::snippetAC[]
@Bean
public ClosedEntryAction closedEntryAction() {
return new ClosedEntryAction();
@@ -127,9 +131,9 @@ public class Application {
public PlayGuard playGuard() {
return new PlayGuard();
}
//end::snippetAC[]
}
//end::snippetA[]
//tag::snippetB[]