com.pcbsys.nirvana.nAdminAPI.nSchedulerBuildHelper Class Reference

This is a helper class used in the construction/parsing and validation of Nirvana Realm server Scheduler scripts. More...

Public Member Functions

int getItemType (String token)
 Returns the type of the string passed. More...
 
String getSource ()
 Returns the source passed in during the construction. More...
 
boolean isValid () throws nSchedulerParseException
 Parses and validates the script. More...
 
 nSchedulerBuildHelper (String source, nSchedulerManager manager)
 Constructs this helper class with the script source and the sheduler manager. More...
 
void setSource (String source)
 Changes the current source to the string supplied. More...
 

Static Public Attributes

static final int sDeclaredTask = 3
 Is a declared task.
 
static final int sDeclaredTrigger = 4
 Is a delcared Trigger.
 
static final int sKeyWord = 0
 Is a reserved Key word specified by the grammer.
 
static final int sTask = 2
 Is a defined task.
 
static final int sTrigger = 1
 Is a defined trigger.
 
static final int sUnknown = -1
 Unknown, typically this would mean the script is syntatically incorrect.
 

Detailed Description

This is a helper class used in the construction/parsing and validation of Nirvana Realm server Scheduler scripts.

Constructor & Destructor Documentation

com.pcbsys.nirvana.nAdminAPI.nSchedulerBuildHelper.nSchedulerBuildHelper ( String  source,
nSchedulerManager  manager 
)

Constructs this helper class with the script source and the sheduler manager.

Parameters
sourceof the script.
managernSchedulerManager to use to validate the script.

Member Function Documentation

int com.pcbsys.nirvana.nAdminAPI.nSchedulerBuildHelper.getItemType ( String  token)

Returns the type of the string passed.

Parameters
tokenString to perform the lookup on.
Returns
int type specified in the class definition.
String com.pcbsys.nirvana.nAdminAPI.nSchedulerBuildHelper.getSource ( )

Returns the source passed in during the construction.

Returns
source string.
boolean com.pcbsys.nirvana.nAdminAPI.nSchedulerBuildHelper.isValid ( ) throws nSchedulerParseException

Parses and validates the script.

If there are any errors in the script an exception is thrown specifying the linge and column of the offending syntax.

Returns
true if the script is valid.
Exceptions
nSchedulerParseExceptionif the script has errors.
void com.pcbsys.nirvana.nAdminAPI.nSchedulerBuildHelper.setSource ( String  source)

Changes the current source to the string supplied.

Parameters
sourcenew script to validate.