@groovy.transform.CompileStaticCompileStatic class Metadata extends NavigableMap
Represents the application Metadata and loading mechanics.
Modifiers | Name | Description |
---|---|---|
static class |
Metadata.FinalReference |
Modifiers | Name | Description |
---|---|---|
static java.lang.String |
APPLICATION_GRAILS_VERSION |
|
static java.lang.String |
APPLICATION_NAME |
|
static java.lang.String |
APPLICATION_VERSION |
|
static java.lang.String |
BUILD_INFO_FILE |
|
static java.lang.String |
DEFAULT_SERVLET_VERSION |
|
static java.lang.String |
FILE |
|
static java.lang.String |
SERVLET_VERSION |
|
static java.lang.String |
WAR_DEPLOYED |
Type | Name and description |
---|---|
java.lang.String |
servletVersion |
Constructor and description |
---|
Metadata
() |
Type Params | Return Type | Name and description |
---|---|---|
|
java.lang.String |
getApplicationName()
|
|
java.lang.String |
getApplicationVersion()
|
|
static Metadata |
getCurrent()
|
|
java.lang.String |
getEnvironment()
|
|
java.lang.String |
getGrailsVersion()
|
|
static Metadata |
getInstance(InputStream inputStream) Loads a Metadata instance from a Reader
|
|
static Metadata |
getInstance(File file) Loads and returns a new Metadata object for the given File. |
|
static Metadata |
getInstance(Resource file) Loads and returns a new Metadata object for the given File. |
|
Resource |
getMetadataFile() |
<T> |
T |
getProperty(java.lang.String key, java.lang.Class targetType) |
<T> |
T |
getProperty(java.lang.String key, java.lang.Class targetType, T defaultValue) |
<T> |
T |
getRequiredProperty(java.lang.String key, java.lang.Class targetType) |
|
java.lang.String |
getServletVersion()
|
|
java.lang.Object |
getSource()
|
|
boolean |
isDevelopmentEnvironmentAvailable()
|
|
boolean |
isWarDeployed()
|
|
Iterator |
iterator() |
|
static Metadata |
reload() Reloads the application metadata. |
|
static void |
reset() Resets the current state of the Metadata so it is re-read. |
|
void |
setServletVersion(java.lang.String servletVersion) |
Methods inherited from class | Name |
---|---|
class NavigableMap |
clear, clone, containsKey, containsValue, entrySet, equals, get, getAt, getProperty, hashCode, isEmpty, keySet, merge, mergeMapEntry, mergeMapEntry, navigate, navigateSubMap, put, putAll, remove, setAt, setProperty, size, toFlatConfig, toProperties, toString, values |
Loads a Metadata instance from a Reader
inputStream
- The InputStreamLoads and returns a new Metadata object for the given File.
file
- The FileLoads and returns a new Metadata object for the given File.
file
- The File
Reloads the application metadata.
Resets the current state of the Metadata so it is re-read.