Trait

org.coursera.naptime.actions

RestAction

Related Doc: package actions

Permalink

trait RestAction[RACType, AuthType, BodyType, KeyType, ResourceType, ResponseType] extends EssentialAction with RequestTaggingHandler

A RestAction is a layer on top of Play! with additional type information

This type information is used to help enforce conventions, DRY things out, and support some additional features.

Type parameters: RACType - The rest action type. This is typically a subclass of RestActionCategory AuthType - The authentication return type. BodyType - The HTTP request body is parsed to this type for use in the handler. KeyType - The key type of the model being processed. ResourceType - This is the resource type this action is supposed to handle. ResponseType - This is the response type this action is supposed to return (e.g. Seq of ResourceType)

TODO(saeta): Enforce RACType extends from RestActionCategory.

Linear Supertypes
RequestTaggingHandler, EssentialAction, Handler, (RequestHeader) ⇒ Accumulator[ByteString, Result], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. RestAction
  2. RequestTaggingHandler
  3. EssentialAction
  4. Handler
  5. Function1
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def errorHandler: PartialFunction[Throwable, RestError]

    Permalink
    Attributes
    protected
  2. implicit abstract val executionContext: ExecutionContext

    Permalink
    Attributes
    protected
  3. abstract def fieldsEngine: Fields[ResourceType]

    Permalink
    Attributes
    protected[org.coursera.naptime]
  4. implicit abstract val keyFormat: KeyFormat[KeyType]

    Permalink
    Attributes
    protected
  5. implicit abstract val materializer: Materializer

    Permalink
    Attributes
    protected
  6. abstract def paginationConfiguration: PaginationConfiguration

    Permalink
    Attributes
    protected
  7. implicit abstract val resourceFormat: OFormat[ResourceType]

    Permalink
    Attributes
    protected
  8. abstract def restAuth: HeaderAccessControl[AuthType]

    Permalink
    Attributes
    protected[org.coursera.naptime.actions]
  9. abstract def restBodyParser: BodyParser[BodyType]

    Permalink
    Attributes
    protected
  10. abstract def restEngine: RestActionCategoryEngine[RACType, KeyType, ResourceType, ResponseType]

    Permalink
    Attributes
    protected[org.coursera.naptime]

Concrete 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. def andThen[A](g: (Accumulator[ByteString, Result]) ⇒ A): (RequestHeader) ⇒ A

    Permalink
    Definition Classes
    Function1
    Annotations
    @unspecialized()
  5. final def apply(rh: RequestHeader): Accumulator[ByteString, Result]

    Permalink

    Invoke the rest action in production.

    Invoke the rest action in production.

    Definition Classes
    RestAction → Function1
  6. def apply(): EssentialAction

    Permalink
    Definition Classes
    EssentialAction
  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. def asJava: EssentialAction

    Permalink
    Definition Classes
    EssentialAction
  9. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. def compose[A](g: (A) ⇒ RequestHeader): (A) ⇒ Accumulator[ByteString, Result]

    Permalink
    Definition Classes
    Function1
    Annotations
    @unspecialized()
  11. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  13. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. final def getClass(): Class[_]

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

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

    Permalink
    Definition Classes
    Any
  17. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  20. def setTags(tags: Map[String, String]): RestAction.this.type

    Permalink

    The naptime ResourceRouter should call this function before returning the action.

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

    Permalink
    Definition Classes
    AnyRef
  22. def tagRequest(request: RequestHeader): RequestHeader

    Permalink

    Adds tags to the request.

    Adds tags to the request.

    This will permit us to remove the trace modifications that the old router needed to annotate the traces appropriately.

    request

    The request to tag.

    returns

    The tagged request.

    Definition Classes
    RestAction → RequestTaggingHandler
  23. def toString(): String

    Permalink
    Definition Classes
    RestAction → Function1 → AnyRef → Any
  24. final def wait(): Unit

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

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

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

Inherited from RequestTaggingHandler

Inherited from EssentialAction

Inherited from Handler

Inherited from (RequestHeader) ⇒ Accumulator[ByteString, Result]

Inherited from AnyRef

Inherited from Any

Ungrouped