Packages

t

org.coursera.naptime.resources

CollectionResource

trait CollectionResource[ParentResource <: Resource[_], K, M] extends Resource[M]

Defines methods that collection resources can implement

Linear Supertypes
Resource[M], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CollectionResource
  2. Resource
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. type AncestorKeys = ParentResource.PathKey

    The (Hlist-like) collection of ancestor keys has this type.

  2. type KeyType = K
  3. abstract type OptPathKey <: :::[Option[KeyType], ParentResource.PathKey]
  4. 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
    CollectionResourceResource
  5. abstract type PathParser <: PathKeyParser[PathKey]
    Definition Classes
    Resource

Abstract Value Members

  1. implicit abstract val executionContext: ExecutionContext
    Attributes
    protected
  2. abstract def keyFormat: KeyFormat[KeyType]
  3. implicit abstract val materializer: Materializer
    Attributes
    protected
  4. 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]
  5. implicit abstract def resourceFormat: OFormat[M]
    Definition Classes
    Resource
  6. abstract def resourceName: String
    Definition Classes
    Resource

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def Fields: Fields[M]
    Definition Classes
    Resource
  5. 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)
    
    ...
    }
  6. def OkIfPresent(key: K, maybeElement: Option[M]): RestResponse[Keyed[K, M]]
  7. def OkIfPresent[T](a: Option[T]): RestResponse[T]
  8. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  9. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  12. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  14. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  15. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  16. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  18. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. implicit val paginationConfiguration: PaginationConfiguration

    Provide a default pagination configuration for the resource that users can override and configure as needed.

  20. def resourceVersion: Int
    Definition Classes
    Resource
  21. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  22. def toString(): String
    Definition Classes
    AnyRef → Any
  23. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from Resource[M]

Inherited from AnyRef

Inherited from Any

Ungrouped