public class Server
extends java.lang.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 |
---|---|
java.util.List<java.lang.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.
|
java.util.Collection<java.lang.String> |
getAppKeys()
Returns a List of database keys of all OpenWGA applications, excluding data sources
|
java.lang.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.
|
java.io.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.
|
java.util.Collection<java.lang.String> |
getDatabaseKeys()
Returns a List of database keys of all OpenWGA databases, including apps and data sources
|
java.util.Collection<java.lang.String> |
getDataSourceKeys()
Returns a List of database keys of all OpenWGA data sources, excluding full applications
|
java.lang.String |
getDefaultHttpEncoding()
Returns the default encoding used for HTTP communication on this server
|
java.util.Collection<java.lang.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
|
java.lang.Object |
getServerOption(java.lang.String name)
Reads a server option
This method returns the server option value in its native data type, like determined in module registry.
|
javax.servlet.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
|
boolean |
isDevelopmentMode()
Returns if the server runs in development mode, so is likely started in OpenWGA developer studio
|
boolean |
isMasterNode()
Returns if the current server is a master node (either a standalone server or the master in a cluster)
which should run operations that only one node in a cluster should perform
|
void |
performPluginOperations(java.util.List<WorkspaceOperation> ops)
Performs plugin operations on the current WGA plugin set
|
java.util.List<java.lang.String> |
reconnect(java.util.List<java.lang.String> uidsToReconnect)
Reconnects database belonging to the given config UIDs
|
void |
reloadConfig()
Reloads the server configuration
|
java.util.List<java.lang.String> |
reloadConfig(java.util.List<java.lang.String> uidsToReconnect)
Reloads the server configuration, reconnecting the databases belonging to the given config UIDs
|
java.io.File |
resolveSystemFile(java.lang.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(java.lang.Class<?> refClass,
java.lang.Object scopeObject,
java.lang.String baseKey)
Starts a generic problem occasion for OpenWGA non-design-related problems.
|
Server.ServerOccasion |
startProblemOccasion(java.lang.Class<?> refClass,
java.lang.Object scopeObject,
java.lang.String baseKey,
boolean clear)
Starts a generic problem occasion for OpenWGA non-design-related problems
|
Server.ServerOccasion |
startProblemOccasion(java.lang.Class<?> refClass,
java.lang.String baseKey)
Starts a generic problem occasion for OpenWGA non-design-related problems.
|
Server.ServerOccasion |
startProblemOccasion(java.lang.Class<?> refClass,
java.lang.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,
java.util.List<java.lang.String> uidsToReconnect)
Updates the server configuration with the given configuration.
|
void |
waitForAppEvents()
Waits until the currently thrown app events are all processed
|
public java.util.Collection<java.lang.String> getDatabaseKeys() throws de.innovationgate.webgate.api.WGException
de.innovationgate.webgate.api.WGException
public java.util.Collection<java.lang.String> getAppKeys() throws de.innovationgate.webgate.api.WGException
de.innovationgate.webgate.api.WGException
public java.util.Collection<java.lang.String> getDataSourceKeys() throws de.innovationgate.webgate.api.WGException
de.innovationgate.webgate.api.WGException
public java.util.Collection<java.lang.String> getDomainNames() throws de.innovationgate.webgate.api.WGException
de.innovationgate.webgate.api.WGException
public org.apache.log4j.Logger getLog()
public java.lang.String getBaseURL() throws de.innovationgate.webgate.api.WGException
de.innovationgate.webgate.api.WGAPIException
de.innovationgate.webgate.api.WGException
public java.io.File getConfigFolder() throws de.innovationgate.webgate.api.WGException
de.innovationgate.webgate.api.WGException
public java.io.File resolveSystemFile(java.lang.String fileName) throws de.innovationgate.webgate.api.WGException
fileName
- Name or path of the filede.innovationgate.webgate.api.WGException
public javax.servlet.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 java.util.List<java.lang.String> reloadConfig(java.util.List<java.lang.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, java.util.List<java.lang.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 java.util.List<java.lang.String> reconnect(java.util.List<java.lang.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(java.util.List<WorkspaceOperation> ops) throws de.innovationgate.webgate.api.WGException
ops
- List of operationsde.innovationgate.webgate.api.WGException
public Server.ServerOccasion startProblemOccasion(java.lang.Class<?> refClass, java.lang.Object scopeObject, java.lang.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(java.lang.Class<?> refClass, java.lang.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(java.lang.Class<?> refClass, java.lang.Object scopeObject, java.lang.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(java.lang.Class<?> refClass, java.lang.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 java.lang.Object getServerOption(java.lang.String name)
name
- Name of the server optionpublic java.util.List<java.lang.String> clearAllCaches() throws de.innovationgate.webgate.api.WGException
de.innovationgate.webgate.api.WGException
public java.lang.String getDefaultHttpEncoding()
public boolean isDevelopmentMode()
public boolean isMasterNode()
public void waitForAppEvents()