t

play.api.mvc

ActionTransformer

trait ActionTransformer[-R[_], +P[_]] extends ActionRefiner[R, P]

A simple kind of ActionRefiner which, given a request (of type R), unconditionally transforms it to a new parameter type (P) to be passed to its Action block. The critical (abstract) function is transform.

Source
Action.scala
Linear Supertypes
ActionRefiner[R, P], ActionFunction[R, P], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ActionTransformer
  2. ActionRefiner
  3. ActionFunction
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Concrete Value Members

  1. def andThen[Q[_]](other: ActionFunction[P, Q]): ActionFunction[R, Q]

    Compose this ActionFunction with another, with this one applied first.

    Compose this ActionFunction with another, with this one applied first.

    other

    ActionFunction with which to compose

    returns

    The new ActionFunction

    Definition Classes
    ActionFunction
  2. def compose[B](other: ActionBuilder[R, B]): ActionBuilder[P, B]
    Definition Classes
    ActionFunction
  3. def compose[Q[_]](other: ActionFunction[Q, R]): ActionFunction[Q, P]

    Compose another ActionFunction with this one, with this one applied last.

    Compose another ActionFunction with this one, with this one applied last.

    other

    ActionFunction with which to compose

    returns

    The new ActionFunction

    Definition Classes
    ActionFunction
  4. final def invokeBlock[A](request: R[A], block: (P[A]) => Future[Result]): Future[Result]

    Invoke the block.

    Invoke the block. This is the main method that an ActionBuilder has to implement, at this stage it can wrap it in any other actions, modify the request object or potentially use a different class to represent the request.

    request

    The request

    block

    The block of code to invoke

    returns

    A future of the result

    Definition Classes
    ActionFunction
  5. final def refine[A](request: R[A]): Future[Either[Result, P[A]]]

    Determine how to process a request.

    Determine how to process a request. This is the main method than an ActionRefiner has to implement. It can decide to immediately intercept the request and return a Result (Left), or continue processing with a new parameter of type P (Right).

    request

    the input request

    returns

    Either a result or a new parameter to pass to the Action block

    Definition Classes
    ActionRefiner