Package org.alfresco.util
Class ApplicationContextHelper
- java.lang.Object
-
- org.alfresco.util.BaseApplicationContextHelper
-
- org.alfresco.util.ApplicationContextHelper
-
public class ApplicationContextHelper extends org.alfresco.util.BaseApplicationContextHelperHelper class to provide static and common access to the Springapplication context.- Author:
- Derek Hulley
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String[]CONFIG_LOCATIONSlocation of required configuration files
-
Constructor Summary
Constructors Constructor Description ApplicationContextHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.springframework.context.ApplicationContextgetApplicationContext()Provides a static, single instance of the default Alfresco application context.static org.springframework.context.ApplicationContextgetApplicationContext(java.lang.String[] configLocations)Provides a static, single instance of an application context represented by the given array of config locations.static voidmain(java.lang.String... args)
-
-
-
Method Detail
-
getApplicationContext
public static org.springframework.context.ApplicationContext getApplicationContext()
Provides a static, single instance of the default Alfresco application context. This method can be called repeatedly. If the configuration requested differs from one used previously, then the previously-created context is shut down.- Returns:
- Returns an application context for the default Alfresco configuration
-
getApplicationContext
public static org.springframework.context.ApplicationContext getApplicationContext(java.lang.String[] configLocations)
Provides a static, single instance of an application context represented by the given array of config locations. This method can be called repeatedly. If the configuration requested differs from one used previously, then the previously-created context is shut down.- Returns:
- Returns an application context for the given config locations
-
main
public static void main(java.lang.String... args)
-
-