com.konakartadmin.bl
Class ExecuteMultiStoreBatchEE

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

public class ExecuteMultiStoreBatchEE
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. This will call the batch job once for every store found in the multi-store environment.


Field Summary
protected static org.apache.commons.logging.Log log
          the log
protected static java.lang.String PARAM_KEY_PREFIX
          parameter key prefix constant
 
Constructor Summary
ExecuteMultiStoreBatchEE()
          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
parameter key prefix constant

See Also:
Constant Field Values
Constructor Detail

ExecuteMultiStoreBatchEE

public ExecuteMultiStoreBatchEE()
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)
Parameters:
adminEng -
Returns:
a String representing the AdminEngineConfig

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
Parameters:
kkAdminEngineClassName -
adEngConf -
Returns:
an Admin Engine from the specified class name and instantiated with the specified AdminEngineConfig.
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.