grails.util
Class Metadata
java.lang.Object
java.util.Dictionary<K,V>
java.util.Hashtable<Object,Object>
java.util.Properties
grails.util.Metadata
- All Implemented Interfaces:
- Serializable, Cloneable, Map<Object,Object>
public class Metadata
- extends Properties
Represents the application Metadata and loading mechanics
- Since:
- 1.1
Created: Dec 12, 2008
- Author:
- Graeme Rocher
- See Also:
- Serialized Form
Methods inherited from class java.util.Properties |
getProperty, getProperty, list, list, load, load, loadFromXML, propertyNames, save, setProperty, store, store, storeToXML, storeToXML, stringPropertyNames |
Methods inherited from class java.util.Hashtable |
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values |
FILE
public static final String FILE
- See Also:
- Constant Field Values
APPLICATION_VERSION
public static final String APPLICATION_VERSION
- See Also:
- Constant Field Values
APPLICATION_NAME
public static final String APPLICATION_NAME
- See Also:
- Constant Field Values
APPLICATION_GRAILS_VERSION
public static final String APPLICATION_GRAILS_VERSION
- See Also:
- Constant Field Values
SERVLET_VERSION
public static final String SERVLET_VERSION
- See Also:
- Constant Field Values
WAR_DEPLOYED
public static final String WAR_DEPLOYED
- See Also:
- Constant Field Values
DEFAULT_SERVLET_VERSION
public static final String DEFAULT_SERVLET_VERSION
- See Also:
- Constant Field Values
getCurrent
public static Metadata getCurrent()
- Returns:
- Returns the metadata for the current application
getInstance
public static Metadata getInstance(InputStream inputStream)
- Loads a Metadata instance from a Reader
- Parameters:
inputStream
- The InputStream
- Returns:
- a Metadata instance
getInstance
public static Metadata getInstance(File file)
- Loads and returns a new Metadata object for the given File
- Parameters:
file
- The File
- Returns:
- A Metadata object
reload
public static Metadata reload()
- Reloads the application metadata
- Returns:
- The metadata object
getApplicationVersion
public String getApplicationVersion()
- Returns:
- The application version
getGrailsVersion
public String getGrailsVersion()
- Returns:
- The Grails version used to build the application
getEnvironment
public String getEnvironment()
- Returns:
- The environment the application expects to run in
getApplicationName
public String getApplicationName()
- Returns:
- The application name
getServletVersion
public String getServletVersion()
- Returns:
- The version of the servlet spec the application was created for
persist
public void persist()
- Saves the current state of the Metadata object
isWarDeployed
public boolean isWarDeployed()
- Returns:
- Returns true if this application is deployed as a WAR
Copyright (c) 2005-2009 The Grails project