jetweb is hosted by Hepforge, IPPP Durham

cedar.jetweb.batch
Class SubmitScriptHandler

java.lang.Object
  extended by cedar.jetweb.batch.SubmitScriptHandler

public abstract class SubmitScriptHandler
extends java.lang.Object

Handle the batch job submission stuff.

Version:
$Date: 2006-06-09 16:11:34 +0100 (Fri, 09 Jun 2006) $ $Revision: 1182 $
Author:
J.Butterworth

Field Summary
static int BATCHFACILITY
          Constant determining which batch facility is being used.
static java.util.Vector<java.lang.String> batchNames
           
static java.util.Vector<java.lang.Integer> batchNumbers
           
static int CANTCHMOD
           
static int CANTOPENPERMITSCRIPT
           
static int CANTWRITESCRIPT
           
static int GRID
           
static int INVALIDJOB
           
static int MCRPBS
           
static int NODEFINEDFACILITY
           
static int OK
           
static int SHEFPBS
           
static int UCLNQS
           
static int UCLPBS
           
 
Constructor Summary
SubmitScriptHandler()
           
 
Method Summary
static java.lang.String getExecutable(Generator generator)
          Returns executable filename for a specified generator and version.
static java.lang.String getTemplate()
          Returns template filename for the currently set batch facility.
static int make(JobRequest request)
          Build the control script for the batch facility determined by BATCHFACILITY.
static void setBatchFacility(java.lang.String batchFacility)
          Set batch facility for job submission.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OK

public static final int OK
See Also:
Constant Field Values

INVALIDJOB

public static final int INVALIDJOB
See Also:
Constant Field Values

CANTWRITESCRIPT

public static final int CANTWRITESCRIPT
See Also:
Constant Field Values

CANTCHMOD

public static final int CANTCHMOD
See Also:
Constant Field Values

CANTOPENPERMITSCRIPT

public static final int CANTOPENPERMITSCRIPT
See Also:
Constant Field Values

NODEFINEDFACILITY

public static final int NODEFINEDFACILITY
See Also:
Constant Field Values

UCLNQS

public static final int UCLNQS
See Also:
Constant Field Values

MCRPBS

public static final int MCRPBS
See Also:
Constant Field Values

GRID

public static final int GRID
See Also:
Constant Field Values

UCLPBS

public static final int UCLPBS
See Also:
Constant Field Values

SHEFPBS

public static final int SHEFPBS
See Also:
Constant Field Values

BATCHFACILITY

public static int BATCHFACILITY
Constant determining which batch facility is being used. To be set in JetWebConfig init method.


batchNumbers

public static java.util.Vector<java.lang.Integer> batchNumbers

batchNames

public static java.util.Vector<java.lang.String> batchNames
Constructor Detail

SubmitScriptHandler

public SubmitScriptHandler()
Method Detail

make

public static int make(JobRequest request)
Build the control script for the batch facility determined by BATCHFACILITY.

Parameters:
request - representing the job request to be submitted.
Returns:
0 is Ok, 1 invalid jobrequest, 2 user does not have privilege >=3 means some other problem.


setBatchFacility

public static void setBatchFacility(java.lang.String batchFacility)
Set batch facility for job submission.

Parameters:
batchFacility - The batch facility to which jobs will be submitted. Allowed values are "ucl_nqs", "manchester_pbs", "grid", "ucl_pbs", "sheffield_pbs".


getTemplate

public static java.lang.String getTemplate()
Returns template filename for the currently set batch facility.

Returns:
the template filename


getExecutable

public static java.lang.String getExecutable(Generator generator)
Returns executable filename for a specified generator and version.

Parameters:
generator -
version -
Returns:
the executable filename