de.innovationgate.wga.server.api
public class Server extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Server.ServerOccasion
A problem occasion created by
startProblemOccasion(Class, Object, String, boolean) |
Modifier and Type | Method and Description |
---|---|
List<String> |
clearAllCaches()
Clears all clearable caches on this OpenWGA runtime including:
Data, user and file publishing caches on all web applications and data sources
WebTML cache
TMLScript code cache
Design file cache
This should be run in a master session.
|
Collection<String> |
getAppKeys()
Returns a List of database keys of all OpenWGA applications, excluding data sources
|
String |
getBaseURL()
Returns the base URL to reach this OpenWGA runtime
This is the base part of every OpenWGA URL that is necessary to address the OpenWGA server itself, without any extra path information that is used to address resources within OpenWGA.
|
File |
getConfigFolder()
Returns the folder in which is used for WGA configuration
Every OpenWGA installation uses a special folder for file data that is managed by the server itself.
|
Collection<String> |
getDatabaseKeys()
Returns a List of database keys of all OpenWGA databases, including apps and data sources
|
Collection<String> |
getDataSourceKeys()
Returns a List of database keys of all OpenWGA data sources, excluding full applications
|
Collection<String> |
getDomainNames()
Returns the names of all OpenWGA domains
|
de.innovationgate.utils.DynamicClassLoadingChain |
getLibraryLoader()
Returns the library class loader used by OpenWGA to load extension classes
|
org.apache.log4j.Logger |
getLog()
Returns the application log logger of the server
|
de.innovationgate.wga.modules.ModuleRegistry |
getModuleRegistry()
Returns the OpenWGA module registry
|
ProblemRegistry |
getProblemRegistry()
Returns OpenWGAs problem registry
|
Object |
getServerOption(String name)
Reads a server option
This method returns the server option value in its native data type, like determined in module registry.
|
ServletContext |
getServletContext()
Returns the JavaEE servlet context of OpenWGA
This object of type javax.servlet.ServletContext is the basic context object of OpenWGA as Java Web Application.
|
de.innovationgate.wga.common.beans.csconfig.v1.Version |
getVersion()
Returns the WGA server version
|
void |
performPluginOperations(List<WorkspaceOperation> ops)
Performs plugin operations on the current WGA plugin set
|
List<String> |
reconnect(List<String> uidsToReconnect)
Reconnects database belonging to the given config UIDs
|
void |
reloadConfig()
Reloads the server configuration
|
List<String> |
reloadConfig(List<String> uidsToReconnect)
Reloads the server configuration, reconnecting the databases belonging to the given config UIDs
|
File |
resolveSystemFile(String fileName)
Tries to find an "OpenWGA system file" of the given file name or path in the servers file system
This method can be used to lookup files related to OpenWGA, no matter if they are specified as complete path or as relative path/name to OpenWGAs config folder.
|
Server.ServerOccasion |
startProblemOccasion(Class<?> refClass,
Object scopeObject,
String baseKey)
Starts a generic problem occasion for OpenWGA non-design-related problems.
|
Server.ServerOccasion |
startProblemOccasion(Class<?> refClass,
Object scopeObject,
String baseKey,
boolean clear)
Starts a generic problem occasion for OpenWGA non-design-related problems
|
Server.ServerOccasion |
startProblemOccasion(Class<?> refClass,
String baseKey)
Starts a generic problem occasion for OpenWGA non-design-related problems.
|
Server.ServerOccasion |
startProblemOccasion(Class<?> refClass,
String baseKey,
boolean clear)
Starts a generic problem occasion for OpenWGA non-design-related problems.
|
void |
updateConfig(de.innovationgate.wga.config.WGAConfiguration cfg)
Updates the server configuration with the given configuration.
|
void |
updateConfig(de.innovationgate.wga.config.WGAConfiguration cfg,
List<String> uidsToReconnect)
Updates the server configuration with the given configuration.
|
public Collection<String> getDatabaseKeys() throws de.innovationgate.webgate.api.WGException
de.innovationgate.webgate.api.WGException
public Collection<String> getAppKeys() throws de.innovationgate.webgate.api.WGException
de.innovationgate.webgate.api.WGException
public Collection<String> getDataSourceKeys() throws de.innovationgate.webgate.api.WGException
de.innovationgate.webgate.api.WGException
public Collection<String> getDomainNames() throws de.innovationgate.webgate.api.WGException
de.innovationgate.webgate.api.WGException
public org.apache.log4j.Logger getLog()
public String getBaseURL() throws de.innovationgate.webgate.api.WGException
de.innovationgate.webgate.api.WGAPIException
de.innovationgate.webgate.api.WGException
public File getConfigFolder() throws de.innovationgate.webgate.api.WGException
de.innovationgate.webgate.api.WGException
public File resolveSystemFile(String fileName) throws de.innovationgate.webgate.api.WGException
fileName
- Name or path of the filede.innovationgate.webgate.api.WGException
public ServletContext getServletContext() throws de.innovationgate.webgate.api.WGException
de.innovationgate.webgate.api.WGException
public ProblemRegistry getProblemRegistry()
public de.innovationgate.wga.modules.ModuleRegistry getModuleRegistry() throws de.innovationgate.webgate.api.WGException
de.innovationgate.webgate.api.WGException
public de.innovationgate.utils.DynamicClassLoadingChain getLibraryLoader() throws de.innovationgate.webgate.api.WGException
de.innovationgate.webgate.api.WGException
public de.innovationgate.wga.common.beans.csconfig.v1.Version getVersion() throws de.innovationgate.webgate.api.WGException
de.innovationgate.webgate.api.WGException
public void reloadConfig() throws de.innovationgate.webgate.api.WGException
de.innovationgate.webgate.api.WGException
public List<String> reloadConfig(List<String> uidsToReconnect) throws de.innovationgate.webgate.api.WGException
uidsToReconnect
- UIDs of config entities. Allowed are config UIDs of domains, database servers and content databases, also database keys.de.innovationgate.webgate.api.WGException
public void updateConfig(de.innovationgate.wga.config.WGAConfiguration cfg, List<String> uidsToReconnect) throws de.innovationgate.webgate.api.WGException
cfg
- The new configurationuidsToReconnect
- UIDs of config entities. Allowed are config UIDs of domains, database servers and content databases, also database keys.de.innovationgate.webgate.api.WGException
public void updateConfig(de.innovationgate.wga.config.WGAConfiguration cfg) throws de.innovationgate.webgate.api.WGException
cfg
- The new configurationde.innovationgate.webgate.api.WGException
public List<String> reconnect(List<String> uidsToReconnect) throws de.innovationgate.webgate.api.WGException
uidsToReconnect
- UIDs of config entities. Allowed are config UIDs of domains, database servers and content databases, also database keys.de.innovationgate.webgate.api.WGException
public void performPluginOperations(List<WorkspaceOperation> ops) throws de.innovationgate.webgate.api.WGException
ops
- List of operationsde.innovationgate.webgate.api.WGException
public Server.ServerOccasion startProblemOccasion(Class<?> refClass, Object scopeObject, String baseKey, boolean clear)
refClass
- The reference class containing the problem-causing code. The problem labels will need to be put into a properties file "ClassName_problems.properties" in its package folderscopeObject
- An object representing the scope of this problem. Allowed are: App
, DataSource
, Database
, WGDatabase
, Domain
baseKey
- The base key of this problem occasion. The labels of problem keys will start with this base keyclear
- Whether old problems of an equal occasion should now be clearedpublic Server.ServerOccasion startProblemOccasion(Class<?> refClass, String baseKey)
refClass
- The reference class containing the problem-causing code. The problem labels will need to be put into a properties file "ClassName_problems.properties" in its package folderbaseKey
- The base key of this problem occasion. The labels of problem keys will start with this base keypublic Server.ServerOccasion startProblemOccasion(Class<?> refClass, Object scopeObject, String baseKey)
refClass
- The reference class containing the problem-causing code. The problem labels will need to be put into a properties file "ClassName_problems.properties" in its package folderscopeObject
- An object representing the scope of this problem. Allowed are: App
, DataSource
, Database
, WGDatabase
, Domain
baseKey
- The base key of this problem occasion. The labels of problem keys will start with this base keypublic Server.ServerOccasion startProblemOccasion(Class<?> refClass, String baseKey, boolean clear)
refClass
- The reference class containing the problem-causing code. The problem labels will need to be put into a properties file "ClassName_problems.properties" in its package folderbaseKey
- The base key of this problem occasion. The labels of problem keys will start with this base keyclear
- Whether old problems of an equal occasion should now be clearedpublic Object getServerOption(String name)
name
- Name of the server optionpublic List<String> clearAllCaches() throws de.innovationgate.webgate.api.WGException
de.innovationgate.webgate.api.WGException