public abstract class IlvAbstractServerActionParser extends Object
Modifier and Type | Field and Description |
---|---|
protected static String |
ITEM_END
The constant for representing "]".
|
protected static String |
ITEM_START
The constant for representing "[".
|
protected static Logger |
LOG
The
Logger instance for class. |
static String |
SERVER_ACTIONS_INIT_PARAM
The parameter that used to configure in web.xml for servlets.
|
Constructor and Description |
---|
IlvAbstractServerActionParser()
The default constructor.
|
Modifier and Type | Method and Description |
---|---|
protected abstract void |
addServerAction(String actionName,
EventListener actionListener)
Add server action listener to servlet support.
|
protected abstract Map<String,IlvEventListenerCollection<EventListener>> |
getActionTable()
Gets the action table of servlet support.
|
protected abstract IlvServletSupport |
getServletSupport()
Gets the servlet support.
|
void |
parserServerActionAnnotation(jakarta.servlet.http.HttpServlet servlet)
This method is used to parser the annotations of
servlet for dynamically configure the server action listeners.
|
void |
parserServerActionWebXML(jakarta.servlet.ServletConfig config)
Parser the server action from web.xml configuration.
|
protected abstract void |
removeServerAction(String actionName,
EventListener actionListener)
Remove server action listener from servlet support.
|
protected static final String ITEM_END
protected static final String ITEM_START
public static final String SERVER_ACTIONS_INIT_PARAM
protected static final Logger LOG
Logger
instance for class.public IlvAbstractServerActionParser()
public final void parserServerActionAnnotation(jakarta.servlet.http.HttpServlet servlet)
@IlvServerActions(parameters={
@IlvServerActionParam(actionName=YourServerAction.NOT_EXIST,actionListener=YourServerAction.class),
@IlvServerActionParam(actionName=YourServerAction.EXIST,actionListener=MyServerAction.class),
@IlvServerActionParam(actionName=YourServerAction.EXIST))
})
public class YourServlet{...}
IlvServerActionParam#actionName
is not exit in IlvChartServletSupport#getActionTable
,
then will addIlvServerActionParam#actionListener
instance into server action listener list.
IlvServerActionParam#actionName
is exit in IlvChartServletSupport#getActionTable
,
then the IlvServerActionParam#actionListener
instance will replace the old action listener.
IlvServerActionParam#actionName
is exit in IlvChartServletSupport#getActionTable
,
and IlvServerActionParam#actionListener
is default value Object.class,
then will remove the server action lister which used to deal with IlvServerActionParam#name
action.
servlet
- The HttpServlet
object.public void parserServerActionWebXML(jakarta.servlet.ServletConfig config)
For example:
<init-param>
<param-name>serverActions</param-name>
<param-value>
[beforeZoom,bank.MyZoomActionListener]
[facesSelectAction, ]
[]
</param-value>
</init-param>
config
- the ServletConfig
object.protected abstract Map<String,IlvEventListenerCollection<EventListener>> getActionTable()
protected abstract IlvServletSupport getServletSupport()
protected abstract void addServerAction(String actionName, EventListener actionListener)
actionName
- The action name.actionListener
- The action listener.protected abstract void removeServerAction(String actionName, EventListener actionListener)
actionName
- The action name.actionListener
- The action listener.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.