public class ScreenLoaderServlet extends BaseServlet
project.ui: $webRoot/commonUI,$webRoot/userScreenIf a screen file is not found, a warning is logged and nothing is returned
Modifier and Type | Method and Description |
---|---|
static void | addDynamicScreenGenerator(DynamicScreenGenerator dsg) Registers the parameter DynamicScreenGenerator with the ScreenLoaderServlet system. |
static void | addDynamicScreenGenerator(DynamicScreenGenerator dsg, java.util.regex.Pattern regex) Registers the parameter DynamicScreenGenerator with the ScreenLoaderServlet system. |
static void | addDynamicScreenGenerator(DynamicScreenGenerator dsg, java.lang.String prefix) Registers the parameter DynamicScreenGenerator with the ScreenLoaderServlet system. |
static void | clearDynamicScreenGenerators() Removes all DynamicScreenGenerators from the system |
void | processRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) Servlet entry point to process the request. |
static DynamicScreenGenerator | removeDynamicScreenGenerator() Removes the default DynamicScreenGenerator |
static DynamicScreenGenerator | removeDynamicScreenGenerator(java.util.regex.Pattern regex) Removes the DynamicScreenGenerator registered against the parameter regexp Pattern |
static DynamicScreenGenerator | removeDynamicScreenGenerator(java.lang.String prefix) Removes the DynamicScreenGenerator registered against the parameter prefix String |
handleError, handleError
public void processRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
request
- HttpServletRequest
object that contains the request the client has made of the servlet.response
- HttpServletResponse
object that contains the response the servlet sends to the client.javax.servlet.ServletException
- if the request could not be handled.java.io.IOException
- if an input or output error is detected when the servlet handles request.public static void addDynamicScreenGenerator(DynamicScreenGenerator dsg)
DynamicScreenGenerator.getScreen(String)
method; only if that method returns null
will it proceed to use the normal system for obtaining screen instances. NOTE:
ScreenLoaderServlet.addDynamicScreenGenerator(DynamicScreenGenerator, String)
and ScreenLoaderServlet.addDynamicScreenGenerator(DynamicScreenGenerator, Pattern)
for APIs that are more likely to be suitablenull
for screens that you cannot provide an instance ofdsg
- A DynamicScreenGenerator to register as the defaultpublic static void addDynamicScreenGenerator(DynamicScreenGenerator dsg, java.lang.String prefix)
You can add multiple DynamicScreenGenerators using this API. If two or more are registered with prefixes that match a given screen ID, the one added first wins. Eg, if you have prefixes "c" and "cust" registered, then the "customer" screen will be provided by whichever of those two DynamicScreenGenerators was registered first. Note that this "earliest first" basis also applies to DynamicScreenGenerators registered with a regexp; if you had a screen ID that matched both a prefix and a regexp, whichever one of the two registrations came first would be used - there is no priority given to one or the other styles of ID matching.
dsg
- A DynamicScreenGenerator to register as the defaultprefix
- A prefix String as described abovepublic static void addDynamicScreenGenerator(DynamicScreenGenerator dsg, java.util.regex.Pattern regex)
java.util.regex.Pattern
You can add multiple DynamicScreenGenerators using this API. If two or more are registered with regular expressions that match a given screen ID, the one added first wins. This also applies to DynamicScreenGenerators registered with a simple prefix String.
dsg
- A DynamicScreenGenerator to register as the defaultregex
- A Pattern representing a regular expression to match against incoming screen IDspublic static DynamicScreenGenerator removeDynamicScreenGenerator()
public static DynamicScreenGenerator removeDynamicScreenGenerator(java.lang.String prefix)
public static DynamicScreenGenerator removeDynamicScreenGenerator(java.util.regex.Pattern regex)
public static void clearDynamicScreenGenerators()