Allows arbitrary context-specific actions.
Marker type for the framework-defined APIs.
Allows search and other finder-type methods.
Actions have far fewer restrictions on the response type than other actions.
Actions have far fewer restrictions on the response type than other actions. We thus define a looser serializer API (as compared to NaptimeSerializer.
Abstracts over the Play-JSON API and the Courier underlying record template support for serialization, allowing us to convert Play-JSON into Pegasus DataMaps.
Define the mappings between category engines.
Define the mappings between category engines.
TODO: consider moving these to be defined in the same trait that defines the resource. (e.g. the org.coursera.naptime.resources.CollectionResource.) By moving the engines to the trait, this would allow for different resources to have different engines available. That said, this must all be sealed to disallow further 'customization'.
A RestAction is a layer on top of Play! with additional type information
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.
Helper class to control the creation of the rest action using either an asynchronous or a synchronous function.
Helper class to control the creation of the rest action using either an asynchronous or a
synchronous function. Use either the apply
function or the async
function to create a
RestAction which can then handle requests.
A builder that helps build Rest Actions.
Defines the allowed types of API endpoints.
Defines the allowed types of API endpoints.
This should not be extended outside the framework, and is thus sealed.
Maps a high-level REST response to a low-level HTTP response.
Maps a high-level REST response to a low-level HTTP response.
2nd generation engines with Pegasus DataMaps at the core.
2nd generation engines with Pegasus DataMaps at the core. To use, import them at the top of your file.