play.api

Play

object Play extends AnyRef

High-level API to access Play global features.

Note that this API depends on a running application. You can import the currently running application in a scope using:

import play.api.Play.current
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. Play
  2. AnyRef
  3. Any
Visibility
  1. Public
  2. All

Value Members

  1. def != (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  2. def != (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  3. def ## (): Int

    Attributes
    final
    Definition Classes
    AnyRef → Any
  4. def == (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  5. def == (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  6. def application (implicit app: Application): Application

    Returns the current application.

  7. def asInstanceOf [T0] : T0

    Attributes
    final
    Definition Classes
    Any
  8. def classloader (implicit app: Application): ClassLoader

    Returns the current application classloader.

  9. def clone (): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  10. def configuration (implicit app: Application): Configuration

    Returns the current application configuration.

  11. implicit def current : Application

    Implicitly import the current running application in the context.

    Implicitly import the current running application in the context.

    Note that by relying on this, your code will only work properly in the context of a running application.

    Attributes
    implicit
  12. def eq (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  13. def equals (arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  14. def finalize (): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  15. def getClass (): java.lang.Class[_]

    Attributes
    final
    Definition Classes
    AnyRef → Any
  16. def getExistingFile (relativePath: String)(implicit app: Application): Option[File]

    Retrieves a file relative to the current application root path.

    Retrieves a file relative to the current application root path.

    For example, to retrieve a configuration file:

    val myConf = application.getExistingFile("conf/myConf.yml")
    
    relativePath

    relative path of the file to fetch

    returns

    an existing file

  17. def getFile (relativePath: String)(implicit app: Application): File

    Retrieves a file relative to the current application root path.

    Retrieves a file relative to the current application root path.

    For example, to retrieve a configuration file:

    val myConf = application.getFile("conf/myConf.yml")
    
    relativePath

    the relative path of the file to fetch

    returns

    a file instance; it is not guaranteed that the file exists

  18. def global (implicit app: Application): GlobalSettings

    Returns the current application global settings.

  19. def hashCode (): Int

    Definition Classes
    AnyRef → Any
  20. def isDev (implicit app: Application): Boolean

    Returns true if the current application is DEV mode.

  21. def isInstanceOf [T0] : Boolean

    Attributes
    final
    Definition Classes
    Any
  22. def isProd (implicit app: Application): Boolean

    Returns true if the current application is PROD mode.

  23. def isTest (implicit app: Application): Boolean

    Returns true if the current application is TEST mode.

  24. def maybeApplication : Option[Application]

    Optionally returns the current running application.

  25. def mode (implicit app: Application): Mode

    Returns the current application mode.

  26. def ne (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  27. def notify (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  28. def notifyAll (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  29. def resource (name: String)(implicit app: Application): Option[URL]

    Scans the current application classloader to retrieve a resource.

    Scans the current application classloader to retrieve a resource.

    For example, to retrieve a configuration file:

    val maybeConf = application.resource("conf/logger.xml")
    
    name

    absolute name of the resource (from the classpath root)

    returns

    the resource URL, if found

  30. def resourceAsStream (name: String)(implicit app: Application): Option[InputStream]

    Scans the current application classloader to retrieve a resources contents as a stream.

    Scans the current application classloader to retrieve a resources contents as a stream.

    For example, to retrieve a configuration file:

    val maybeConf = application.resourceAsStream("conf/logger.xml")
    
    name

    Absolute name of the resource (from the classpath root).

    returns

    Maybe a stream if found.

  31. def routes (implicit app: Application): Option[Routes]

    Returns the current application router.

  32. def start (app: Application): Unit

    Starts this application.

  33. def stop (): Unit

    Stops the current application.

  34. def synchronized [T0] (arg0: ⇒ T0): T0

    Attributes
    final
    Definition Classes
    AnyRef
  35. def toString (): String

    Definition Classes
    AnyRef → Any
  36. def unsafeApplication : Application

    Returns the currently running application, or null if not defined.

  37. def wait (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  38. def wait (arg0: Long, arg1: Int): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  39. def wait (arg0: Long): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from AnyRef

Inherited from Any