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".
- Alphabetic
- By Inheritance
- Props
- Props
- Logger
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- type InterpolationValues = Map[String, String]
- Definition Classes
- Props
- type PropProvider = Map[String, String]
- Definition Classes
- Props
- class RunModeProperty[T] extends Logger
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
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def _logger: Logger
- Attributes
- protected
- Definition Classes
- Logger
- def appendInterpolationValues(interpolationValues: InterpolationValues): Seq[InterpolationValues]
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!
- def appendProvider(provider: PropProvider): List[PropProvider]
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!
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def assertLog(assertion: Boolean, msg: => String): Unit
- Definition Classes
- Logger
- val autoDetectRunModeFn: RunModeProperty[() => Props.RunModes.Value]
When the
run.modeenvironment variable isn't set or recognised, this function is invoked to determine the appropriate mode to use.When the
run.modeenvironment variable isn't set or recognised, this function is invoked to determine the appropriate mode to use.This logic can be customised by calling
setbefore 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
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def debug(msg: => AnyRef, t: Throwable, marker: Marker): Unit
- Definition Classes
- Logger
- def debug(msg: => AnyRef, marker: Marker): Unit
- Definition Classes
- Logger
- def debug(msg: => AnyRef, t: Throwable): Unit
- Definition Classes
- Logger
- def debug(msg: => AnyRef): Unit
- Definition Classes
- Logger
- def debug(msg: => AnyRef, box: Box[_]): Unit
- Definition Classes
- Logger
- lazy val devMode: Boolean
Is the system running in development mode
Is the system running in development mode
- Definition Classes
- Props
- val doesStackTraceContainKnownTestRunner: RunModeProperty[(Array[StackTraceElement]) => Boolean]
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
setbefore 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
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def error(msg: => AnyRef, t: Throwable, marker: Marker): Unit
- Definition Classes
- Logger
- def error(msg: => AnyRef, marker: Marker): Unit
- Definition Classes
- Logger
- def error(msg: => AnyRef, t: Throwable): Unit
- Definition Classes
- Logger
- def error(msg: => AnyRef): Unit
- Definition Classes
- Logger
- def error(msg: => AnyRef, box: Box[_]): Unit
- Definition Classes
- Logger
- val fileName: String
- Definition Classes
- Props
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def get(name: String, defVal: String): String
- Definition Classes
- Props
- def get(name: String): Box[String]
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
- def getBool(name: String, defVal: Boolean): Boolean
- Definition Classes
- Props
- def getBool(name: String): Box[Boolean]
- Definition Classes
- Props
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getInt(name: String, defVal: Int): Int
- Definition Classes
- Props
- def getInt(name: String): Box[Int]
- Definition Classes
- Props
- def getLong(name: String, defVal: Long): Long
- Definition Classes
- Props
- def getLong(name: String): Box[Long]
- Definition Classes
- Props
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- lazy val hostName: String
The resource path segment corresponding to the system hostname.
The resource path segment corresponding to the system hostname.
- Definition Classes
- Props
- lazy val inGAE: Boolean
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
- def info(msg: => AnyRef, t: Throwable, marker: Marker): Unit
- Definition Classes
- Logger
- def info(msg: => AnyRef, marker: Marker): Unit
- Definition Classes
- Logger
- def info(msg: => AnyRef, t: => Throwable): Unit
- Definition Classes
- Logger
- def info(msg: => AnyRef): Unit
- Definition Classes
- Logger
- def info(msg: => AnyRef, box: Box[_]): Unit
- Definition Classes
- Logger
- def isDebugEnabled: Boolean
- Definition Classes
- Logger
- def isErrorEnabled: Boolean
- Definition Classes
- Logger
- def isInfoEnabled: Boolean
- Definition Classes
- Logger
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isTraceEnabled: Boolean
- Definition Classes
- Logger
- def isWarnEnabled: Boolean
- Definition Classes
- Logger
- lazy val mode: Props.RunModes.Value
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
- lazy val modeName: String
The resource path segment corresponding to the current mode.
The resource path segment corresponding to the current mode.
- Definition Classes
- Props
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def prependProvider(provider: PropProvider): List[PropProvider]
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!
- lazy val productionMode: Boolean
Is the system running in production mode (apply full optimizations)
Is the system running in production mode (apply full optimizations)
- Definition Classes
- Props
- val propFileName: String
- Definition Classes
- Props
- lazy val props: Map[String, String]
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
- def require(what: String*): Seq[String]
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
- def requireOrDie(what: String*): Unit
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
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- lazy val testMode: Boolean
Is the system running in test mode
Is the system running in test mode
- Definition Classes
- Props
- def toString(): String
- Definition Classes
- AnyRef → Any
- lazy val toTry: List[() => String]
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
- def trace(msg: => AnyRef, t: Throwable, marker: => Marker): Unit
- Definition Classes
- Logger
- def trace(msg: => AnyRef, marker: Marker): Unit
- Definition Classes
- Logger
- def trace(msg: => AnyRef, t: Throwable): Unit
- Definition Classes
- Logger
- def trace(msg: => AnyRef): Unit
- Definition Classes
- Logger
- def trace(msg: => AnyRef, box: Box[_]): Unit
- Definition Classes
- Logger
- def trace[T](msg: String, v: T): T
- Definition Classes
- Logger
- def updateInterpolationValues(updater: (List[InterpolationValues]) => List[InterpolationValues]): List[InterpolationValues]
Passes the current
InterpolationValuess to the passedupdater, then sets the providers to the result of the updater.Passes the current
InterpolationValuess to the passedupdater, then sets the providers to the result of the updater. Consider usingappendInterpolationValuesinstead.- 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!
- def updateProviders(updater: (List[PropProvider]) => List[PropProvider]): List[PropProvider]
Passes the current
PropProviders to the passedupdater, then sets the providers to the result of the updater.Passes the current
PropProviders to the passedupdater, then sets the providers to the result of the updater. Consider usingappendProviderorprependProviderinstead.- 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!
- lazy val userName: String
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
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- def warn(msg: => AnyRef, t: Throwable, marker: Marker): Unit
- Definition Classes
- Logger
- def warn(msg: => AnyRef, marker: Marker): Unit
- Definition Classes
- Logger
- def warn(msg: => AnyRef, t: Throwable): Unit
- Definition Classes
- Logger
- def warn(msg: => AnyRef): Unit
- Definition Classes
- Logger
- def warn(msg: => AnyRef, box: Box[_]): Unit
- Definition Classes
- Logger
- val whereToLook: () => List[(String, () => Box[InputStream])]
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
- Annotations
- @volatile()
- object RunModes extends Enumeration
Enumeration of available run modes.