play

api

package api

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)
Visibility
  1. Public
  2. All

Type Members

  1. class Application extends AnyRef

    A Play application.

  2. case class Configuration (underlying: Config) extends Product with Serializable

    A full configuration set.

  3. class GlobalPlugin extends Plugin

    The Global plugin executes application's globalSettings onStart and onStop.

  4. trait GlobalSettings extends AnyRef

    Defines an application’s global settings.

  5. class Logger extends LoggerLike

    A Play logger.

  6. trait LoggerLike extends AnyRef

    Typical logger interface.

  7. class PlayException extends RuntimeException with UsefulException

    Root exception for all Play problems.

  8. trait Plugin extends AnyRef

    A Play plugin.

  9. case class UnexpectedException (message: Option[String], unexpected: Option[Throwable]) extends PlayException with Product with Serializable

    Generic exception for unexpected error cases.

Value Members

  1. object Configuration extends Serializable

    This object provides a set of operations to create Configuration values.

  2. object DefaultGlobal extends GlobalSettings

    The default global settings if not defined in the application.

  3. object Logger extends LoggerLike

    High-level API for logging operations.

  4. object Mode extends Enumeration

    Application mode, either DEV or PROD.

  5. object Play extends AnyRef

    High-level API to access Play global features.

  6. object PlayException extends Serializable

    Helper for PlayException.

  7. object Routes extends AnyRef

    Helper utilities related to Router.

  8. package cache

    Contains the Cache access API.

  9. package data

    Contains data manipulation helpers (typically HTTP form handling)

  10. package db

    Contains the JDBC database access API.

  11. package http

    Contains standard HTTP constants.

  12. package i18n

    Contains the internationalisation API.

  13. package libs

    Contains various APIs that are useful while developing web applications.

  14. package mvc

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

  15. package templates

    Contains Template adapters for typical Play applications.

  16. package test

    Contains test helpers.