Trait

helpers.sorus

SorusPlay

Related Doc: package sorus

Permalink

trait SorusPlay[T <: Request[_]] extends Sorus

This trait allow you to use the ?| operator in your Play controller and get a Future[Result] instead of a Future[Fail \/ T]

Usage :

class MyController extends Controller with FormatErrorResult with SorusPlay

You may override default serialization of Fail into Error by extending FormatErrorResult.

Self Type
SorusPlay[T] with FormatErrorResult[T]
Linear Supertypes
Sorus, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SorusPlay
  2. Sorus
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. implicit def booleanToStepOps(boolean: Boolean): StepOps[Unit, Unit]

    Permalink
    Definition Classes
    Sorus
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. implicit def disjunctionToStepOps[A, B](disjunction: \/[B, A]): StepOps[A, B]

    Permalink
    Definition Classes
    Sorus
  8. implicit def eitherToStepOps[A, B](either: Either[B, A]): StepOps[A, B]

    Permalink
    Definition Classes
    Sorus
  9. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  11. def executionContext: ExecutionContext

    Permalink
    Attributes
    protected
    Definition Classes
    Sorus
  12. implicit def fDisjunctionToStepOps[A, B](fDisjunction: Future[\/[B, A]]): StepOps[A, B]

    Permalink
    Definition Classes
    Sorus
  13. implicit def fEitherToStepOps[A, B](fEither: Future[Either[B, A]]): StepOps[A, B]

    Permalink
    Definition Classes
    Sorus
  14. implicit def fOptionToStepOps[A](fOption: Future[Option[A]]): StepOps[A, Unit]

    Permalink
    Definition Classes
    Sorus
  15. implicit val failIsAMonoid: Monoid[Fail] { def append(f1: helpers.sorus.Fail,f2: => helpers.sorus.Fail): Nothing }

    Permalink
    Definition Classes
    Sorus
  16. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. implicit def formToStepOps[A](form: Form[A]): StepOps[A, Form[A]]

    Permalink
  18. implicit val futureIsAFunctor: Functor[Future]

    Permalink
    Definition Classes
    Sorus
  19. implicit val futureIsAMonad: Monad[Future]

    Permalink
    Definition Classes
    Sorus
  20. implicit def futureToStepOps[A](future: Future[A]): StepOps[A, Throwable]

    Permalink
    Definition Classes
    Sorus
  21. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  22. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  23. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  24. implicit def jsResultToStepOps[A](jsResult: JsResult[A]): StepOps[A, JsErrorContent]

    Permalink
    Definition Classes
    Sorus
  25. def log(fail: Fail): Unit

    Permalink
    Attributes
    protected
  26. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  27. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  28. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  29. implicit def optionToStepOps[A](option: Option[A]): StepOps[A, Unit]

    Permalink
    Definition Classes
    Sorus
  30. implicit def result2Fail(result: Result): FailWithResult

    Permalink

    Allow this kind of mapping with result on the left ?|> don't stop the flow but replace the result if the first one fail

    Allow this kind of mapping with result on the left ?|> don't stop the flow but replace the result if the first one fail

    criteria <- eventSearchForm.bindFromRequest ?| (formWithErrors => Ok(views.html.analyzer.index(formWithErrors)))

  31. implicit def result2FailFromUnit(result: Result): (Unit) ⇒ FailWithResult

    Permalink

    Avoid to write mapping like that

    Avoid to write mapping like that

    consumer <- consumerService.loadByKey(key) ?| (err:Unit => NotFound)

  32. implicit def result2FailFunction(result: Result): (Throwable) ⇒ FailWithResult

    Permalink

    Allow this kind of mapping

    Allow this kind of mapping

    consumers <- consumerService.search(q) ?| NotFound

    without the need to do

    consumers <- consumerService.search(q) ?| (err:Throwable => NotFound(err.getMessage).withEx(err))

    For now you can't override the body of the response

    consumers <- consumerService.search(q) ?| NotFound("this will be erased")

  33. implicit def resultStepToResult(step: Step[Result])(implicit request: T): Future[Result]

    Permalink
  34. implicit def stepToDisjonction[A](step: Step[A]): Future[\/[Fail, A]]

    Permalink
    Definition Classes
    Sorus
  35. implicit def stepToEither[A](step: Step[A]): Future[Either[Fail, A]]

    Permalink
    Definition Classes
    Sorus
  36. implicit def stepToResult(step: Step[Fail]): Future[Fail]

    Permalink
    Definition Classes
    Sorus
  37. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  38. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  39. implicit def tryToStepOps[A](tryValue: Try[A]): StepOps[A, Throwable]

    Permalink
    Definition Classes
    Sorus
  40. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  41. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  42. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Sorus

Inherited from AnyRef

Inherited from Any

Ungrouped