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.
- Alphabetic
- By Inheritance
- RestAction
- RequestTaggingHandler
- EssentialAction
- Handler
- Function1
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
errorHandler: PartialFunction[Throwable, RestError]
- Attributes
- protected
-
implicit abstract
val
executionContext: ExecutionContext
- Attributes
- protected
-
abstract
def
fieldsEngine: Fields[ResourceType]
- Attributes
- protected[org.coursera.naptime]
-
implicit abstract
val
keyFormat: KeyFormat[KeyType]
- Attributes
- protected
-
implicit abstract
val
materializer: Materializer
- Attributes
- protected
-
abstract
def
paginationConfiguration: PaginationConfiguration
- Attributes
- protected
-
implicit abstract
val
resourceFormat: OFormat[ResourceType]
- Attributes
- protected
-
abstract
def
restAuth: HeaderAccessControl[AuthType]
- Attributes
- protected[org.coursera.naptime.actions]
-
abstract
def
restBodyParser: BodyParser[BodyType]
- Attributes
- protected
-
abstract
def
restEngine: RestActionCategoryEngine[RACType, KeyType, ResourceType, ResponseType]
- Attributes
- protected[org.coursera.naptime]
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
andThen[A](g: (Accumulator[ByteString, Result]) ⇒ A): (RequestHeader) ⇒ A
- Definition Classes
- Function1
- Annotations
- @unspecialized()
-
final
def
apply(rh: RequestHeader): Accumulator[ByteString, Result]
Invoke the rest action in production.
Invoke the rest action in production.
- Definition Classes
- RestAction → Function1
-
def
apply(): EssentialAction
- Definition Classes
- EssentialAction
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
asJava: EssentialAction
- Definition Classes
- EssentialAction
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
compose[A](g: (A) ⇒ RequestHeader): (A) ⇒ Accumulator[ByteString, Result]
- Definition Classes
- Function1
- Annotations
- @unspecialized()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
setTags(tags: Map[String, String]): RestAction.this.type
The naptime ResourceRouter should call this function before returning the action.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
tagRequest(request: RequestHeader): RequestHeader
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
-
def
toString(): String
- Definition Classes
- RestAction → Function1 → AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )