|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.workflow.servlet.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 Viewer s 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 |
logon3(ExecutionService service,
byte[] credentials,
SessionMode mode,
AbsenceIndicator absenceIndicator)
Deprecated. This method will no longer be called when using MQSeries Workflow V3.3 which provides an authentication exit for the Administration server. |
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. |
void |
onLogon(SessionContext context)
Deprecated. Use onLogon(RequestContext) instead. |
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()
public final java.lang.String getTriggerTagFor(int list, RequestContext context)
Viewer
s to obtain a HTML tag that
triggers user-defined commands.list
- 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.config
- The servlet's configuration and initialization parameterspublic final void destroy()
destroy()
method.
This call just is dispatched to the registered command handlers.public final void onLogon(RequestContext context)
context
- The RequestContext
for the newly added session.public final void onLogon(SessionContext context)
onLogon(RequestContext)
instead.
context
- The SessionContext
for the newly added session.public final void onLogoff(SessionContext context)
context
- 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.request
- 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.public void logon3(ExecutionService service, byte[] credentials, SessionMode mode, AbsenceIndicator absenceIndicator) throws FmcException
getCredentials()
method returned a
non-null value, this method will be called instead of
ExecutionService.logon2()
. The postcondition of this method
is that Service.isLoggedOn()
returns true
.service
- The service to log on tocredentials
- The credentials returned by
getCredentials()
mode
- See ExecutionService.logon2()
absenceIndicator
- See ExecutionService.logon2()
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.command
- 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 clientcommand
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |