|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.Dictionary java.util.Hashtable java.util.Properties grails.util.Metadata
public class Metadata extends java.util.Properties
Represents the application Metadata and loading mechanics.
Field Summary | |
---|---|
static java.lang.String |
APPLICATION_GRAILS_VERSION
|
static java.lang.String |
APPLICATION_NAME
|
static java.lang.String |
APPLICATION_VERSION
|
static java.lang.String |
DEFAULT_SERVLET_VERSION
|
static java.lang.String |
FILE
|
static java.lang.String |
SERVLET_VERSION
|
static java.lang.String |
WAR_DEPLOYED
|
Method Summary | |
---|---|
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 |
java.util.Map
|
getInstalledPlugins()
Obtains a map (name->version) of installed plugins specified in the project metadata |
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. |
java.io.File
|
getMetadataFile()
|
java.lang.String
|
getServletVersion()
@return The version of the servlet spec the application was created for |
boolean
|
isWarDeployed()
@return true if this application is deployed as a WAR |
java.util.Enumeration
|
keys()
Overrides, called by the store method. |
void
|
persist()
Saves the current state of the Metadata object. |
boolean
|
propertiesHaveNotChanged()
@return Returns true if these properties have not changed since they were loaded |
static Metadata
|
reload()
Reloads the application metadata. |
static void
|
reset()
Resets the current state of the Metadata so it is re-read. |
Methods inherited from class java.util.Properties | |
---|---|
java.util.Properties#setProperty(java.lang.String, java.lang.String), java.util.Properties#getProperty(java.lang.String, java.lang.String), java.util.Properties#getProperty(java.lang.String), java.util.Properties#load(java.io.Reader), java.util.Properties#load(java.io.InputStream), java.util.Properties#list(java.io.PrintWriter), java.util.Properties#list(java.io.PrintStream), java.util.Properties#save(java.io.OutputStream, java.lang.String), java.util.Properties#store(java.io.OutputStream, java.lang.String), java.util.Properties#store(java.io.Writer, java.lang.String), java.util.Properties#loadFromXML(java.io.InputStream), java.util.Properties#storeToXML(java.io.OutputStream, java.lang.String), java.util.Properties#storeToXML(java.io.OutputStream, java.lang.String, java.lang.String), java.util.Properties#propertyNames(), java.util.Properties#stringPropertyNames(), java.util.Properties#remove(java.lang.Object), java.util.Properties#get(java.lang.Object), java.util.Properties#put(java.lang.Object, java.lang.Object), java.util.Properties#equals(java.lang.Object), java.util.Properties#toString(), java.util.Properties#values(), java.util.Properties#hashCode(), java.util.Properties#clone(), java.util.Properties#clear(), java.util.Properties#isEmpty(), java.util.Properties#contains(java.lang.Object), java.util.Properties#size(), java.util.Properties#entrySet(), java.util.Properties#putAll(java.util.Map), java.util.Properties#elements(), java.util.Properties#keys(), java.util.Properties#keySet(), java.util.Properties#containsValue(java.lang.Object), java.util.Properties#containsKey(java.lang.Object), java.util.Properties#wait(), java.util.Properties#wait(long, int), java.util.Properties#wait(long), java.util.Properties#getClass(), java.util.Properties#notify(), java.util.Properties#notifyAll() |
Methods inherited from class java.util.Hashtable | |
---|---|
java.util.Hashtable#remove(java.lang.Object), java.util.Hashtable#get(java.lang.Object), java.util.Hashtable#put(java.lang.Object, java.lang.Object), java.util.Hashtable#equals(java.lang.Object), java.util.Hashtable#toString(), java.util.Hashtable#values(), java.util.Hashtable#hashCode(), java.util.Hashtable#clone(), java.util.Hashtable#clear(), java.util.Hashtable#isEmpty(), java.util.Hashtable#contains(java.lang.Object), java.util.Hashtable#size(), java.util.Hashtable#entrySet(), java.util.Hashtable#putAll(java.util.Map), java.util.Hashtable#elements(), java.util.Hashtable#keys(), java.util.Hashtable#keySet(), java.util.Hashtable#containsValue(java.lang.Object), java.util.Hashtable#containsKey(java.lang.Object), java.util.Hashtable#wait(), java.util.Hashtable#wait(long, int), java.util.Hashtable#wait(long), java.util.Hashtable#getClass(), java.util.Hashtable#notify(), java.util.Hashtable#notifyAll() |
Field Detail |
---|
public static final java.lang.String APPLICATION_GRAILS_VERSION
public static final java.lang.String APPLICATION_NAME
public static final java.lang.String APPLICATION_VERSION
public static final java.lang.String DEFAULT_SERVLET_VERSION
public static final java.lang.String FILE
public static final java.lang.String SERVLET_VERSION
public static final java.lang.String WAR_DEPLOYED
Method Detail |
---|
public java.lang.String getApplicationName()
public java.lang.String getApplicationVersion()
public static Metadata getCurrent()
public java.lang.String getEnvironment()
public java.lang.String getGrailsVersion()
public java.util.Map getInstalledPlugins()
public static Metadata getInstance(java.io.InputStream inputStream)
inputStream
- The InputStream
public static Metadata getInstance(java.io.File file)
file
- The File
public java.io.File getMetadataFile()
public java.lang.String getServletVersion()
public boolean isWarDeployed()
@Override @SuppressWarnings({"unchecked","rawtypes"}) public java.util.Enumeration keys()
public void persist()
public boolean propertiesHaveNotChanged()
public static Metadata reload()
public static void reset()
Groovy Documentation