uk.gov.hmrc.play.fsm

# JourneyController

###
Related Doc: package fsm

#### trait JourneyController[RequestContext] extends AnyRef

Controller mixin for journeys implementing Finite State Machine. Provides rich set of `actions.` DSL.

Final controller class should override four extension points:

- getCallFor: mapping of states to endpoints
- renderState: mapping of states to views
- context: custom request context to carry over to the service layer
- withValidRequest: http request interceptor and validator

Consider using together with JourneyIdSupport.

Linear Supertypes
AnyRef, Any
Ordering

1. Alphabetic
2. By Inheritance

Inherited

1. JourneyController
2. AnyRef
3. Any

1. Hide All
2. Show All

Visibility

1. Public
2. All

### Type Members

1. #### type Fallback = (RequestContext, Request[_], ExecutionContext) ⇒ Future[Result]

2. #### type Outcome = (Request[_]) ⇒ Result

3. #### type OutcomeFactory = (StateAndBreadcrumbs) ⇒ Outcome

4. #### type Renderer = (Request[_]) ⇒ (State, Breadcrumbs, Option[Form[_]]) ⇒ Result

5. #### type WithAuthorised[User] = (Request[_]) ⇒ ((User) ⇒ Future[Result]) ⇒ Future[Result]

### Abstract Value Members

1. #### abstract def context(implicit rh: RequestHeader): RequestContext

   Implement to provide customized request context you require in the service layer *

2. #### abstract def getCallFor(state: State)(implicit request: Request[_]): Call

   Implement to map states into endpoints for redirection and back linking

3. #### abstract val journeyService: JourneyService[RequestContext]

   This has to be injected in the concrete controller

4. #### abstract def renderState(state: State, breadcrumbs: Breadcrumbs, formWithErrors: Option[Form[_]])(implicit request: Request[_]): Result

   Implement to render state after transition or when form validation fails

### Concrete Value Members

1. #### final def !=(arg0: Any): Boolean

   Definition Classes
     AnyRef → Any

2. #### final def ##(): Int

   Definition Classes
     AnyRef → Any

3. #### final def ==(arg0: Any): Boolean

   Definition Classes
     AnyRef → Any

4. #### final def action(body: (Request[_]) ⇒ Future[Result])(implicit ec: ExecutionContext): Action[AnyContent]

   Creates an action for a given async result function.

5. #### object actions extends SimpleActionsDSL

   Actions DSL: Simple action builder.

6. #### final def asInstanceOf[T0]: T0

   Definition Classes
     Any

7. #### final def backLinkFor(breadcrumbs: Breadcrumbs)(implicit request: Request[_]): Call

   Returns a call to the most recent state found in breadcrumbs, otherwise returns a call to the root state.

8. #### final def backLinkToMostRecent[S <: State](breadcrumbs: Breadcrumbs, fallback: Option[Call] = None)(implicit arg0: ClassTag[S], request: Request[_]): Call

   Returns a call to the latest state of S type if exists, otherwise returns a fallback call if defined, or a call to the root state.

9. #### implicit def build(executable: Executable)(implicit ec: ExecutionContext): Action[AnyContent]

   Implicitly converts Executable to an action.

   Implicitly converts Executable to an action.

   Attributes
     protected

10. #### def clone(): AnyRef

    Attributes
      protected[java.lang]
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )

11. #### final def eq(arg0: AnyRef): Boolean

    Definition Classes
      AnyRef

12. #### def equals(arg0: Any): Boolean

    Definition Classes
      AnyRef → Any

13. #### def finalize(): Unit

    Attributes
      protected[java.lang]
    Definition Classes
      AnyRef
    Annotations
      @throws( classOf[java.lang.Throwable] )

14. #### final def getClass(): Class[_]

    Definition Classes
      AnyRef → Any

15. #### def hashCode(): Int

    Definition Classes
      AnyRef → Any

16. #### object helpers

    FSM controller helper methods.

17. #### object internal

    Internal FSM controller models and functions.

18. #### final def isInstanceOf[T0]: Boolean

    Definition Classes
      Any

19. #### object legacy

    Legacy and deprecated stuff replaced by Actions DSL.

20. #### final def ne(arg0: AnyRef): Boolean

    Definition Classes
      AnyRef

21. #### final def notify(): Unit

    Definition Classes
      AnyRef

22. #### final def notifyAll(): Unit

    Definition Classes
      AnyRef

23. #### final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
      AnyRef

24. #### def toString(): String

    Definition Classes
      AnyRef → Any

25. #### final def wait(): Unit

    Definition Classes
      AnyRef
    Annotations
      @throws( ... )

26. #### final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
      AnyRef
    Annotations
      @throws( ... )

27. #### final def wait(arg0: Long): Unit

    Definition Classes
      AnyRef
    Annotations
      @throws( ... )

28. #### def withValidRequest(body: ⇒ Future[Result])(implicit rc: RequestContext, request: Request[_], ec: ExecutionContext): Future[Result]

    Interceptor: override to do basic checks on every incoming request (headers, session, etc.)

### Inherited from AnyRef

### Inherited from Any

### Ungrouped