Packages

  • package root
    Definition Classes
    root
  • package play

    Play framework.

    Play framework.

    Play

    http://www.playframework.com

    Definition Classes
    root
  • package api

    Contains the public API for Scala developers.

    Contains the public API for Scala developers.

    Read configuration
    val poolSize = configuration.getInt("engine.pool.size")
    Use the logger
    Logger.info("Hello!")
    Define a Plugin
    class MyPlugin(app: Application) extends Plugin
    Create adhoc applications (for testing)
    val application = Application(new File("."), this.getClass.getClassloader, None, Play.Mode.DEV)
    Definition Classes
    play
  • package libs

    Contains various APIs that are useful while developing web applications.

    Contains various APIs that are useful while developing web applications.

    Definition Classes
    api
  • package concurrent
    Definition Classes
    libs
  • package crypto
    Definition Classes
    libs
  • package functional
    Definition Classes
    libs
  • package jcache
    Definition Classes
    libs
  • package json

    Json API

    Json API

    For example:

    import play.api.libs.json._
    import play.api.libs.functional.syntax._
    
    case class User(id: Long, name: String, friends: Seq[User] = Seq.empty)
    object User {
    
      // In this format, an undefined friends property is mapped to an empty list
      implicit val format: Format[User] = (
        (__ \ "id").format[Long] and
        (__ \ "name").format[String] and
        (__ \ "friends").lazyFormatNullable(implicitly[Format[Seq[User]]])
          .inmap[Seq[User]](_ getOrElse Seq.empty, Some(_))
      )(User.apply, unlift(User.unapply))
    }
    
    object MyController extends play.api.mvc.Controller {
       def displayUserAsJson(id: String) = Action {
          Ok(Json.toJson(User(id.toLong, "myName")))
       }
    
       def saveUser(jsonString: String)= Action {
         val user = Json.parse(jsonString).as[User]
         //myDataStore.save(user)
         Ok
       }
    }
    Definition Classes
    libs
  • package logback
    Definition Classes
    libs
  • package openid
    Definition Classes
    libs
  • package streams
    Definition Classes
    libs
  • package typedmap
    Definition Classes
    libs
  • TypedEntry
  • TypedKey
  • TypedMap
  • package ws

    Provides implicit type classes when you import the package.

    Provides implicit type classes when you import the package.

    Definition Classes
    libs
p

play.api.libs

typedmap

package typedmap

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. Protected

Type Members

  1. final case class TypedEntry[A](key: TypedKey[A], value: A) extends Product with Serializable

    An entry that binds a typed key and a value.

    An entry that binds a typed key and a value. These entries can be placed into a TypedMap or any other type of object with typed values.

    A

    The type of the value.

    key

    The key for this entry.

    value

    The value for this entry.

  2. final class TypedKey[A] extends AnyRef

    A TypedKey is a key that can be used to get and set values in a TypedMap or any object with typed keys.

    A TypedKey is a key that can be used to get and set values in a TypedMap or any object with typed keys. This class uses reference equality for comparisons, so each new instance is different key.

    A

    The type of values associated with this key.

  3. trait TypedMap extends AnyRef

    A TypedMap is an immutable map containing typed values.

    A TypedMap is an immutable map containing typed values. Each entry is associated with a TypedKey that can be used to look up the value. A TypedKey also defines the type of the value, e.g. a TypedKey[String] would be associated with a String value.

    Instances of this class are created with the TypedMap.empty method.

    The elements inside TypedMaps cannot be enumerated. This is a decision designed to enforce modularity. It's not possible to accidentally or intentionally access a value in a TypedMap without holding the corresponding TypedKey.

Value Members

  1. object TypedKey

    Helper for working with TypedKeys.

  2. object TypedMap

Ungrouped