public class ApplicationContext
extends java.lang.Object
implements com.softwareag.cis.server.ISessionListener
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
INIT_PARAM_GUI_CONFIG_ERROR |
static java.lang.String |
INIT_PARAM_I18N |
static java.lang.String |
INIT_PARAM_I18N__ID |
static java.lang.String |
INIT_PARAM_I18N__RESET |
static java.lang.String |
INIT_PARAM_I18N__TEST |
static java.lang.String |
INIT_PARAM_INITVIEW |
static java.lang.String |
INIT_PARAM_LOCALE |
static java.lang.String |
INIT_PARAM_PASSWORD |
static java.lang.String |
INIT_PARAM_PLUGIN |
static java.lang.String |
INIT_PARAM_REFRESH_CLASSLOADER |
static java.lang.String |
INIT_PARAM_STYLE |
static java.lang.String |
INIT_PARAM_USER |
Constructor and Description |
---|
ApplicationContext(com.softwareag.cis.server.Adapter adapter)
Create ApplicationContext and store in session context for given adapter
|
ApplicationContext(java.io.File pluginsDir)
This constructor of an ApplicationContext is used just for testing outside
of a servlet / CAI context
|
Modifier and Type | Method and Description |
---|---|
void |
acceptLogon()
Due to the connect, some plugins may have been deactivated, e.g. because
the CentraSite server had not been active.
|
void |
addTempFile(java.lang.String tempFile)
Register a temporary file for deletion when the session is terminated.
|
void |
connectAll(com.softwareag.cst.util.security.Credentials credentials,
CommonAdapter ca)
Establish connection for all plug-ins contributing a ConnectionHandler
|
static java.util.List<java.lang.Object> |
createExtensionList(com.softwareag.cis.server.Adapter adapter,
java.lang.String extptId,
java.lang.Class<?> interfac)
Obtain list of extension implementations for given extension point
|
void |
disconnectAll(CommonAdapter commonAdapter)
Disconnect all connections
|
void |
displayLoginPage(CommonAdapter commonAdapter,
boolean logoff) |
static ApplicationContext |
get(com.softwareag.cis.server.Adapter adapter)
Get ApplicationContext from session context for given adapter.
|
com.softwareag.cst.util.security.Credentials |
getCredentials()
Obtain credetials used for most recent attempt to login
|
java.lang.String |
getInitParam(java.lang.String key)
Get init parameter.
|
java.util.Locale |
getLocale() |
javax.security.auth.login.LoginContext |
getLoginContext() |
java.lang.String |
getParameter(java.lang.String pluginId,
java.lang.String name)
Obtain value of application parameter set via "parameter" extension point
|
PlugInRegistry |
getPlugInRegistry()
Get the PlugInRegistry.
|
PlugIn |
getPreferredPlugIn(boolean throwExceptionOnError)
Get preferred plug-in (selected via optional query parameter PLUGIN=
|
java.lang.String |
getQueryString(java.util.Map additionalQueryParms)
Obtain query parameters passed to servlet when being started
|
java.lang.String |
getQueryString(java.util.Map additionalQueryParms,
java.util.List filter)
Obtain query parameters passed to servlet when being started
|
java.lang.String |
getRequestProtocol() |
javax.servlet.ServletContext |
getServletContext()
Obtain servlet context for current web app
|
javax.servlet.http.HttpServletRequest |
getServletRequest() |
com.softwareag.cis.context.ILookupContext |
getSessionContext()
Obtain the Application Designer's session context
|
javax.security.auth.Subject |
getSubject() |
java.lang.String |
getTitle()
Get title to be used for browser window
|
java.io.File |
getWebAppDir()
Obtain web app directory of PluggableUI
|
java.lang.String |
getWebAppURL() |
void |
initAll(CommonAdapter ca)
Initialize all ConnectionHandlers
|
void |
loadLoginPage(CommonAdapter commonAdapter)
Deprecated.
- please use displayLoginPage()
|
void |
notifyConnectedAll(CommonAdapter ba)
Notify connected to all ConnectionHandlers.
|
void |
reactOnSessionDestroyed()
Clean-up (connections, temp files) on session destroy.
|
void |
removeInitParam(java.lang.String name)
Remove init/query parameter e.g. after it has been processed as part of a
deep link in order to avoid that it occurs in a secondary deep link.
|
void |
setInitParamMap(com.softwareag.cis.server.Adapter adapter)
Sets a map of init parameters for the current application context.
|
void |
setLocale(java.util.Locale locale) |
public static final java.lang.String INIT_PARAM_USER
public static final java.lang.String INIT_PARAM_PASSWORD
public static final java.lang.String INIT_PARAM_INITVIEW
public static final java.lang.String INIT_PARAM_GUI_CONFIG_ERROR
public static final java.lang.String INIT_PARAM_STYLE
public static final java.lang.String INIT_PARAM_LOCALE
public static final java.lang.String INIT_PARAM_REFRESH_CLASSLOADER
public static final java.lang.String INIT_PARAM_I18N
public static final java.lang.String INIT_PARAM_I18N__TEST
public static final java.lang.String INIT_PARAM_I18N__RESET
public static final java.lang.String INIT_PARAM_I18N__ID
public static final java.lang.String INIT_PARAM_PLUGIN
public ApplicationContext(com.softwareag.cis.server.Adapter adapter)
public ApplicationContext(java.io.File pluginsDir)
public java.lang.String getRequestProtocol()
public com.softwareag.cis.context.ILookupContext getSessionContext()
public PlugIn getPreferredPlugIn(boolean throwExceptionOnError)
throwExceptionOnError
- if true, an exception shall be thrown, if the id
of an unknown plug-in had been givenpublic void setInitParamMap(com.softwareag.cis.server.Adapter adapter)
adapter
- Used for obtaining init parameters.public java.lang.String getInitParam(java.lang.String key)
public void removeInitParam(java.lang.String name)
name
- name of init parameter to be removedpublic java.io.File getWebAppDir()
public java.lang.String getWebAppURL()
public javax.servlet.ServletContext getServletContext()
public java.util.Locale getLocale()
public void setLocale(java.util.Locale locale)
public static ApplicationContext get(com.softwareag.cis.server.Adapter adapter)
adapter
- Used to obtain the session context.public PlugInRegistry getPlugInRegistry()
public static java.util.List<java.lang.Object> createExtensionList(com.softwareag.cis.server.Adapter adapter, java.lang.String extptId, java.lang.Class<?> interfac)
adapter
- the adapter used to obtain application context and for error reportingextptId
- qualified id of extension pointinterfac
- the interface or class which must be implemented or extended by all extensions of given extension pointpublic void initAll(CommonAdapter ca) throws java.lang.Exception
ca
- The CommonAdapter providing e.g. a session context.java.lang.Exception
public void connectAll(com.softwareag.cst.util.security.Credentials credentials, CommonAdapter ca) throws java.lang.Exception
java.lang.Exception
public void acceptLogon()
java.lang.IllegalStateException
- if the above is not fulfilled.public void notifyConnectedAll(CommonAdapter ba) throws java.lang.Exception
ba
- the CommonAdapter adapter being active while the connection is being establishedjava.lang.Exception
public void disconnectAll(CommonAdapter commonAdapter)
public void displayLoginPage(CommonAdapter commonAdapter, boolean logoff)
public void loadLoginPage(CommonAdapter commonAdapter)
public java.lang.String getQueryString(java.util.Map additionalQueryParms)
public java.lang.String getQueryString(java.util.Map additionalQueryParms, java.util.List filter)
filter
- List of query param keys to be excluded from the final query string.public com.softwareag.cst.util.security.Credentials getCredentials()
public javax.security.auth.Subject getSubject()
public javax.security.auth.login.LoginContext getLoginContext()
public java.lang.String getParameter(java.lang.String pluginId, java.lang.String name)
name
- public void addTempFile(java.lang.String tempFile)
public javax.servlet.http.HttpServletRequest getServletRequest()
public void reactOnSessionDestroyed()
reactOnSessionDestroyed
in interface com.softwareag.cis.server.ISessionListener
ISessionListener.reactOnSessionDestroyed()
public java.lang.String getTitle()