|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgrails.util.GrailsUtil
public class GrailsUtil
Grails utility methods for command line and GUI applications
| Constructor Summary | |
|---|---|
GrailsUtil()
|
|
| Method Summary | |
|---|---|
static ApplicationContext |
bootstrapGrailsFromApplication(GrailsApplication application)
Bootstraps Grails with the given GrailsApplication instance |
static ApplicationContext |
bootstrapGrailsFromClassPath()
Bootstraps a Grails application from the current classpath. |
static ApplicationContext |
bootstrapGrailsFromParentContext(ApplicationContext parent)
Bootstraps Grails from the given parent ApplicationContext which should contain a bean definition called "grailsApplication" of type GrailsApplication |
static void |
deprecated(Class clazz,
String methodOrPropName)
Logs warning message about deprecation of specified property or method of some class. |
static void |
deprecated(Class clazz,
String methodOrPropName,
String version)
Logs warning message about deprecation of specified property or method of some class. |
static void |
deprecated(String message)
Logs warning message about some deprecation and code style related hints. |
static String |
getEnvironment()
Retrieves the current execution environment |
static String |
getGrailsVersion()
|
static boolean |
isDevelopmentEnv()
Retrieves whether the current execution environment is the development one |
static void |
warn(String message)
Logs warning message to grails.util.GrailsUtil logger which is turned on in development mode. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GrailsUtil()
| Method Detail |
|---|
public static ApplicationContext bootstrapGrailsFromClassPath()
Bootstraps a Grails application from the current classpath. The method will look for an applicationContext.xml file in the classpath that must contain a bean of type GrailsApplication and id grailsApplication
The method will then bootstrap Grails with the GrailsApplication and load all Grails plug-ins found in the path
public static ApplicationContext bootstrapGrailsFromApplication(GrailsApplication application)
application - The GrailsApplication instance
public static ApplicationContext bootstrapGrailsFromParentContext(ApplicationContext parent)
public static String getEnvironment()
public static boolean isDevelopmentEnv()
public static String getGrailsVersion()
public static void deprecated(Class clazz,
String methodOrPropName)
clazz - A classmethodOrPropName - Name of deprecated property or method
public static void deprecated(Class clazz,
String methodOrPropName,
String version)
clazz - A classmethodOrPropName - Name of deprecated property or methodversion - Version of Grails release in which property or method were deprecatedpublic static void deprecated(String message)
message - Message to displaypublic static void warn(String message)
message - Message to display
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||