Project CASUAL
API for CASUAL
 All Classes Namespaces Functions Variables
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
CASUAL.caspac.Script Class Reference

Public Member Functions

 Script (CASUALSessionData sd, Script s)
 
 Script (CASUALSessionData sd, String name, String tempDir)
 
 Script (CASUALSessionData sd, String name, String tempDir, int type)
 
 Script (CASUALSessionData sd, String name, String script, String discription, List< File > includeFiles, String tempDir)
 
 Script (CASUALSessionData sd, String name, String script, String discription, List< File > includeFiles, Properties prop, String tempDir, int type)
 
 Script (CASUALSessionData sd, String name, String script, String discription, List< File > includeFiles, Properties prop, String tempDir)
 
 Script (CASUALSessionData sd, String name, String script, String discription, String tempDir)
 
Script copyOf (String newScriptName, String newTempDir)
 
boolean verifyScript ()
 
DataInputStream getScriptContents ()
 
String getScriptContentsString ()
 
String toString ()
 
Runnable getExtractionRunnable ()
 
void performUnzipAfterScriptZipfileUpdate () throws ZipException, IOException
 
Unzip getZipfile ()
 
void setZipfile (Unzip zipfile)
 
String getName ()
 
Script setName (String name)
 
String getTempDir ()
 
Script setScriptContents (String scriptContents)
 
List< File > getIndividualFiles ()
 
Script setIndividualFiles (List< File > individualFiles)
 
ScriptMeta getMetaData ()
 
Script setMetaData (ScriptMeta metaData)
 
String getDiscription ()
 
Script setDiscription (String discription)
 
boolean isScriptContinue ()
 
void setScriptContinue (boolean scriptContinue)
 
String getDeviceArch ()
 
void setDeviceArch (String deviceArch)
 
List< String > getActualMD5s ()
 
void setActualMD5s (List< String > actualMD5s)
 
 Script (CASUALSessionData sd, Script s)
 
 Script (CASUALSessionData sd, String name, String tempDir)
 
 Script (CASUALSessionData sd, String name, String tempDir, int type)
 
 Script (CASUALSessionData sd, String name, String script, String discription, List< File > includeFiles, String tempDir)
 
 Script (CASUALSessionData sd, String name, String script, String discription, List< File > includeFiles, Properties prop, String tempDir, int type)
 
 Script (CASUALSessionData sd, String name, String script, String discription, List< File > includeFiles, Properties prop, String tempDir)
 
 Script (CASUALSessionData sd, String name, String script, String discription, String tempDir)
 
Script copyOf (String newScriptName, String newTempDir)
 
boolean verifyScript ()
 
DataInputStream getScriptContents ()
 
String getScriptContentsString ()
 
String toString ()
 
Runnable getExtractionRunnable ()
 
void performUnzipAfterScriptZipfileUpdate () throws ZipException, IOException
 
Unzip getZipfile ()
 
void setZipfile (Unzip zipfile)
 
String getName ()
 
Script setName (String name)
 
String getTempDir ()
 
Script setScriptContents (String scriptContents)
 
List< File > getIndividualFiles ()
 
Script setIndividualFiles (List< File > individualFiles)
 
ScriptMeta getMetaData ()
 
Script setMetaData (ScriptMeta metaData)
 
String getDiscription ()
 
Script setDiscription (String discription)
 
boolean isScriptContinue ()
 
void setScriptContinue (boolean scriptContinue)
 
String getDeviceArch ()
 
void setDeviceArch (String deviceArch)
 
List< String > getActualMD5s ()
 
void setActualMD5s (List< String > actualMD5s)
 

Static Public Member Functions

static String getSlash ()
 
static String getSlash ()
 

Public Attributes

final int extractionMethod
 
Object scriptZipFile
 

Detailed Description

provides a way to read and write Script information for a Caspac

Author
Adam Outler adamo.nosp@m.utle.nosp@m.r@gma.nosp@m.il.c.nosp@m.om
loganludington

Constructor & Destructor Documentation

CASUAL.caspac.Script.Script ( CASUALSessionData  sd,
Script  s 
)

Creates a duplicate script from an old one.

Parameters
sdThe CASUALSessionData instace to use for this.
sscript to use as base.
CASUAL.caspac.Script.Script ( CASUALSessionData  sd,
String  name,
String  tempDir 
)

Creates a new script from a name and a temp folder.

Parameters
sdsession data to be used for this script
namename of script.
tempDirtemp folder to use.
CASUAL.caspac.Script.Script ( CASUALSessionData  sd,
String  name,
String  tempDir,
int  type 
)

Creates a new script from a name, tempdir and type.

Parameters
sdThe CASUALSessionData instace to use for this.
namename of script
tempDirtemp folder to use.
typethis.CASPAC, this.CASUAL, this.FILE. final int CASPAC = 0 final int CASUAL = 1; final int FILE = 2;
CASUAL.caspac.Script.Script ( CASUALSessionData  sd,
String  name,
String  script,
String  discription,
List< File >  includeFiles,
String  tempDir 
)

creates a new script with several parameters

Parameters
sdThe CASUALSessionData instace to use for this.
namename of script
scriptScript contents to use for script (scr file)
discriptiondescription of script (txt file)
includeFilesfiles to be used in script (zipfile)
tempDirtemp folder to use.
CASUAL.caspac.Script.Script ( CASUALSessionData  sd,
String  name,
String  script,
String  discription,
List< File >  includeFiles,
Properties  prop,
String  tempDir,
int  type 
)

creates a new script with several parameters

Parameters
sdThe CASUALSessionData instace to use for this.
namename of script
scriptScript contents to use for script (scr file)
discriptiondescription of script (txt file)
includeFilesfiles to be used in script (zipfile)
propproperties file to be used in script (meta)
tempDirtemp folder to use.
typetype of script (this.CASUAL this.CASPAC this.FILE).
CASUAL.caspac.Script.Script ( CASUALSessionData  sd,
String  name,
String  script,
String  discription,
List< File >  includeFiles,
Properties  prop,
String  tempDir 
)

creates a new script with several parameters

Parameters
sdThe CASUALSessionData instace to use for this.
namename of script
scriptScript contents to use for script (scr file)
discriptiondescription of script (txt file)
includeFilesfiles to be used in script (zipfile)
propproperties file to be used in script (meta)
tempDirtemp folder to use.
CASUAL.caspac.Script.Script ( CASUALSessionData  sd,
String  name,
String  script,
String  discription,
String  tempDir 
)

creates a new script with several parameters

Parameters
sdThe CASUALSessionData instace to use for this.
namename of script
scriptScript contents to use for script (scr file)
discriptiondescription of script (txt file)
tempDirtemp folder to use.
CASUAL.caspac.Script.Script ( CASUALSessionData  sd,
Script  s 
)

Creates a duplicate script from an old one.

Parameters
sdThe CASUALSessionData instace to use for this.
sscript to use as base.
CASUAL.caspac.Script.Script ( CASUALSessionData  sd,
String  name,
String  tempDir 
)

Creates a new script from a name and a temp folder.

Parameters
sdsession data to be used for this script
namename of script.
tempDirtemp folder to use.
CASUAL.caspac.Script.Script ( CASUALSessionData  sd,
String  name,
String  tempDir,
int  type 
)

Creates a new script from a name, tempdir and type.

Parameters
sdThe CASUALSessionData instace to use for this.
namename of script
tempDirtemp folder to use.
typethis.CASPAC, this.CASUAL, this.FILE. final int CASPAC = 0 final int CASUAL = 1; final int FILE = 2;
CASUAL.caspac.Script.Script ( CASUALSessionData  sd,
String  name,
String  script,
String  discription,
List< File >  includeFiles,
String  tempDir 
)

creates a new script with several parameters

Parameters
sdThe CASUALSessionData instace to use for this.
namename of script
scriptScript contents to use for script (scr file)
discriptiondescription of script (txt file)
includeFilesfiles to be used in script (zipfile)
tempDirtemp folder to use.
CASUAL.caspac.Script.Script ( CASUALSessionData  sd,
String  name,
String  script,
String  discription,
List< File >  includeFiles,
Properties  prop,
String  tempDir,
int  type 
)

creates a new script with several parameters

Parameters
sdThe CASUALSessionData instace to use for this.
namename of script
scriptScript contents to use for script (scr file)
discriptiondescription of script (txt file)
includeFilesfiles to be used in script (zipfile)
propproperties file to be used in script (meta)
tempDirtemp folder to use.
typetype of script (this.CASUAL this.CASPAC this.FILE).
CASUAL.caspac.Script.Script ( CASUALSessionData  sd,
String  name,
String  script,
String  discription,
List< File >  includeFiles,
Properties  prop,
String  tempDir 
)

creates a new script with several parameters

Parameters
sdThe CASUALSessionData instace to use for this.
namename of script
scriptScript contents to use for script (scr file)
discriptiondescription of script (txt file)
includeFilesfiles to be used in script (zipfile)
propproperties file to be used in script (meta)
tempDirtemp folder to use.
CASUAL.caspac.Script.Script ( CASUALSessionData  sd,
String  name,
String  script,
String  discription,
String  tempDir 
)

creates a new script with several parameters

Parameters
sdThe CASUALSessionData instace to use for this.
namename of script
scriptScript contents to use for script (scr file)
discriptiondescription of script (txt file)
tempDirtemp folder to use.

Member Function Documentation

Script CASUAL.caspac.Script.copyOf ( String  newScriptName,
String  newTempDir 
)

Returns a copy of the script with a new name and tempdir.

Parameters
newScriptNamenew script name
newTempDirnew tempdir
Returns
new script with tempdir and name.
Script CASUAL.caspac.Script.copyOf ( String  newScriptName,
String  newTempDir 
)

Returns a copy of the script with a new name and tempdir.

Parameters
newScriptNamenew script name
newTempDirnew tempdir
Returns
new script with tempdir and name.
List<String> CASUAL.caspac.Script.getActualMD5s ( )
Returns
the actualMD5s
List<String> CASUAL.caspac.Script.getActualMD5s ( )
Returns
the actualMD5s
String CASUAL.caspac.Script.getDeviceArch ( )
Returns
the deviceArch
String CASUAL.caspac.Script.getDeviceArch ( )
Returns
the deviceArch
String CASUAL.caspac.Script.getDiscription ( )
Returns
the discription
String CASUAL.caspac.Script.getDiscription ( )
Returns
the discription
Runnable CASUAL.caspac.Script.getExtractionRunnable ( )

gets a runnable object representing the entire extraction of the script from the zip file.

Returns
runnable extraction method.
Runnable CASUAL.caspac.Script.getExtractionRunnable ( )

gets a runnable object representing the entire extraction of the script from the zip file.

Returns
runnable extraction method.
List<File> CASUAL.caspac.Script.getIndividualFiles ( )
Returns
the individualFiles
List<File> CASUAL.caspac.Script.getIndividualFiles ( )
Returns
the individualFiles
ScriptMeta CASUAL.caspac.Script.getMetaData ( )
Returns
the metaData
ScriptMeta CASUAL.caspac.Script.getMetaData ( )
Returns
the metaData
String CASUAL.caspac.Script.getName ( )
Returns
the name
String CASUAL.caspac.Script.getName ( )
Returns
the name
DataInputStream CASUAL.caspac.Script.getScriptContents ( )

gets the script contents (SCR) file.

Returns
contents of script.
DataInputStream CASUAL.caspac.Script.getScriptContents ( )

gets the script contents (SCR) file.

Returns
contents of script.
static String CASUAL.caspac.Script.getSlash ( )
static
Returns
the slash
static String CASUAL.caspac.Script.getSlash ( )
static
Returns
the slash
String CASUAL.caspac.Script.getTempDir ( )
Returns
the tempDir
String CASUAL.caspac.Script.getTempDir ( )
Returns
the tempDir
Unzip CASUAL.caspac.Script.getZipfile ( )
Returns
the zipfile
Unzip CASUAL.caspac.Script.getZipfile ( )
Returns
the zipfile
boolean CASUAL.caspac.Script.isScriptContinue ( )
Returns
the scriptContinue
boolean CASUAL.caspac.Script.isScriptContinue ( )
Returns
the scriptContinue
void CASUAL.caspac.Script.performUnzipAfterScriptZipfileUpdate ( ) throws ZipException, IOException

performs unzip and is to be run after script zipfile update, not during script init.

Exceptions
ZipExceptionwhen zip is corrupt
IOExceptionwhen permissions problem exists.
void CASUAL.caspac.Script.performUnzipAfterScriptZipfileUpdate ( ) throws ZipException, IOException

performs unzip and is to be run after script zipfile update, not during script init.

Exceptions
ZipExceptionwhen zip is corrupt
IOExceptionwhen permissions problem exists.
void CASUAL.caspac.Script.setActualMD5s ( List< String >  actualMD5s)
Parameters
actualMD5sthe actualMD5s to set
void CASUAL.caspac.Script.setActualMD5s ( List< String >  actualMD5s)
Parameters
actualMD5sthe actualMD5s to set
void CASUAL.caspac.Script.setDeviceArch ( String  deviceArch)
Parameters
deviceArchthe deviceArch to set
void CASUAL.caspac.Script.setDeviceArch ( String  deviceArch)
Parameters
deviceArchthe deviceArch to set
Script CASUAL.caspac.Script.setDiscription ( String  discription)
Parameters
discriptionthe discription to set
Returns
this Script
Script CASUAL.caspac.Script.setDiscription ( String  discription)
Parameters
discriptionthe discription to set
Returns
this Script
Script CASUAL.caspac.Script.setIndividualFiles ( List< File >  individualFiles)
Parameters
individualFilesthe individualFiles to set
Returns
this Script
Script CASUAL.caspac.Script.setIndividualFiles ( List< File >  individualFiles)
Parameters
individualFilesthe individualFiles to set
Returns
this Script
Script CASUAL.caspac.Script.setMetaData ( ScriptMeta  metaData)
Parameters
metaDatathe metaData to set
Returns
this Script
Script CASUAL.caspac.Script.setMetaData ( ScriptMeta  metaData)
Parameters
metaDatathe metaData to set
Returns
this Script
Script CASUAL.caspac.Script.setName ( String  name)
Parameters
namethe name to set
Returns
this Script
Script CASUAL.caspac.Script.setName ( String  name)
Parameters
namethe name to set
Returns
this Script
Script CASUAL.caspac.Script.setScriptContents ( String  scriptContents)
Parameters
scriptContentsthe scriptContents to set
Returns
this Script
Script CASUAL.caspac.Script.setScriptContents ( String  scriptContents)
Parameters
scriptContentsthe scriptContents to set
Returns
this Script
void CASUAL.caspac.Script.setScriptContinue ( boolean  scriptContinue)
Parameters
scriptContinuethe scriptContinue to set
void CASUAL.caspac.Script.setScriptContinue ( boolean  scriptContinue)
Parameters
scriptContinuethe scriptContinue to set
void CASUAL.caspac.Script.setZipfile ( Unzip  zipfile)
Parameters
zipfilethe zipfile to set
void CASUAL.caspac.Script.setZipfile ( Unzip  zipfile)
Parameters
zipfilethe zipfile to set
boolean CASUAL.caspac.Script.verifyScript ( )

verifies script contents to ensure script is a valid script and can be used.

Returns
true if valid script.
boolean CASUAL.caspac.Script.verifyScript ( )

verifies script contents to ensure script is a valid script and can be used.

Returns
true if valid script.

Member Data Documentation

final int CASUAL.caspac.Script.extractionMethod

Specifies the extraction method for the script. final int CASPAC = 0 final int CASUAL = 1; final int FILE = 2;

Object CASUAL.caspac.Script.scriptZipFile

zipFile Entry, Resource or File on disk.


The documentation for this class was generated from the following file: