com.phoenix_int.aserver.util.scriptwrapper.api
Interface ParseableFile

All Known Subinterfaces:
InputFile, OutputFile
All Known Implementing Classes:
AbstractFile, CAEOutputFile, PHXRowFieldFile, XPathFile

public interface ParseableFile

Interface for files (not file variables) used in script wrappers


Nested Class Summary
static class ParseableFile.Mode
          File mode Moved to type-safe enum from legacy integer constants
 
Method Summary
 void backup()
          Backup the file on disk.
 void close()
          Close the file and free up resources
 void delete()
          Delete the file from disk.
 void readTemplate()
          Read the template
 void setFileToGenerateOrParse(java.lang.String fileName)
          Set the file to generate or to parse, depending on the mode
 void setTempEmbedded(java.lang.String option)
          This method applies only to ModelCenter and has no function in Analysis Server
 void setTemplateFile(java.lang.String templateFileName)
          Set the template file to read.
 void setVariable(java.lang.String name, java.lang.String value)
          Sets the value of a variable
 

Method Detail

backup

void 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.


close

void close()
Close the file and free up resources


delete

void delete()
Delete the file from disk.


readTemplate

void readTemplate()
                  throws java.io.IOException,
                         com.phoenix_int.aserver.util.PHXInvalidFormatException,
                         PHXNoSuchTokenException,
                         java.lang.IllegalAccessException,
                         java.lang.InstantiationException,
                         PHXNumberFormatException,
                         PHXBookmarkNotFoundException,
                         PHXSectionNotFoundException
Read the template

Throws:
java.io.IOException
com.phoenix_int.aserver.util.PHXInvalidFormatException
PHXNoSuchTokenException
java.lang.IllegalAccessException
java.lang.InstantiationException
PHXNumberFormatException
PHXBookmarkNotFoundException
PHXSectionNotFoundException

setFileToGenerateOrParse

void setFileToGenerateOrParse(java.lang.String fileName)
Set the file to generate or to parse, depending on the mode

Parameters:
fileName -

setTempEmbedded

void setTempEmbedded(java.lang.String option)
This method applies only to ModelCenter and has no function in Analysis Server


setTemplateFile

void setTemplateFile(java.lang.String templateFileName)
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.

Parameters:
templateFileName - file name

setVariable

void setVariable(java.lang.String name,
                 java.lang.String value)
                 throws PHXNoSuchObjectException
Sets the value of a variable

Parameters:
name - variable name
value - variable value as a string
Throws:
PHXNoSuchObjectException