|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.phoenix_int.aserver.util.scriptwrapper.api.PHXScriptWrapperObject
public class PHXScriptWrapperObject
This object is passed to Script Wrapper scripts and provides the "wrapper" global object which provides runtime services for the wrapper.
| Constructor Summary | |
|---|---|
PHXScriptWrapperObject(com.phoenix_int.aserver.util.scriptwrapper.PHXScriptWrapper wrapper)
Constructs a wrapper object from a ScriptWrapper instance. |
|
| Method Summary | |
|---|---|
void |
addAutoClose(java.io.Closeable file)
Add the opened file to the file Handlers list |
void |
addConsoleVariables()
|
void |
addMethod(java.lang.String methodName)
Publicizes a method to our clients. |
void |
addMethod(java.lang.String methodName,
boolean downloadInputs)
Publicizes a method to our clients. |
void |
addMethod(java.lang.String methodName,
java.lang.String fullName)
Publicizes a method to our clients. |
void |
addMethod(java.lang.String methodName,
java.lang.String fullName,
boolean downloadInputs)
Publicizes a method to our clients. |
IPHXType |
addVariable(java.lang.String name,
java.lang.String type,
boolean isInput)
Adds a variable to this component. |
void |
backupFile(java.lang.String varName,
java.lang.String fileName)
Backup the file on disk. |
void |
defaultExecutableMapping(java.lang.String name,
java.lang.String location)
|
void |
deleteFile(java.lang.String varName,
java.lang.String fileName)
Deletes the given file variable's file |
com.phoenix_int.aserver.ascore.PHXConnection |
getConnection()
gets the connection object |
java.util.Hashtable |
getDictionary()
gets the dictionary object |
java.lang.String |
getDirectory()
Returns the directory where this component was loaded from |
java.lang.String |
getRunDirectory()
Returns the current "run" directory, which is the same as getDirectory() unless run sharing is being used. |
PHXRunShareContext |
getRunShare()
Returns the PHXRunShareContext object used for process control and monitoring with this component |
IPHXType |
getVariable(java.lang.String name)
Returns a reference to the named variable. |
void |
parseFile(java.lang.String varName,
java.lang.String fileName,
boolean throwParseError)
Read the given file variable from the specified file |
void |
removeAutoClose(java.io.Closeable file)
Remove the file from the file Handlers list |
void |
removeVariable(java.lang.String name)
Dynamically removes a variable from this component |
void |
requireAnalysisServerVersion(int majorVersion,
int minorVersion)
Verifies we're running a compatible version of Analysis Server |
void |
setBinary(java.lang.String varName)
Make a given file variable binary |
void |
setConnection(com.phoenix_int.aserver.ascore.PHXConnection c)
sets the connection object |
void |
sleep(long millisecs)
sleeps for a period of time |
void |
trace(java.lang.String msg)
Prints a string to the trace window |
void |
updateConsoleVariables()
|
void |
writeFile(java.lang.String varName,
java.lang.String fileName)
Write the given file variable out to the specified file |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PHXScriptWrapperObject(com.phoenix_int.aserver.util.scriptwrapper.PHXScriptWrapper wrapper)
| Method Detail |
|---|
public void addMethod(java.lang.String methodName)
throws PHXNameAlreadyInUseException,
PHXInvalidNameException
methodName - The name of the method to publicize
PHXNameAlreadyInUseException
PHXInvalidNameException
public void addMethod(java.lang.String methodName,
java.lang.String fullName)
throws PHXNameAlreadyInUseException,
PHXInvalidNameException
methodName - The name of the method to publicize.fullName - A human readable name to show in GUI
programs for this method. For example, ModelCenter
will show this in the right click menu of a component.
PHXNameAlreadyInUseException
PHXInvalidNameException
public void addMethod(java.lang.String methodName,
boolean downloadInputs)
throws PHXNameAlreadyInUseException,
PHXInvalidNameException
methodName - The name of the method to publicize.downloadInputs - Hint passed to the client on whether the
inputs should be downloaded after the method is run.
PHXNameAlreadyInUseException
PHXInvalidNameException
public void addMethod(java.lang.String methodName,
java.lang.String fullName,
boolean downloadInputs)
throws PHXNameAlreadyInUseException,
PHXInvalidNameException
methodName - The name of the method to publicize.fullName - A human readable name to show in GUI
programs for this method. For example, ModelCenter
will show this in the right click menu of a component.downloadInputs - Hint passed to the client on whether the
inputs should be downloaded after the method is run.
PHXNameAlreadyInUseException
PHXInvalidNameException
public IPHXType addVariable(java.lang.String name,
java.lang.String type,
boolean isInput)
throws PHXNameAlreadyInUseException,
PHXInvalidNameException,
PHXInvalidTypeException
| Type | Aliases | Associated PHXType |
|---|---|---|
| double | real | PHXDouble |
| integer | int,long | PHXLong |
| string | str | PHXString |
| boolean | bool | PHXBoolean |
| geometry | geom | PHXGeometry |
| file | PHXRawFile |
name - The full name of the new variable. May include
group specification with '.'.type - The type of variable to create. Use the same
type strings as for the variable: statemensts at the top
of the ScriptWrapper.isInput - If true, the variable will be an input, if
false, it will be an output.
PHXNameAlreadyInUseException - Thrown if there is already a variable by that name.
PHXInvalidNameException - Thrown if the name uses invalid characters like space.
com.phoenix_int.aserver.PHXInvalidTypeException - Thrown if the type string is not understood
PHXInvalidTypeException
public IPHXType getVariable(java.lang.String name)
throws PHXNoSuchObjectException
PHXNoSuchObjectException
public void removeVariable(java.lang.String name)
throws PHXNoSuchObjectException
PHXNoSuchObjectException
public void addConsoleVariables()
throws PHXNameAlreadyInUseException,
PHXInvalidNameException,
PHXInvalidTypeException
PHXNameAlreadyInUseException
PHXInvalidNameException
PHXInvalidTypeException
public void updateConsoleVariables()
throws PHXNoSuchObjectException
PHXNoSuchObjectExceptionpublic java.lang.String getDirectory()
public PHXRunShareContext getRunShare()
public java.lang.String getRunDirectory()
public void sleep(long millisecs)
millisecs - the amount of time to sleeppublic com.phoenix_int.aserver.ascore.PHXConnection getConnection()
public void setConnection(com.phoenix_int.aserver.ascore.PHXConnection c)
public java.util.Hashtable getDictionary()
public void setBinary(java.lang.String varName)
throws PHXInvalidTypeException,
PHXNoSuchObjectException
varName - the name of the file variable
PHXInvalidTypeException
PHXNoSuchObjectException
public void writeFile(java.lang.String varName,
java.lang.String fileName)
throws PHXInvalidTypeException,
PHXNoSuchObjectException,
java.io.IOException
varName - the name of the file variablefileName - the name of the target file
PHXInvalidTypeException
PHXNoSuchObjectException
java.io.IOException
public void parseFile(java.lang.String varName,
java.lang.String fileName,
boolean throwParseError)
throws PHXInvalidTypeException,
PHXNoSuchObjectException,
java.io.IOException
varName - the name of the file variablefileName - the name of the target file
PHXInvalidTypeException
PHXNoSuchObjectException
java.io.IOException
public void deleteFile(java.lang.String varName,
java.lang.String fileName)
throws PHXInvalidTypeException,
PHXNoSuchObjectException,
java.io.IOException
varName - the name of the file variablefileName - the name of the target file
PHXInvalidTypeException
PHXNoSuchObjectException
java.io.IOException
public void backupFile(java.lang.String varName,
java.lang.String fileName)
throws PHXInvalidTypeException,
PHXNoSuchObjectException,
java.io.IOException
varName - the name of the file variablefileName - the name of the target file
PHXInvalidTypeException
PHXNoSuchObjectException
java.io.IOException
public void defaultExecutableMapping(java.lang.String name,
java.lang.String location)
public void trace(java.lang.String msg)
msg - the message to print
public void requireAnalysisServerVersion(int majorVersion,
int minorVersion)
throws PHXVersionException
majorVersion - required major versionminorVerions - required minor version
PHXVersionExceptionpublic void addAutoClose(java.io.Closeable file)
file - the closeable filepublic void removeAutoClose(java.io.Closeable file)
file - the closeable file
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||