@groovy.transform.CompileStatic 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 |
Type Params | Return Type | Name and description |
---|---|---|
|
java.lang.String |
getApplicationName() @return The application name |
|
java.lang.String |
getApplicationVersion() @return The application version |
|
static Metadata |
getCurrent() @return the metadata for the current application |
|
java.lang.String |
getEnvironment() @return The environment the application expects to run in |
|
java.lang.String |
getGrailsVersion() @return The Grails version used to build the application |
|
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() |
<T> |
T |
getProperty(java.lang.String key, java.lang.Class<T> targetType) |
<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() @return The version of the servlet spec the application was created for |
|
java.lang.Object |
getSource() @return The source of the metadata |
|
boolean |
isDevelopmentEnvironmentAvailable() @return True if the development sources are present |
|
boolean |
isWarDeployed() @return true if this application is deployed as a WAR |
|
java.util.Iterator<Map.Entry<java.lang.String, java.lang.Object>> |
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 |
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
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.