@groovy.transform.CompileStatic class Metadata extends java.lang.Object
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_APPLICATION_NAME |
|
static java.lang.String |
DEFAULT_SERVLET_VERSION |
|
static java.lang.String |
FILE |
|
static java.lang.String |
SERVLET_VERSION |
Type | Name and description |
---|---|
java.lang.String |
servletVersion |
Type Params | Return Type | Name and description |
---|---|---|
|
void |
clear() |
|
boolean |
containsKey(java.lang.Object key) |
|
java.lang.Object |
get(java.lang.Object key) |
|
java.lang.String |
getApplicationName()
|
|
java.lang.String |
getApplicationVersion() |
|
static Metadata |
getCurrent()
|
|
java.lang.String |
getEnvironment()
|
|
java.lang.String |
getGrailsVersion()
|
|
static Metadata |
getInstance(java.io.InputStream inputStream) Loads a Metadata instance from a Reader |
|
static Metadata |
getInstance(java.io.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() |
|
java.lang.Object |
getOrDefault(java.lang.Object key, java.lang.Object defaultValue) |
|
java.lang.Object |
getProperty(java.lang.String propertyName) |
<T> |
T |
getProperty(java.lang.String key, java.lang.Class<T> targetType, T defaultValue) |
<T> |
T |
getRequiredProperty(java.lang.String key, java.lang.Class<T> targetType) |
|
java.lang.String |
getServletVersion()
|
|
boolean |
isDevelopmentEnvironmentAvailable()
|
|
boolean |
isWarDeployed()
|
|
java.lang.Object |
navigate(java.lang.String[] path) |
|
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 java.lang.Object |
java.lang.Object#equals(java.lang.Object), java.lang.Object#getClass(), java.lang.Object#hashCode(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#toString(), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int) |
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.