Object

net.liftweb.util

Props

Related Doc: package util

Permalink

object Props extends Props

Configuration management utilities.

If you want to provide a configuration file for a subset of your application or for a specific environment, Lift expects configuration files to be named in a manner relating to the context in which they are being used. The standard name format is:

$modeName.$userName.$hostName.$props

examples:
dpp.yak.props
test.dpp.yak.props
production.moose.props
staging.dpp.props
test.default.props
default.props

with hostName and userName being optional, and modeName being one of "test", "staging", "production", "pilot", "profile", or "default". The standard Lift properties file extension is "props".

Linear Supertypes
Props, Logger, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Props
  2. Props
  3. Logger
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Type Members

  1. type InterpolationValues = Map[String, String]

    Permalink
    Definition Classes
    Props
  2. type PropProvider = Map[String, String]

    Permalink
    Definition Classes
    Props
  3. class RunModeProperty[T] extends Logger

    Permalink

    Exposes a property affecting run-mode determination, for customisation.

    Exposes a property affecting run-mode determination, for customisation. If the property is modified after the run-mode is realised, then it will have no effect and will instead log a warning indicating thus.

    Definition Classes
    Props

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. object RunModes extends Enumeration

    Permalink

    Enumeration of available run modes.

  5. def _logger: Logger

    Permalink
    Attributes
    protected
    Definition Classes
    Logger
  6. def appendInterpolationValues(interpolationValues: InterpolationValues): Seq[InterpolationValues]

    Permalink

    Updates Props to find values in the argument when interpolating values found in providers.

    Updates Props to find values in the argument when interpolating values found in providers.

    Definition Classes
    Props
    Note

    You can only modify these BEFORE you look up any props!

  7. def appendProvider(provider: PropProvider): List[PropProvider]

    Permalink

    Updates Props to find property values in the argument AFTER first looking in the standard Lift prop files.

    Updates Props to find property values in the argument AFTER first looking in the standard Lift prop files.

    provider

    Arbitrary map of property key -> property value.

    Definition Classes
    Props
    Note

    You can only modify these BEFORE you look up any props!

  8. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  9. def assertLog(assertion: Boolean, msg: ⇒ String): Unit

    Permalink
    Definition Classes
    Logger
  10. val autoDetectRunModeFn: RunModeProperty[() ⇒ Props.RunModes.Value]

    Permalink

    When the run.mode environment variable isn't set or recognised, this function is invoked to determine the appropriate mode to use.

    When the run.mode environment variable isn't set or recognised, this function is invoked to determine the appropriate mode to use.

    This logic can be customised by calling set before the run-mode is referenced. (An attempt to customise this after the run-mode is realised will have no effect and will instead log a warning.)

    Definition Classes
    Props
  11. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  12. def debug(msg: ⇒ AnyRef, t: Throwable, marker: Marker): Unit

    Permalink
    Definition Classes
    Logger
  13. def debug(msg: ⇒ AnyRef, marker: Marker): Unit

    Permalink
    Definition Classes
    Logger
  14. def debug(msg: ⇒ AnyRef, t: Throwable): Unit

    Permalink
    Definition Classes
    Logger
  15. def debug(msg: ⇒ AnyRef): Unit

    Permalink
    Definition Classes
    Logger
  16. def debug(msg: ⇒ AnyRef, box: Box[_]): Unit

    Permalink

    Debug a Failure.

    Debug a Failure. If the log level is debug and the Box is a Failure, debug the message concatenated with the Failure's message. If the Failure contains an Exception, debug that as well.

    Definition Classes
    Logger
  17. lazy val devMode: Boolean

    Permalink

    Is the system running in development mode

    Is the system running in development mode

    Definition Classes
    Props
  18. val doesStackTraceContainKnownTestRunner: RunModeProperty[(Array[StackTraceElement]) ⇒ Boolean]

    Permalink

    The default run-mode auto-detection routine uses this function to infer whether Lift is being run in a test.

    The default run-mode auto-detection routine uses this function to infer whether Lift is being run in a test.

    This routine can be customised by calling set before the run-mode is referenced. (An attempt to customise this after the run-mode is realised will have no effect and will instead log a warning.)

    Definition Classes
    Props
  19. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  21. def error(msg: ⇒ AnyRef, t: Throwable, marker: Marker): Unit

    Permalink
    Definition Classes
    Logger
  22. def error(msg: ⇒ AnyRef, marker: Marker): Unit

    Permalink
    Definition Classes
    Logger
  23. def error(msg: ⇒ AnyRef, t: Throwable): Unit

    Permalink
    Definition Classes
    Logger
  24. def error(msg: ⇒ AnyRef): Unit

    Permalink
    Definition Classes
    Logger
  25. def error(msg: ⇒ AnyRef, box: Box[_]): Unit

    Permalink

    Error a Failure.

    Error a Failure. If the log level is error and the Box is a Failure, error the message concatenated with the Failure's message. If the Failure contains an Exception, error that as well.

    Definition Classes
    Logger
  26. val fileName: String

    Permalink
    Definition Classes
    Props
  27. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  28. def get(name: String, defVal: String): String

    Permalink
    Definition Classes
    Props
  29. def get(name: String): Box[String]

    Permalink

    Get the configuration property value for the specified key.

    Get the configuration property value for the specified key.

    name

    key for the property to get

    returns

    the value of the property if defined

    Definition Classes
    Props
  30. def getBool(name: String, defVal: Boolean): Boolean

    Permalink
    Definition Classes
    Props
  31. def getBool(name: String): Box[Boolean]

    Permalink
    Definition Classes
    Props
  32. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  33. def getInt(name: String, defVal: Int): Int

    Permalink
    Definition Classes
    Props
  34. def getInt(name: String): Box[Int]

    Permalink
    Definition Classes
    Props
  35. def getLong(name: String, defVal: Long): Long

    Permalink
    Definition Classes
    Props
  36. def getLong(name: String): Box[Long]

    Permalink
    Definition Classes
    Props
  37. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  38. lazy val hostName: String

    Permalink

    The resource path segment corresponding to the system hostname.

    The resource path segment corresponding to the system hostname.

    Definition Classes
    Props
  39. lazy val inGAE: Boolean

    Permalink

    Is the app running in the Google App engine (the System property in.gae.j is set)

    Is the app running in the Google App engine (the System property in.gae.j is set)

    Definition Classes
    Props
  40. def info(msg: ⇒ AnyRef, t: Throwable, marker: Marker): Unit

    Permalink
    Definition Classes
    Logger
  41. def info(msg: ⇒ AnyRef, marker: Marker): Unit

    Permalink
    Definition Classes
    Logger
  42. def info(msg: ⇒ AnyRef, t: ⇒ Throwable): Unit

    Permalink
    Definition Classes
    Logger
  43. def info(msg: ⇒ AnyRef): Unit

    Permalink
    Definition Classes
    Logger
  44. def info(msg: ⇒ AnyRef, box: Box[_]): Unit

    Permalink

    Info a Failure.

    Info a Failure. If the log level is info and the Box is a Failure, info the message concatenated with the Failure's message. If the Failure contains an Exception, info that as well.

    Definition Classes
    Logger
  45. def isDebugEnabled: Boolean

    Permalink
    Definition Classes
    Logger
  46. def isErrorEnabled: Boolean

    Permalink
    Definition Classes
    Logger
  47. def isInfoEnabled: Boolean

    Permalink
    Definition Classes
    Logger
  48. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  49. def isTraceEnabled: Boolean

    Permalink
    Definition Classes
    Logger
  50. def isWarnEnabled: Boolean

    Permalink
    Definition Classes
    Logger
  51. lazy val mode: Props.RunModes.Value

    Permalink

    The mode for which to retrieve properties, retrieved by System.getProperty("run.mode").

    The mode for which to retrieve properties, retrieved by System.getProperty("run.mode"). Recognized modes are "development", "test", "profile", "pilot", "staging" and "production" with the default run mode being development.

    Definition Classes
    Props
  52. lazy val modeName: String

    Permalink

    The resource path segment corresponding to the current mode.

    The resource path segment corresponding to the current mode.

    Definition Classes
    Props
  53. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  56. def prependProvider(provider: PropProvider): List[PropProvider]

    Permalink

    Updates Props to find property values in the argument BEFORE looking in the standard Lift prop files.

    Updates Props to find property values in the argument BEFORE looking in the standard Lift prop files.

    provider

    Arbitrary map of property key -> property value to be used for property lookup.

    Definition Classes
    Props
    Note

    You can only modify these BEFORE you look up any props!

  57. lazy val productionMode: Boolean

    Permalink

    Is the system running in production mode (apply full optimizations)

    Is the system running in production mode (apply full optimizations)

    Definition Classes
    Props
  58. val propFileName: String

    Permalink
    Definition Classes
    Props
  59. lazy val props: Map[String, String]

    Permalink

    The map of key/value pairs retrieved from the property file.

    The map of key/value pairs retrieved from the property file.

    Definition Classes
    Props
  60. def require(what: String*): Seq[String]

    Permalink

    Determine whether the specified properties exist.

    Determine whether the specified properties exist.

    what

    the properties to test

    returns

    the subset of strings in 'what' that do not correspond to keys for available properties.

    Definition Classes
    Props
  61. def requireOrDie(what: String*): Unit

    Permalink

    Ensure that all of the specified properties exist; throw an exception if any of the specified values are not keys for available properties.

    Ensure that all of the specified properties exist; throw an exception if any of the specified values are not keys for available properties.

    Definition Classes
    Props
  62. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  63. lazy val testMode: Boolean

    Permalink

    Is the system running in test mode

    Is the system running in test mode

    Definition Classes
    Props
  64. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  65. lazy val toTry: List[() ⇒ String]

    Permalink

    The list of paths to search for property file resources.

    The list of paths to search for property file resources. Properties files may be found at either the classpath root or in /props

    Definition Classes
    Props
  66. def trace(msg: ⇒ AnyRef, t: Throwable, marker: ⇒ Marker): Unit

    Permalink
    Definition Classes
    Logger
  67. def trace(msg: ⇒ AnyRef, marker: Marker): Unit

    Permalink
    Definition Classes
    Logger
  68. def trace(msg: ⇒ AnyRef, t: Throwable): Unit

    Permalink
    Definition Classes
    Logger
  69. def trace(msg: ⇒ AnyRef): Unit

    Permalink
    Definition Classes
    Logger
  70. def trace(msg: ⇒ AnyRef, box: Box[_]): Unit

    Permalink

    Trace a Failure.

    Trace a Failure. If the log level is trace and the Box is a Failure, trace the message concatenated with the Failure's message. If the Failure contains an Exception, trace that as well.

    Definition Classes
    Logger
  71. def trace[T](msg: String, v: T): T

    Permalink

    Log the value of v with trace and return v.

    Log the value of v with trace and return v. Useful for tracing values in expressions

    Definition Classes
    Logger
  72. def updateInterpolationValues(updater: (List[InterpolationValues]) ⇒ List[InterpolationValues]): List[InterpolationValues]

    Permalink

    Passes the current InterpolationValuess to the passed updater, then sets the providers to the result of the updater.

    Passes the current InterpolationValuess to the passed updater, then sets the providers to the result of the updater. Consider using appendInterpolationValues instead.

    updater

    Function that gets the current InterpolationValuess and returns the new ones to use.

    Definition Classes
    Props
    Note

    You can only modify these BEFORE you look up any props!

  73. def updateProviders(updater: (List[PropProvider]) ⇒ List[PropProvider]): List[PropProvider]

    Permalink

    Passes the current PropProviders to the passed updater, then sets the providers to the result of the updater.

    Passes the current PropProviders to the passed updater, then sets the providers to the result of the updater. Consider using appendProvider or prependProvider instead.

    updater

    Function that gets the current PropProviders and returns the new ones to use.

    Definition Classes
    Props
    Note

    You can only modify these BEFORE you look up any props!

  74. lazy val userName: String

    Permalink

    The resource path segment corresponding to the current system user (from System.getProperty("user.name"))

    The resource path segment corresponding to the current system user (from System.getProperty("user.name"))

    Definition Classes
    Props
  75. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  78. def warn(msg: ⇒ AnyRef, t: Throwable, marker: Marker): Unit

    Permalink
    Definition Classes
    Logger
  79. def warn(msg: ⇒ AnyRef, marker: Marker): Unit

    Permalink
    Definition Classes
    Logger
  80. def warn(msg: ⇒ AnyRef, t: Throwable): Unit

    Permalink
    Definition Classes
    Logger
  81. def warn(msg: ⇒ AnyRef): Unit

    Permalink
    Definition Classes
    Logger
  82. def warn(msg: ⇒ AnyRef, box: Box[_]): Unit

    Permalink

    Warn a Failure.

    Warn a Failure. If the log level is warn and the Box is a Failure, warn the message concatenated with the Failure's message. If the Failure contains an Exception, warn that as well.

    Definition Classes
    Logger
  83. var whereToLook: () ⇒ List[(String, () ⇒ Box[InputStream])]

    Permalink

    This is a function that returns the first places to look for a props file.

    This is a function that returns the first places to look for a props file. The function returns a List of String -> () => Box[InputStream]. So, if you want to consult System.getProperties to look for a properties file or some such, you can set the whereToLook function in your Boot.scala file before you call anything else in Props.

    Definition Classes
    Props

Inherited from Props

Inherited from Logger

Inherited from AnyRef

Inherited from Any

Ungrouped