|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
com.phenix.pct.PCT
com.phenix.pct.PCTRun
public class PCTRun
Run a Progress procedure.
| Field Summary | |
|---|---|
protected Collection |
dbConnList
|
protected org.apache.tools.ant.taskdefs.ExecTask |
exec
|
protected int |
initID
|
protected File |
initProc
|
protected org.apache.tools.ant.types.Path |
internalPropath
|
protected List |
outputParameters
|
protected File |
outputStream
|
protected int |
outputStreamID
|
protected File |
pctLib
|
protected int |
plID
|
protected String |
procedure
|
protected org.apache.tools.ant.types.Path |
propath
|
protected Collection |
runParameters
|
protected File |
status
|
protected int |
statusID
|
| Fields inherited from class org.apache.tools.ant.Task |
|---|
target, taskName, taskType, wrapper |
| Fields inherited from class org.apache.tools.ant.ProjectComponent |
|---|
description, location, project |
| Constructor Summary | |
|---|---|
PCTRun()
Default constructor |
|
PCTRun(boolean tmp)
Default constructor |
|
PCTRun(boolean tmp,
boolean batchMode)
|
|
| Method Summary | |
|---|---|
void |
addOption(PCTRunOption option)
Adds a new command line option |
void |
addOutputParameter(OutputParameter param)
Add a new output param which will be passed to progress procedure |
void |
addParameter(RunParameter param)
Add a new parameter which will be passed to the progress procedure in a temp-table |
void |
addPCTConnection(PCTConnection dbConn)
Adds a database connection |
void |
addPCTRunOption(PCTRunOption option)
|
void |
addPropath(org.apache.tools.ant.types.Path propath)
Set the propath to be used when running the procedure |
protected void |
cleanup()
Delete temporary files if debug not activated |
org.apache.tools.ant.types.Path |
createPropath()
Creates a new Path instance |
protected static String |
escapeString(String str)
Escapes a string so it does not accidentally contain Progress escape characters |
void |
execute()
Do the work |
protected List |
getCmdLineParameters()
|
protected boolean |
getDebugPCT()
Return PCT Debug status |
protected String |
getStatusFileName()
Returns status file name (where to write progress procedure result) |
boolean |
isPrepared()
Exec task is prepared ? |
protected void |
maybeSetResultPropertyValue(int result)
Helper method to set result property to the passed in value if appropriate. |
protected void |
prepareExecTask()
Creates and initialize |
protected void |
preparePropath()
|
void |
setBaseDir(File baseDir)
The directory in which the Progress runtime should be executed. |
void |
setCenturyYearOffset(int centuryYearOffset)
Century year offset (-yy attribute) |
void |
setCompileUnderscore(boolean compUnderscore)
If files beginning with an underscore should be compiled (-zn option) See POSSE documentation for more details |
void |
setCpInternal(String cpInternal)
Internal code page (-cpinternal attribute) |
void |
setCpStream(String cpStream)
Stream code page (-cpstream attribute) |
void |
setDebugPCT(boolean debugPCT)
Turns on/off debugging mode (keeps Progress temp files on disk) |
void |
setDebugReady(int debugReady)
Port number on which debugger should connect (-debugReady parameter) |
void |
setDirSize(int dirSize)
The number of compiled procedure directory entries (-D attribute) |
protected void |
setExecTaskParams()
|
void |
setFailOnError(boolean failOnError)
Sets the failOnError parameter. |
void |
setGraphicalMode(boolean graphMode)
Graphical mode on/off (call to _progres or prowin32) |
void |
setIniFile(File iniFile)
Sets .ini file to use (-basekey INI -ininame xxx) |
void |
setInputChars(int inputChars)
The number of characters allowed in a single statement (-inp attribute) |
void |
setMaximumMemory(int maximumMemory)
The amount of memory allocated for r-code segments |
void |
setMsgBufferSize(int msgBufSize)
Message buffer size (-Mm attribute) |
void |
setNumDec(String numdec)
Decimal separator (-numdec attribute) |
void |
setNumSep(String numsep)
Thousands separator (-numsep attribute) |
void |
setParameter(String param)
Parameter (-param attribute) |
void |
setParameters(Collection params)
Defines a new collection of parameters |
void |
setParamFile(File pf)
Parameter file (-pf attribute) |
void |
setProcedure(String procedure)
Procedure to be run (not -p param, this parameter is always pct_initXXX.p) |
void |
setResultProperty(String resultProperty)
Sets the name of a property in which the return valeur of the Progress procedure should be stored. |
void |
setStackSize(int stackSize)
The size of the stack in 1KB units. |
void |
setTempDir(File tempDir)
Temporary directory for Progress runtime (-T parameter) |
void |
setToken(int token)
The number of tokens allowed in a 4GL statement (-tok attribute) |
void |
setTTBufferSize(int ttBufferSize)
Buffer Size for Temporary Tables (-Bt attribute) |
| Methods inherited from class com.phenix.pct.PCT |
|---|
addEnv, checkDlcHome, deleteDirectory, extractPL, extractPL, getDlcBin, getDlcHome, getDLCMaintenanceVersion, getDLCMajorVersion, getDLCMinorVersion, getDLCPatchLevel, getDLCRevision, getEnvironment, getExecPath, getFullVersion, getIncludedPL, getJavaFileset, getJavaFileset, getProgressProcedures, getRCodeVersion, getReducedVersion, isSourceCodeUsed, nextRandomInt, setDlcBin, setDlcHome, setDlcJava, setIncludedPL |
| Methods inherited from class org.apache.tools.ant.Task |
|---|
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType |
| Methods inherited from class org.apache.tools.ant.ProjectComponent |
|---|
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected String procedure
protected Collection dbConnList
protected org.apache.tools.ant.types.Path propath
protected org.apache.tools.ant.types.Path internalPropath
protected Collection runParameters
protected List outputParameters
protected org.apache.tools.ant.taskdefs.ExecTask exec
protected int statusID
protected int initID
protected int plID
protected int outputStreamID
protected File initProc
protected File status
protected File pctLib
protected File outputStream
| Constructor Detail |
|---|
public PCTRun()
public PCTRun(boolean tmp)
tmp - True if temporary files need to be created
public PCTRun(boolean tmp,
boolean batchMode)
| Method Detail |
|---|
public void addPCTConnection(PCTConnection dbConn)
dbConn - Instance of PCTConnection classpublic void addOption(PCTRunOption option)
option - Instance of PCTRunOption classpublic void addPCTRunOption(PCTRunOption option)
public void addParameter(RunParameter param)
param - Instance of RunParameter classpublic void addOutputParameter(OutputParameter param)
param - Instance of OutputParameterpublic void setParameters(Collection params)
params - Collectionpublic void setParamFile(File pf)
pf - Filepublic void setNumSep(String numsep)
numsep - Stringpublic void setNumDec(String numdec)
numdec - Stringpublic void setParameter(String param)
param - Stringpublic void setDebugPCT(boolean debugPCT)
debugPCT - booleanpublic void setCompileUnderscore(boolean compUnderscore)
compUnderscore - booleanpublic void setDirSize(int dirSize)
dirSize - intpublic void setGraphicalMode(boolean graphMode)
graphMode - booleanpublic void setIniFile(File iniFile)
iniFile - Filepublic void setFailOnError(boolean failOnError)
failOnError - public void setProcedure(String procedure)
procedure - Stringpublic void addPropath(org.apache.tools.ant.types.Path propath)
propath - an Ant Path object containing the propathpublic org.apache.tools.ant.types.Path createPropath()
public void setCpStream(String cpStream)
cpStream - Stringpublic void setCpInternal(String cpInternal)
cpInternal - Stringpublic void setInputChars(int inputChars)
inputChars - Integerpublic void setCenturyYearOffset(int centuryYearOffset)
centuryYearOffset - Integerpublic void setToken(int token)
token - intpublic void setMaximumMemory(int maximumMemory)
maximumMemory - intpublic void setStackSize(int stackSize)
stackSize - intpublic void setTTBufferSize(int ttBufferSize)
ttBufferSize - intpublic void setMsgBufferSize(int msgBufSize)
msgBufSize - intpublic void setDebugReady(int debugReady)
debugReady - intpublic void setTempDir(File tempDir)
tempDir - Filepublic void setBaseDir(File baseDir)
baseDir - Filepublic void setResultProperty(String resultProperty)
resultProperty - name of property.protected void maybeSetResultPropertyValue(int result)
result - value desired for the result property value.public boolean isPrepared()
protected String getStatusFileName()
public void execute()
throws org.apache.tools.ant.BuildException
execute in class PCTorg.apache.tools.ant.BuildException - Something went wrongprotected void prepareExecTask()
protected List getCmdLineParameters()
protected void setExecTaskParams()
protected void preparePropath()
protected static String escapeString(String str)
str - the input string
protected boolean getDebugPCT()
protected void cleanup()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||