trait CollectionResource[ParentResource <: Resource[_], K, M] extends Resource[M]
Defines methods that collection resources can implement
- Alphabetic
- By Inheritance
- CollectionResource
- Resource
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
type
AncestorKeys = ParentResource.PathKey
The (Hlist-like) collection of ancestor keys has this type.
- type KeyType = K
- abstract type OptPathKey <: :::[Option[KeyType], ParentResource.PathKey]
-
abstract
type
PathKey <: :::[KeyType, ParentResource.PathKey]
The (HList-like) collection of all keys that identifies a single element of this collection.
The (HList-like) collection of all keys that identifies a single element of this collection.
- Definition Classes
- CollectionResource → Resource
-
abstract
type
PathParser <: PathKeyParser[PathKey]
- Definition Classes
- Resource
Abstract Value Members
- abstract val application: Application
- abstract def keyFormat: KeyFormat[KeyType]
-
abstract
val
parentResource: ParentResource
A references to the parent resource (used to construct the path key parser).
A references to the parent resource (used to construct the path key parser).
Must be implemented in the resources that this trait is mixed into, typically with a val param.
class MyNestedResource @Inject() ( val parentResource: MyParentResource) extends CollectionResource[KeyType, ElemType] with NestedCollection[MyParentResource, KeyType] { // ... }
- Attributes
- protected[this]
-
implicit abstract
def
resourceFormat: OFormat[M]
- Definition Classes
- Resource
-
abstract
def
resourceName: String
- Definition Classes
- Resource
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
Fields: ResourceFields[M]
- Definition Classes
- Resource
-
def
Nap[RACType, ResponseType]: RestActionBuilder[RACType, Unit, AnyContent, K, M, ResponseType]
Helper to easily construct Naptime actions.
Helper to easily construct Naptime actions.
Typically, all actions in a naptime resource will all use the same auth parser and policy, or will want to use the same error handling function for all requests. These resources should do something similar to the following:
class MyResource extends TopLevelCollectionResource[MyKeyType, MyValueType] { def Rest[RACType, ResponseType] = Nap[RACType, ResponseType].auth(myAuthPolicy).catching(errorFn) ... }
- def OkIfPresent(key: K, maybeElement: Option[M]): RestResponse[Keyed[K, M]]
- def OkIfPresent[T](a: Option[T]): RestResponse[T]
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
implicit
val
executionContext: ExecutionContext
- Attributes
- protected
-
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
-
implicit
val
materializer: Materializer
- Attributes
- protected
-
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()
-
implicit
val
paginationConfiguration: PaginationConfiguration
Provide a default pagination configuration for the resource that users can override and configure as needed.
-
def
resourceVersion: Int
- Definition Classes
- Resource
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- 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( ... )