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.

    Access the current Play application
    import play.api.Play.current
    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 cache

    Contains the Cache access API.

    Contains the Cache access API.

    Definition Classes
    api
  • package controllers
    Definition Classes
    api
  • package data

    Contains data manipulation helpers (typically HTTP form handling)

    Contains data manipulation helpers (typically HTTP form handling)

    import play.api.data._
    import play.api.data.Forms._
    
    val taskForm = Form(
      tuple(
        "name" -> text(minLength = 3),
        "dueDate" -> date("yyyy-MM-dd"),
        "done" -> boolean
      )
    )
    Definition Classes
    api
  • package db

    Contains the JDBC database access API.

    Contains the JDBC database access API.

    Example, retrieving a connection from the 'customers' datasource:

    val conn = db.getConnection("customers")
    Definition Classes
    api
  • package evolutions
  • package slick
  • BoneCPComponents
  • BoneCPModule
  • BoneConnectionPool
  • ConnectionPool
  • DBApi
  • DBApiProvider
  • DBComponents
  • DBModule
  • Database
  • DatabaseConfig
  • Databases
  • DefaultDBApi
  • DefaultDatabase
  • HikariCPComponents
  • HikariCPConnectionPool
  • HikariCPModule
  • NamedDatabaseProvider
  • PooledDatabase
  • package http

    Contains standard HTTP constants.

    Contains standard HTTP constants. For example:

    val text = ContentTypes.TEXT
    val ok = Status.OK
    val accept = HeaderNames.ACCEPT
    Definition Classes
    api
  • package i18n

    Contains the internationalisation API.

    Contains the internationalisation API.

    For example, translating a message:

    val msgString = Messages("items.found", items.size)
    Definition Classes
    api
  • package inject

    Play's runtime dependency injection abstraction.

    Play's runtime dependency injection abstraction.

    Play's runtime dependency injection support is built on JSR-330, which provides a specification for declaring how dependencies get wired to components. JSR-330 however does not address how components are provided to or located by a DI container. Play's API seeks to address this in a DI container agnostic way.

    The reason for providing this abstraction is so that Play, the modules it provides, and third party modules can all express their bindings in a way that is not specific to any one DI container.

    Components are bound in the DI container. Each binding is identified by a BindingKey, which is typically an interface that the component implements, and may be optionally qualified by a JSR-330 qualifier annotation. A binding key is bound to a BindingTarget, which describes how the implementation of the interface that the binding key represents is constructed or provided. Bindings may also be scoped using JSR-330 scope annotations.

    Bindings are provided by instances of Module.

    Out of the box, Play provides an implementation of this abstraction using Guice.

    Definition Classes
    api
    See also

    The Module class for information on how to provide bindings.

  • 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 mvc

    Contains the Controller/Action/Result API to handle HTTP requests.

    Contains the Controller/Action/Result API to handle HTTP requests.

    For example, a typical controller:

    class HomeController @Inject() (val controllerComponents: ControllerComponents) extends BaseController {
    
      def index = Action {
        Ok("It works!")
      }
    
    }
    Definition Classes
    api
  • package routing
    Definition Classes
    api
  • package templates
    Definition Classes
    api
  • package test

    Contains test helpers.

    Contains test helpers.

    Definition Classes
    api

package db

Contains the JDBC database access API.

Example, retrieving a connection from the 'customers' datasource:

val conn = db.getConnection("customers")
Source
package.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. db
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. trait BoneCPComponents extends AnyRef

    BoneCP components (for compile-time injection).

  2. class BoneCPModule extends SimpleModule

    BoneCP runtime inject module.

  3. class BoneConnectionPool extends ConnectionPool

    BoneCP implementation of connection pool interface.

    BoneCP implementation of connection pool interface.

    Annotations
    @Singleton()
  4. trait ConnectionPool extends AnyRef

    Connection pool API for managing data sources.

  5. trait DBApi extends AnyRef

    DB API for managing application databases.

  6. class DBApiProvider extends Provider[DBApi]

    Inject provider for DB implementation of DB API.

    Inject provider for DB implementation of DB API.

    Annotations
    @Singleton()
  7. trait DBComponents extends AnyRef

    DB components (for compile-time injection).

  8. final class DBModule extends SimpleModule

    DB runtime inject module.

  9. trait Database extends AnyRef

    Database API.

  10. case class DatabaseConfig(driver: Option[String], url: Option[String], username: Option[String], password: Option[String], jndiName: Option[String]) extends Product with Serializable

    The generic database configuration.

    The generic database configuration.

    driver

    The driver

    url

    The jdbc URL

    username

    The username

    password

    The password

    jndiName

    The JNDI name

  11. class DefaultDBApi extends DBApi

    Default implementation of the DB API.

  12. abstract class DefaultDatabase extends Database

    Default implementation of the database API.

    Default implementation of the database API. Provides driver registration and connection methods.

  13. trait HikariCPComponents extends AnyRef

    HikariCP components (for compile-time injection).

  14. class HikariCPConnectionPool extends ConnectionPool
    Annotations
    @Singleton()
  15. class HikariCPModule extends SimpleModule

    HikariCP runtime inject module.

  16. type NamedDatabase = db.NamedDatabase
  17. class NamedDatabaseProvider extends Provider[Database]

    Inject provider for named databases.

  18. class PooledDatabase extends DefaultDatabase

    Default implementation of the database API using a connection pool.

Value Members

  1. object BoneConnectionPool
  2. object ConnectionPool
  3. object DatabaseConfig extends Serializable
  4. object Databases

    Creation helpers for manually instantiating databases.

  5. object DefaultDBApi
  6. object HikariCPConnectionPool

Inherited from AnyRef

Inherited from Any

Ungrouped