com.symbian.et.test.environment
Class TestDriverConfig

java.lang.Object
  extended bycom.symbian.et.test.environment.TestDriverConfig

public final class TestDriverConfig
extends java.lang.Object

File-based implementation of a TestDriver config file. This is not compatible with TD v1.0

Author:
EngineeringTools

Field Summary
private static java.lang.String BLDMAKE
          Run Bldmake true or false.
private static java.lang.String CERT
          Location of certificate to sign SIS files.
private static java.lang.String CLEAN
          Run clean on bldmake and abld, true or false.
private static java.lang.String COPYRIGHT
          Copyright of TestDriver.
private static java.lang.String ENTRY_POINT_ADDRESS
          The entry point address for TestDriver to run.
private static java.lang.String EPOCROOT
          EPOCROOT of TestDriver.
private static int iRunNumber
           
private static java.io.File iSystemPrefFile
           
private static java.lang.String iTefHtmlResultLocation
           
private static java.lang.String iTefXmlResultLocation
           
private static java.io.File iUserPrefFile
           
private static java.lang.String KEY
          Location of key to sign SIS files.
private static java.lang.String NAME
          Name of the TestDriver program.
private static java.lang.String NODENAME
          Name of the preferences node.
private static java.lang.String PLATFORM
          Default Platform.
private static java.lang.String PLATSEC
          Platform Security (PlatSec) true or false.
private static java.lang.String REPOSITORYROOT
          Repository Root of TestDriver.
private static java.lang.String RESULTSROOT
          Result Root of TestDriver.
private static java.lang.String RUN_NUMBER
          The current run number.
private static java.lang.String SOURCEROOT
          Source Root of TestDriver.
private static java.util.prefs.Preferences SYSTEMPREFERENCES
          The preferences that are system dependent.
private static java.lang.String TEST_EXECUTE_DEPENDENCIES
           
private static java.lang.String TESTDRIVER
          Testdriver prefix.
private static TestDriverConfig TESTDRIVERCONFIG
          Singleton reference to TestDriverConfig.
private static java.lang.String TESTEXECUTE
          TestExecute true or false.
private static java.lang.String TRANSPORT
          Default Transport.
private static java.util.prefs.Preferences USERPREFERENCES
          The preferences that are user dependent.
private static java.lang.String VARIANT
          Default Variant.
private static java.lang.String VERSION
          Version number of TestDriver.
private static java.lang.String VERSION_NUMBER
          Version of pgroam.
private static java.lang.String XMLROOT
          XML Root of TestDriver.
private static int YEAR
          Year of Copyright.
 
Constructor Summary
private TestDriverConfig(java.io.File aUserPrefFile, java.io.File aSystemPrefFile)
          Standard constructor for TestDriverConfig.
 
Method Summary
static java.io.File getCert()
           
static java.lang.String getEntryPointAddress()
           
static java.io.File getEpocroot()
           
static TestDriverConfig getInstance(java.io.File aUserPrefFile, java.io.File aSystemPrefFile)
           
static java.io.File getKey()
           
static java.lang.String getNameYearVersion()
           
static java.lang.String getPlatform()
           
static java.io.File getRepository()
           
static java.lang.String getResultHtmlFileLocation()
           
static java.lang.String getResultroot()
           
static java.lang.String getResultXmlFileLocation()
           
static int getRunNumber()
           
static java.io.File getSourceroot()
           
static java.lang.String[] getTestExecuteDependencies()
          This method gets the list of dependencies for the Test Execute Framework (TEF).
static java.lang.String getTransport()
           
static java.lang.String getVariant()
           
static java.io.File getXmlroot()
           
static void incrementRunNumber()
          Increments the run number by 1.
static boolean isBldmake()
           
static boolean isClean()
           
static boolean isPlatsec()
           
static boolean isTestExecute()
           
static void setBldmake(boolean aBldmake)
           
static void setCert(java.io.File aCert)
           
static void setClean(boolean aClean)
           
static void setEntryPointAddress(java.lang.String aEntryPointAddress)
           
static void setEpocroot(java.io.File aEpocroot)
           
static void setKey(java.io.File aKey)
           
static void setPlatform(java.lang.String aPlatform)
           
static void setPlatsec(boolean aPlatsec)
           
static void setRepositoryroot(java.lang.String aRepositoryroot)
           
static void setResultroot(java.lang.String aResultsroot)
           
static void setSourceroot(java.lang.String aSourceroot)
           
static void setTestExecute(boolean aTestexecute)
           
static void setTransport(java.lang.String aTransport)
           
static void setVariant(java.lang.String aVariant)
           
static void setXmlroot(java.lang.String aXmlroot)
           
static void storeTestDriverConfig()
          Save the Configuration settings to a file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TESTDRIVER

private static final java.lang.String TESTDRIVER
Testdriver prefix.

See Also:
Constant Field Values

BLDMAKE

private static final java.lang.String BLDMAKE
Run Bldmake true or false.

See Also:
Constant Field Values

CERT

private static final java.lang.String CERT
Location of certificate to sign SIS files.

See Also:
Constant Field Values

CLEAN

private static final java.lang.String CLEAN
Run clean on bldmake and abld, true or false.

See Also:
Constant Field Values

COPYRIGHT

private static final java.lang.String COPYRIGHT
Copyright of TestDriver.

See Also:
Constant Field Values

ENTRY_POINT_ADDRESS

private static final java.lang.String ENTRY_POINT_ADDRESS
The entry point address for TestDriver to run.

See Also:
Constant Field Values

EPOCROOT

private static final java.lang.String EPOCROOT
EPOCROOT of TestDriver.

See Also:
Constant Field Values

KEY

private static final java.lang.String KEY
Location of key to sign SIS files.

See Also:
Constant Field Values

NAME

private static final java.lang.String NAME
Name of the TestDriver program.

See Also:
Constant Field Values

NODENAME

private static java.lang.String NODENAME
Name of the preferences node.


PLATFORM

private static final java.lang.String PLATFORM
Default Platform.

See Also:
Constant Field Values

PLATSEC

private static final java.lang.String PLATSEC
Platform Security (PlatSec) true or false.

See Also:
Constant Field Values

REPOSITORYROOT

private static final java.lang.String REPOSITORYROOT
Repository Root of TestDriver.

See Also:
Constant Field Values

RESULTSROOT

private static final java.lang.String RESULTSROOT
Result Root of TestDriver.

See Also:
Constant Field Values

RUN_NUMBER

private static final java.lang.String RUN_NUMBER
The current run number.

See Also:
Constant Field Values

SOURCEROOT

private static final java.lang.String SOURCEROOT
Source Root of TestDriver.

See Also:
Constant Field Values

SYSTEMPREFERENCES

private static java.util.prefs.Preferences SYSTEMPREFERENCES
The preferences that are system dependent.


TESTDRIVERCONFIG

private static TestDriverConfig TESTDRIVERCONFIG
Singleton reference to TestDriverConfig.


TESTEXECUTE

private static final java.lang.String TESTEXECUTE
TestExecute true or false.

See Also:
Constant Field Values

TRANSPORT

private static final java.lang.String TRANSPORT
Default Transport.

See Also:
Constant Field Values

USERPREFERENCES

private static java.util.prefs.Preferences USERPREFERENCES
The preferences that are user dependent.


VARIANT

private static final java.lang.String VARIANT
Default Variant.

See Also:
Constant Field Values

VERSION

private static final java.lang.String VERSION
Version number of TestDriver.

See Also:
Constant Field Values

VERSION_NUMBER

private static final java.lang.String VERSION_NUMBER
Version of pgroam.

See Also:
Constant Field Values

XMLROOT

private static final java.lang.String XMLROOT
XML Root of TestDriver.

See Also:
Constant Field Values

YEAR

private static final int YEAR
Year of Copyright.

See Also:
Constant Field Values

TEST_EXECUTE_DEPENDENCIES

private static final java.lang.String TEST_EXECUTE_DEPENDENCIES
See Also:
Constant Field Values

iUserPrefFile

private static java.io.File iUserPrefFile

iSystemPrefFile

private static java.io.File iSystemPrefFile

iTefHtmlResultLocation

private static java.lang.String iTefHtmlResultLocation

iTefXmlResultLocation

private static java.lang.String iTefXmlResultLocation

iRunNumber

private static int iRunNumber
Constructor Detail

TestDriverConfig

private TestDriverConfig(java.io.File aUserPrefFile,
                         java.io.File aSystemPrefFile)
                  throws java.io.IOException,
                         java.lang.IllegalArgumentException
Standard constructor for TestDriverConfig.

Parameters:
aUserPrefFile - Location on the file system where User TestDriver configuration settings are saved.
aSystemPrefFile - Location on the file system where System TestDriver configuration settings are saved.
Throws:
java.lang.IllegalArgumentException - If there is a problem loading or creating the Configuration file.
java.io.IOException
Method Detail

getInstance

public static TestDriverConfig getInstance(java.io.File aUserPrefFile,
                                           java.io.File aSystemPrefFile)
                                    throws java.io.IOException,
                                           java.lang.IllegalArgumentException
Parameters:
aUserPrefFile - The user preferences XML file.
aSystemPrefFile - The systems preference XML file.
Returns:
The TestDriverConfig Singleton
Throws:
java.io.IOException - If the preferences setup fails.
java.lang.IllegalArgumentException

storeTestDriverConfig

public static void storeTestDriverConfig()
                                  throws java.io.IOException
Save the Configuration settings to a file.

Throws:
java.io.IOException - If the saving doesn't work.

getCert

public static java.io.File getCert()
Returns:
The certificate to sign the SIS packages with for PlatSec on.

getEntryPointAddress

public static java.lang.String getEntryPointAddress()
Returns:
The entry point address.

getEpocroot

public static java.io.File getEpocroot()
Returns:
The epoc root directory.

getKey

public static java.io.File getKey()
Returns:
The key to sign the SIS package with for PlatSec on.

getNameYearVersion

public static java.lang.String getNameYearVersion()
Returns:
A string formatteds as: \ v\ (\).

getPlatform

public static java.lang.String getPlatform()
Returns:
The platform to build to.

getRepository

public static java.io.File getRepository()
Returns:
The repository root directory.

getResultHtmlFileLocation

public static java.lang.String getResultHtmlFileLocation()
                                                  throws java.io.IOException
Returns:
The result file location
Throws:
java.io.IOException

getResultXmlFileLocation

public static java.lang.String getResultXmlFileLocation()
                                                 throws java.io.IOException
Returns:
The result file location
Throws:
java.io.IOException

getResultroot

public static java.lang.String getResultroot()
Returns:
The result directory of the source code.

getRunNumber

public static int getRunNumber()
Returns:
The current run number.

getSourceroot

public static java.io.File getSourceroot()
Returns:
The root directory for the source code.

isTestExecute

public static boolean isTestExecute()
Returns:
true if testexecute should be installed, false otherwise.

getTestExecuteDependencies

public static java.lang.String[] getTestExecuteDependencies()
This method gets the list of dependencies for the Test Execute Framework (TEF).

Returns:
An array of the String TEF dependencies.

getTransport

public static java.lang.String getTransport()
Returns:
The transport for STAT / JStat.

getVariant

public static java.lang.String getVariant()
Returns:
The default variant.

getXmlroot

public static java.io.File getXmlroot()
Returns:
The location of the xml root directory.

incrementRunNumber

public static void incrementRunNumber()
                               throws java.io.IOException
Increments the run number by 1.

Throws:
java.io.IOException

isBldmake

public static boolean isBldmake()
Returns:
true if bldmake should be run, false otherwise.

isClean

public static boolean isClean()
Returns:
true if clean should be run on bldmake and abld, false otherwise.

isPlatsec

public static boolean isPlatsec()
Returns:
true if PlatSec is on, false otherwise.

setBldmake

public static void setBldmake(boolean aBldmake)
                       throws java.io.IOException
Parameters:
aBldmake - true if bldmake should be run, false otherwise.
Throws:
java.io.IOException

setCert

public static void setCert(java.io.File aCert)
                    throws java.io.IOException
Parameters:
aCert - The certificate to sign the SIS package with.
Throws:
java.io.IOException

setClean

public static void setClean(boolean aClean)
                     throws java.io.IOException
Parameters:
aClean - true if clean should be run on bldmake and abld, false otherwise.
Throws:
java.io.IOException

setEntryPointAddress

public static void setEntryPointAddress(java.lang.String aEntryPointAddress)
                                 throws java.io.IOException
Parameters:
aEntryPointAddress - The entry point address to set to.
Throws:
java.io.IOException

setEpocroot

public static void setEpocroot(java.io.File aEpocroot)
                        throws java.io.IOException,
                               java.lang.IllegalArgumentException
Parameters:
aEpocroot - The epoc root directory.
Throws:
java.io.IOException
java.lang.IllegalArgumentException

setKey

public static void setKey(java.io.File aKey)
                   throws java.io.IOException
Parameters:
aKey - The key to sign the SIS package with.
Throws:
java.io.IOException

setPlatform

public static void setPlatform(java.lang.String aPlatform)
                        throws java.lang.IllegalArgumentException,
                               java.io.IOException
Parameters:
aPlatform - The platform to build to.
Throws:
java.lang.IllegalArgumentException
java.io.IOException

setPlatsec

public static void setPlatsec(boolean aPlatsec)
                       throws java.io.IOException
Parameters:
aPlatsec - true if PlatSec is on, false otherwise.
Throws:
java.io.IOException

setRepositoryroot

public static void setRepositoryroot(java.lang.String aRepositoryroot)
                              throws java.io.IOException
Parameters:
aRepositoryroot - The repository root directory.
Throws:
java.io.IOException

setResultroot

public static void setResultroot(java.lang.String aResultsroot)
                          throws java.io.IOException
Parameters:
aResultsroot - The result directory of the source code.
Throws:
java.io.IOException

setSourceroot

public static void setSourceroot(java.lang.String aSourceroot)
                          throws java.io.IOException
Parameters:
aSourceroot - The root directory for the source code.
Throws:
java.io.IOException

setTestExecute

public static void setTestExecute(boolean aTestexecute)
                           throws java.io.IOException
Parameters:
aTestexecute - true if testexecute should be installed, false otherwise.
Throws:
java.io.IOException

setTransport

public static void setTransport(java.lang.String aTransport)
                         throws java.lang.IllegalArgumentException,
                                java.io.IOException
Parameters:
aTransport - The transport to use with STAT / JStat.
Throws:
java.lang.IllegalArgumentException
java.io.IOException

setVariant

public static void setVariant(java.lang.String aVariant)
                       throws java.lang.IllegalArgumentException,
                              java.io.IOException
Parameters:
aVariant - The default variant.
Throws:
java.lang.IllegalArgumentException
java.io.IOException

setXmlroot

public static void setXmlroot(java.lang.String aXmlroot)
                       throws java.io.IOException
Parameters:
aXmlroot - The xml root directory to set.
Throws:
java.io.IOException