com.konakartadmin.bl
Class ExecuteMultiStoreBatchDirectEE

java.lang.Object
  extended by com.konakartadmin.bl.ExecuteMultiStoreBatchDirectEE

public class ExecuteMultiStoreBatchDirectEE
extends java.lang.Object

This is a utility for running batch jobs outside the Quartz environment. It 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
(package private) static boolean debug
           
static int ERROR_EXIT
          Failure Code
static int GOOD_EXIT
          Success Code
protected static org.apache.commons.logging.Log log
          the log
(package private) static java.lang.String storeId
           
(package private) static java.lang.String usage
           
 
Constructor Summary
ExecuteMultiStoreBatchDirectEE()
           
 
Method Summary
static int execute(java.lang.String credentialsFilename, java.lang.String exeClass, java.lang.String exeMethod, java.lang.String[] params, java.lang.String sId)
          Execute the batch job outside the Quartz environment
private static KKAdminIf getAdminEngine(java.lang.String kkAdminEngineClassName, AdminEngineConfig adEngConf)
           
private static java.lang.String getEngConfStr(KKAdminIf adminEng)
           
private static 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
private static void logout(KKAdminIf adminEng, java.lang.String sessId)
          Logout of the Admin Engine
static void main(java.lang.String[] args)
           
 
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


ERROR_EXIT

public static final int ERROR_EXIT
Failure Code

See Also:
Constant Field Values

GOOD_EXIT

public static final int GOOD_EXIT
Success Code

See Also:
Constant Field Values

debug

static boolean debug

storeId

static java.lang.String storeId

usage

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

ExecuteMultiStoreBatchDirectEE

public ExecuteMultiStoreBatchDirectEE()
Method Detail

main

public static void main(java.lang.String[] args)
Parameters:
args -

execute

public static int execute(java.lang.String credentialsFilename,
                          java.lang.String exeClass,
                          java.lang.String exeMethod,
                          java.lang.String[] params,
                          java.lang.String sId)
Execute the batch job outside the Quartz environment

Parameters:
credentialsFilename -
exeClass -
exeMethod -
params -
sId -
Returns:
an integer representing success or failure

login

private static java.lang.String login(KKAdminIf adminEng,
                                      java.lang.String user,
                                      java.lang.String password)
                               throws java.lang.Exception
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:
java.lang.Exception
org.quartz.JobExecutionException

getEngConfStr

private static java.lang.String getEngConfStr(KKAdminIf adminEng)

logout

private static void logout(KKAdminIf adminEng,
                           java.lang.String sessId)
                    throws java.lang.Exception
Logout of the Admin Engine

Parameters:
adminEng - an Admin Engine
sessId - a session Id
Throws:
java.lang.Exception

getAdminEngine

private static KKAdminIf getAdminEngine(java.lang.String kkAdminEngineClassName,
                                        AdminEngineConfig adEngConf)
                                 throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 2011 DS Data Systems UK Ltd.