Skip to main content
Package: com.phoenix_int.aserver.util.scriptwrapper.api Class Hierarchy
Implemented Interfaces Direct Known Subclasses
  • CAEOutputFile, PHXRowFieldFile, XPathFile

Declaration

Common implementation for files (not file variables) used in script wrappers.

Nested Class Summary

Nested classes/interfaces inherited from interface com.phoenix_int.aserver.util.scriptwrapper.api.ParseableFile

ParseableFile.Mode

Field Summary

Constructor Summary

Method Summary

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

mode

wrapper

parser

templateFileName

fileName

encoding

Constructor Detail

AbstractFile

Pre-QuickWrap PHXRowFieldFile constructor did not have a PHXScriptWrapperObject argument. This constructor handles the legacy case, which, in all likelihood, will continue to be used. Parameters:
  • baseDir - base directory containing template files, etc.
  • mode - parsing mode

AbstractFile

AbstractFile

Parameters:
  • wrapper - may be null for legacy constructor compatibility
  • dir -
  • mode -

Method Detail

backup

Backup the file on disk. File is at the same location with “.bac” appended to the end. If a file by that name already exists, it is deleted prior to moving. Specified by:
  • backup in interface ParseableFile

close

Close the file and free up resources Specified by:
  • close in interface ParseableFile
  • close in interface java.io.Closeable
  • close in interface java.lang.AutoCloseable

delete

Delete the file from disk. Specified by:
  • delete in interface ParseableFile

newParser

Generate a new parser for the given file and mode Parameters:
  • rFile - The file to open
  • pmode - caching mode for underlying parser
Throws:
  • java.io.IOException

ensureFileParser

Ensure there is a valid parser Parameters:
  • mode - parser mode in current context
Throws:
  • java.io.IOException

getEncoding

setEncoding

setEncoding

getRealFile

Get the file on disk, possibly relative to the current run-share directory Parameters:
  • fileName -
Returns:

actionByMode

Perform an action consistent with ParseableFile.Mode Parameters:
  • mode -
Throws:

readTemplate

Read the template. In MCRE 7.1, this method was changed to never throw any exceptions. Reading the templates allows you to fill in default values if you can, but is not mandatory. Specified by:
  • readTemplate in interface ParseableFile
Throws:

setFileToGenerateOrParse

Set the file to generate or to parse, depending on the mode Specified by:
  • setFileToGenerateOrParse in interface ParseableFile

setTempEmbedded

This method applies only to ModelCenter and has no function in ModelCenter Remote Execution Specified by:
  • setTempEmbedded in interface ParseableFile

setTemplateFile

Set the template file to read. If the template file is not specified, it defaults to the file that is parsed or generated, for Mode.PARSE or Mode.GENERATE, respectively. Specified by:
  • setTemplateFile in interface ParseableFile
Parameters:
  • templateFileName - file name

setVariable

Sets the value of a variable Specified by:
  • setVariable in interface ParseableFile
Parameters:
  • name - variable name
  • value - variable value as a string
Throws:
  • PHXNoSuchObjectException

transferVars

Transfer values for variables that have been defined using methods from the concrete implementation, i.e. PHXRowFieldFile.defineVar(String, String, boolean, String). Variables defined using PHXScriptWrapperObject.addVariable(String, String, boolean) must be explicitly transferred using methods of the concrete implementation class Parameters:
  • mode -
Throws: