uk.gov.hmrc.play.fsm.JourneyController

# helpers

###
Related Doc: package JourneyController

#### object helpers

FSM controller helper methods.

Linear Supertypes
AnyRef, Any
Ordering

1. Alphabetic
2. By Inheritance

Inherited

1. helpers
2. AnyRef
3. Any

1. Hide All
2. Show All

Visibility

1. Public
2. All

### 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 apply(transition: Transition, outcomeFactory: OutcomeFactory)(implicit rc: RequestContext, request: Request[_], ec: ExecutionContext): Future[Result]

   Apply state transition and redirect to the URL matching the new state.

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

   Definition Classes
     Any

6. #### final def bindForm[T](form: Form[T], transition: (T) ⇒ Transition, outcomeFactory: OutcomeFactory, fallback: ⇒ Future[Result])(implicit rc: RequestContext, request: Request[_], ec: ExecutionContext): Future[Result]

   Bind form and apply transition if success, otherwise redirect to the current state with form errors in the flash scope.

7. #### final def bindForm[T](form: Form[T], transition: (T) ⇒ Transition)(implicit rc: RequestContext, request: Request[_], ec: ExecutionContext): Future[Result]

   Bind form and apply transition if success, otherwise redirect to the current state with form errors in the flash scope.

8. #### final def bindFormDerivedFromState[T](form: (State) ⇒ Form[T], transition: (T) ⇒ Transition, outcomeFactory: OutcomeFactory, fallback: ⇒ Future[Result])(implicit rc: RequestContext, request: Request[_], ec: ExecutionContext): Future[Result]

   Bind form derived from the current state and apply transition if success, otherwise redirect to the current state with form errors in the flash scope.

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

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

10. #### val defaultShowFallback: Fallback

    Override to change the default behaviour of the actions.show[State].

11. #### final val display: OutcomeFactory

    Display the current state using renderState.

12. #### final def displayOrRedirectIf[S <: State](implicit arg0: ClassTag[S]): OutcomeFactory

    If the current state is of type S then redirect using URL returned by getCallFor, otherwise display using renderState.

13. #### final def displayUsing(renderState: Renderer): OutcomeFactory

    Display the current state using custom renderer.

14. #### final def displayUsingOrRedirectIf[S <: State](renderState: Renderer)(implicit arg0: ClassTag[S]): OutcomeFactory

    If the current state is of type S then redirect using URL returned by getCallFor, otherwise display using custom renderer.

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

    Definition Classes
      AnyRef

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

    Definition Classes
      AnyRef → Any

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

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

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

    Definition Classes
      AnyRef → Any

19. #### final def hasRecentState[S <: State](breadcrumbs: Breadcrumbs)(implicit arg0: ClassTag[S]): Boolean

    Check if state of type S exists in the journey history (breadcrumbs).

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

    Definition Classes
      AnyRef → Any

21. #### final def is[S <: State](state: State)(implicit arg0: ClassTag[S]): Boolean

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

    Definition Classes
      Any

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

    Definition Classes
      AnyRef

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

    Definition Classes
      AnyRef

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

    Definition Classes
      AnyRef

26. #### final def parseJson[T](transition: (T) ⇒ Transition, outcomeFactory: OutcomeFactory, optionalIfFailure: Option[Result])(implicit arg0: Reads[T], rc: RequestContext, request: Request[_], ec: ExecutionContext): Future[Result]

    Parse request's body as JSON and apply transition if success, otherwise return ifFailure result.

27. #### final val redirect: OutcomeFactory

    Redirect to the current state using URL returned by getCallFor.

28. #### final def redirectOrDisplayIf[S <: State](implicit arg0: ClassTag[S]): OutcomeFactory

    If the current state is of type S then display using renderState, otherwise redirect using URL returned by getCallFor.

29. #### final def redirectOrDisplayIfSame(origin: State): OutcomeFactory

    If the current state is same as the origin then display using renderState, otherwise redirect using URL returned by getCallFor.

30. #### final def redirectOrDisplayUsingIf[S <: State](renderState: Renderer)(implicit arg0: ClassTag[S]): OutcomeFactory

    If the current state is of type S then display using custom renderer, otherwise redirect using URL returned by getCallFor.

31. #### final def redirectOrDisplayUsingIfSame(origin: State, renderState: Renderer): OutcomeFactory

    If the current state is same as the origin then display using custom renderer, otherwise redirect using URL returned by getCallFor.

32. #### final def redirectToCurrentState(implicit rc: RequestContext, request: Request[_], ec: ExecutionContext): Future[Result]

    Sync view, redirect back to the current state.

33. #### final val redirectToCurrentStateFallback: Fallback

34. #### final def redirectToStart(implicit rc: RequestContext, request: Request[_], ec: ExecutionContext): Future[Result]

    Default fallback result is to redirect back to the Start state.

35. #### final val redirectToStartFallback: Fallback

36. #### final def rollbackTo[S <: State](fallback: Fallback, outcomeFactory: OutcomeFactory)(stateAndBreadcrumbsOpt: Option[StateAndBreadcrumbs])(implicit arg0: ClassTag[S], rc: RequestContext, request: Request[_], ec: ExecutionContext): Future[Result]

    Rollback journey state and history (breadcrumbs) back to the most recent state of type S.

37. #### final def showState[S <: State](outcomeFactory: OutcomeFactory, rollback: Boolean = true, fallback: Fallback)(implicit arg0: ClassTag[S], rc: RequestContext, request: Request[_], ec: ExecutionContext): Future[Result]

    Display the state requested by the type parameter S.

    Display the state requested by the type parameter S. If the current state is not of type S, when rollback flag is true try to rollback to the most recent state matching S, otherwise redirect back to the root state.

    S

      type of the state to display

    outcomeFactory

      outcome factory to use

38. #### final def showStateOrApply[S <: State](transition: Transition, outcomeFactory: OutcomeFactory, rollback: Boolean)(implicit arg0: ClassTag[S], rc: RequestContext, request: Request[_], ec: ExecutionContext): Future[Result]

    Display the state requested by the type parameter S.

    Display the state requested by the type parameter S. If the current state is not of type S, when rollback flag is true try to rollback to the most recent state matching S, otherwise apply the transition and, depending on the outcome, redirect to the new state or display if S. If transition is not allowed then redirect back to the current state.

    S

      type of the state to display

    transition

      transition to apply when state S not found

    outcomeFactory

      outcome factory to use

39. #### final def showStateUsingMergerOrApply[S <: State](merger: Merger[S], outcomeFactory: OutcomeFactory)(transition: Transition)(implicit arg0: ClassTag[S], rc: RequestContext, request: Request[_], ec: ExecutionContext): Future[Result]

    Display the journey state requested by the type parameter S.

    Display the journey state requested by the type parameter S. If the current state is not of type S, try rollback to the most recent state matching S and apply merge function to reconcile the new state with the current state. If there exists no matching state S in the history, apply the transition and, depending on the outcome, redirect to the new state or display if S. If transition is not allowed then redirect back to the current state.

    S

      type of the state to display

40. #### final def showStateWithRollbackUsingMerger[S <: State](merger: Merger[S], outcomeFactory: OutcomeFactory, fallback: Fallback)(implicit arg0: ClassTag[S], rc: RequestContext, request: Request[_], ec: ExecutionContext): Future[Result]

    Display the state requested by the type parameter S.

    Display the state requested by the type parameter S. If the current state is not of type S try rollback to the most recent state matching S and apply merge function to reconcile the new state with the previous state, or redirect back to the root state.

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

    Definition Classes
      AnyRef

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

    Definition Classes
      AnyRef → Any

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

    Definition Classes
      AnyRef
    Annotations
      @throws( ... )

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

    Definition Classes
      AnyRef
    Annotations
      @throws( ... )

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

    Definition Classes
      AnyRef
    Annotations
      @throws( ... )

46. #### final def waitFor[S <: State](intervalInMiliseconds: Long, timeoutNanoTime: Long)(outcomeFactory: OutcomeFactory)(ifTimeout: (Request[_]) ⇒ Future[Result])(implicit arg0: ClassTag[S], rc: RequestContext, request: Request[_], ec: ExecutionContext, scheduler: Scheduler): Future[Result]

    Wait for a state to become of type S at most until maxTimestamp.

    Wait for a state to become of type S at most until maxTimestamp. Check in intervals. If the timeout expires, execute ifTimeout.

### Inherited from AnyRef

### Inherited from Any

### Ungrouped