Package de.xima.fc.portal.runtime
Class PortalRuntime
- java.lang.Object
-
- de.xima.fc.portal.runtime.PortalRuntime
-
public class PortalRuntime extends Object
- Author:
- XIMA MEDIA GmbH
-
-
Constructor Summary
Constructors Constructor Description PortalRuntime(PluginRuntime portalRuntime, IPluginPortal plugin)
Creates a new runtime for a given portal plugin.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getContextName()
Map<String,Class<? extends javax.faces.convert.Converter>>
getConverterIdMap()
Map<Class<?>,Class<? extends javax.faces.convert.Converter>>
getConverterTypeMap()
IPluginPortal
getPlugin()
PluginRuntime
getPluginRuntime()
long
getRegistrationDate()
Map<String,Class<? extends javax.faces.validator.Validator>>
getValidatorIdMap()
boolean
handleContext(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.FilterChain chain)
Handles an HTTP request by invoking the appropriate filters and servlets.void
initialize(javax.servlet.ServletContext context)
Initializes the plugin portal context.void
shutdown(javax.servlet.ServletContext servletContext)
Shuts down a portal runtime.
-
-
-
Constructor Detail
-
PortalRuntime
public PortalRuntime(PluginRuntime portalRuntime, IPluginPortal plugin)
Creates a new runtime for a given portal plugin.- Parameters:
portalRuntime
- The runtime of the plugin.plugin
- The portal plugin to wrap.
-
-
Method Detail
-
getValidatorIdMap
public Map<String,Class<? extends javax.faces.validator.Validator>> getValidatorIdMap()
- Returns:
- A map with all validators contained in the portal plugin. The key is the
ID
of the validator.
-
getConverterTypeMap
public Map<Class<?>,Class<? extends javax.faces.convert.Converter>> getConverterTypeMap()
- Returns:
- A map with all converters contained in the portal plugin. The key is the
target type
of the converter.
-
getConverterIdMap
public Map<String,Class<? extends javax.faces.convert.Converter>> getConverterIdMap()
- Returns:
- A map with all converters contained in the portal plugin. The key is the
ID
of the converter.
-
getRegistrationDate
public long getRegistrationDate()
- Returns:
- The time when this runtime was registered, represented as the number of milliseconds since January 1, 1970, 00:00:00 GMT.
-
getPlugin
public IPluginPortal getPlugin()
- Returns:
- The portal plugin for which this runtime was created.
-
getPluginRuntime
public PluginRuntime getPluginRuntime()
- Returns:
- The plugin runtime of the portal plugin for which this runtime was created.
-
getContextName
public String getContextName()
- Returns:
- The name of the portal plugin context. This is the name that needs to be used as part of the URL to enter the context of the portal plugin.
-
initialize
public void initialize(javax.servlet.ServletContext context)
Initializes the plugin portal context.- Parameters:
context
- Servlet context with which to initialize the portal.
-
handleContext
@CanIgnoreReturnValue public boolean handleContext(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.FilterChain chain)
Handles an HTTP request by invoking the appropriate filters and servlets.- Parameters:
request
- The current servlet request being made by the client.response
- The current servlet response being constructed.chain
- The original filter chain.- Returns:
true
if the context was handled by this runtime,false
otherwise.
-
shutdown
public void shutdown(javax.servlet.ServletContext servletContext) throws RuntimeException
Shuts down a portal runtime. Also destroys all filter, servlets etc. by calling their respective clean-up methods.- Parameters:
servletContext
- The servlet context with which to shut down the portal.- Throws:
RuntimeException
- When the plugin could not be shut down.
-
-