Object

play.api

Play

Related Doc: package api

Permalink

object Play

See also

compare-to-play.md 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. Play
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def application(implicit app: Application): Application

    Permalink

    Returns the current application.

  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def classloader(implicit app: Application): ClassLoader

    Permalink

    Returns the current application classloader.

  7. def clone(): AnyRef

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

    Permalink

    Returns the current application configuration.

  9. implicit def current: Application

    Permalink

    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.

  10. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. final def getClass(): Class[_]

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

    Permalink

    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

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

    Permalink

    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

  16. def hashCode(): Int

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

    Permalink

    Returns true if the current application is DEV mode.

  18. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  19. def isProd(implicit app: Application): Boolean

    Permalink

    Returns true if the current application is PROD mode.

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

    Permalink

    Returns true if the current application is TEST mode.

  21. def maybeApplication: Option[Application]

    Permalink

    Optionally returns the current running application.

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

    Permalink

    Returns the current application mode.

  23. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  24. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  25. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  26. def resource(name: String)(implicit app: Application): Option[URL]

    Permalink

    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

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

    Permalink

    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.

  28. def start(app: Application): Unit

    Permalink

    Starts this application.

    Starts this application.

    app

    the application to start

  29. def stop(app: Application): Unit

    Permalink

    Stops the given application.

  30. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  31. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  32. def unsafeApplication: Application

    Permalink

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

  33. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped