com.konakartadmin.bl
Class ExecuteBatchEE

java.lang.Object
  extended by com.konakartadmin.bl.ExecuteBatchEE
All Implemented Interfaces:
org.quartz.Job

public class ExecuteBatchEE
extends java.lang.Object
implements org.quartz.Job

This is a bridge between Quartz Jobs and the KonaKart Batch system which uses the execute interface on the KKAdminIf engine.


Field Summary
protected static org.apache.commons.logging.Log log
          the log
protected static java.lang.String PARAM_KEY_PREFIX
           
 
Constructor Summary
ExecuteBatchEE()
          Constructor
 
Method Summary
protected  int countParameters(org.quartz.JobDataMap jobData)
          Count the parameters which are names param0, param1 etc...
 void execute(org.quartz.JobExecutionContext context)
          Called by the Scheduler when a Trigger fires that is associated with the Job.
protected  KKAdminIf getAdminEngine(java.lang.String kkAdminEngineClassName, AdminEngineConfig adEngConf)
           
protected  java.lang.String getEngConfStr(KKAdminIf adminEng)
           
protected  java.lang.String login(KKAdminIf adminEng, java.lang.String user, java.lang.String password)
          Log in to the Admin Engine and return a session Id
protected  void logout(KKAdminIf adminEng, java.lang.String sessId)
          Logout of the Admin Engine
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static org.apache.commons.logging.Log log
the log


PARAM_KEY_PREFIX

protected static final java.lang.String PARAM_KEY_PREFIX
See Also:
Constant Field Values
Constructor Detail

ExecuteBatchEE

public ExecuteBatchEE()
Constructor

Method Detail

execute

public void execute(org.quartz.JobExecutionContext context)
             throws org.quartz.JobExecutionException
Called by the Scheduler when a Trigger fires that is associated with the Job.

Specified by:
execute in interface org.quartz.Job
Parameters:
context - a context for the job in a JobExecutionException object
Throws:
org.quartz.JobExecutionException - if there is an exception while executing the job.

login

protected java.lang.String login(KKAdminIf adminEng,
                                 java.lang.String user,
                                 java.lang.String password)
                          throws org.quartz.JobExecutionException
Log in to the Admin Engine and return a session Id

Parameters:
adminEng - an Admin Engine
user - username
password - password
Returns:
a session Id
Throws:
org.quartz.JobExecutionException

getEngConfStr

protected java.lang.String getEngConfStr(KKAdminIf adminEng)

logout

protected void logout(KKAdminIf adminEng,
                      java.lang.String sessId)
               throws org.quartz.JobExecutionException
Logout of the Admin Engine

Parameters:
adminEng - an Admin Engine
sessId - a session Id
Throws:
org.quartz.JobExecutionException

getAdminEngine

protected KKAdminIf getAdminEngine(java.lang.String kkAdminEngineClassName,
                                   AdminEngineConfig adEngConf)
                            throws org.quartz.JobExecutionException
Throws:
org.quartz.JobExecutionException

countParameters

protected int countParameters(org.quartz.JobDataMap jobData)
Count the parameters which are names param0, param1 etc...

Parameters:
jobData -
Returns:
a count of the parameters defined for the job


Copyright © 2011 DS Data Systems UK Ltd.