public class ServiceConfig extends Object implements javax.servlet.ServletContextListener
| Modifier and Type | Field and Description |
|---|---|
static String |
CLASSNAME_PARAM |
static String |
CONFIG_FILE |
static String |
CONFIG_PREFIX |
protected Store |
defaultStore |
protected String |
filebase |
protected Map<String,Service> |
services |
static String |
STORE_SERVICENAME |
static ServiceConfig |
theConfig |
static String |
WEBAPP_MACRO |
| Constructor and Description |
|---|
ServiceConfig() |
| Modifier and Type | Method and Description |
|---|---|
void |
clearServices()
Used in test harnesses to clear out set of services
|
void |
contextDestroyed(javax.servlet.ServletContextEvent sce) |
void |
contextInitialized(javax.servlet.ServletContextEvent sce) |
String |
expandFileLocation(String location) |
static ServiceConfig |
get() |
LuceneIndex |
getDefaultIndex() |
VelocityRender |
getDefaultRenderer() |
Store |
getDefaultStore() |
<T> T |
getFirst(Class<T> cls) |
Service |
getService(String name) |
<T> T |
getServiceAs(String name,
Class<T> cls) |
List<String> |
getServiceNames() |
void |
initServices(Object... args)
Used in test harnesses.
|
void |
parseConfig(File configFile,
javax.servlet.ServletContext context)
Load a service configuration from a Properties file
|
void |
parseConfigProperties(Properties config,
javax.servlet.ServletContext context)
Load a service configuration from a Properties object
|
void |
postInit() |
public static final String WEBAPP_MACRO
public static final String CONFIG_PREFIX
public static final String CONFIG_FILE
public static final String CLASSNAME_PARAM
public static final String STORE_SERVICENAME
protected String filebase
protected Store defaultStore
public static ServiceConfig theConfig
public void contextInitialized(javax.servlet.ServletContextEvent sce)
contextInitialized in interface javax.servlet.ServletContextListenerpublic void postInit()
public static ServiceConfig get()
public void initServices(Object... args)
public void clearServices()
public Store getDefaultStore()
public LuceneIndex getDefaultIndex()
public VelocityRender getDefaultRenderer()
public <T> T getFirst(Class<T> cls)
public void parseConfig(File configFile, javax.servlet.ServletContext context) throws FileNotFoundException, IOException
FileNotFoundExceptionIOExceptionpublic void parseConfigProperties(Properties config, javax.servlet.ServletContext context)
public void contextDestroyed(javax.servlet.ServletContextEvent sce)
contextDestroyed in interface javax.servlet.ServletContextListenerCopyright © 2014. All rights reserved.