|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--com.ibm.workflow.portlet.sample.CommandHandlerAdapter
CommandHandlerAdapter acts as a CommandHandler which aggregates other CommandHandlers. This will be useful if multiple CommandHandlers should be used together in a single MQWF Web Client servlet.
This sample also demonstrates how to use the Config class
to read custom settings from WebClient.properties.
For details on how to run this sample, see the Samples section.
| Constructor Summary | |
CommandHandlerAdapter()
|
|
| Method Summary | |
void |
destroy()
This method is called by the Web Client in its servlet's destroy() method. |
ResponsePage |
execute(java.lang.String command,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
This method is called every time a custom command is to be executed. |
byte[] |
getCredentials(javax.servlet.http.HttpServletRequest request)
This method is called by the BuiltinHandler as a pre-logon hook
to enable third party authentication. |
java.lang.String |
getHandlerInfo()
Returns information about the handler, such as author, version, and copyright. |
java.lang.String |
getTriggerTagFor(int list,
RequestContext context)
This method can be called by Viewers to obtain a HTML tag that
triggers user-defined commands. |
void |
init(Config cfg)
This method is called by the Web Client in its servlet's init() method. |
void |
onLogoff(SessionContext context)
This method is called whenever a user has logged off. |
void |
onLogon(RequestContext context)
This method is called whenever a new user has logged on. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public CommandHandlerAdapter()
| Method Detail |
public final java.lang.String getHandlerInfo()
getHandlerInfo in interface CommandHandler
public final java.lang.String getTriggerTagFor(int list,
RequestContext context)
Viewers to obtain a HTML tag that
triggers user-defined commands.getTriggerTagFor in interface CommandHandlerlist - Denotes the list for which the trigger tag is queried.context - The RequestContext which was passed to the Viewer
calling this method.list.public final void init(Config cfg)
init() method. Here the [CommandHandlerAdapter]
section of the WebClient.properties file is read and the
CommandHandlers registered there are created.init in interface CommandHandlerconfig - The servlet's configuration and initialization parameterspublic final void destroy()
destroy() method.
This call just is dispatched to the registered command handlers.destroy in interface CommandHandlerpublic final void onLogon(RequestContext context)
onLogon in interface CommandHandlercontext - The RequestContext for the newly added session.public final void onLogoff(SessionContext context)
onLogoff in interface CommandHandlercontext - The SessionContext for the session that will
be removed.
public final byte[] getCredentials(javax.servlet.http.HttpServletRequest request)
throws ClientException
BuiltinHandler as a pre-logon hook
to enable third party authentication.getCredentials in interface CommandHandlerrequest - The logon request sent by the clientnull if normal logon processing is required or the
credentials extracted from the request that should be used to
log on to Workflow.ClientException - If an error occurred.
public final ResponsePage execute(java.lang.String command,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws ClientException
ResponsePage representing the results of
command or null if the command was not recognized.execute in interface CommandHandlercommand - The name of the command (the value of the
command request parameter)request - The request the client has made of the servletresponse - The response the servlet sends to the clientcommandClientException - If an error occurred.
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||