com.symbian.et.test.driver.commands.filesetbased
Class FileSetManager

java.lang.Object
  extended bycom.symbian.et.test.driver.commands.filesetbased.FileSetManager

public class FileSetManager
extends java.lang.Object

maintain stack of FileSet objects and know if they have been used (whatever that is for: 'build' or 'run' command) by the client implemented as a Singleton

Author:
EngineeringTools

Nested Class Summary
private  class FileSetManager.FileSetRef
          little C-style struct that contains a TstComponent address and a FileSet
 
Field Summary
private  java.util.Stack iFileSets
          The stack of file lists corresponding to files required by a particular node.
private static FileSetManager iInstance
          The FileSetManager Singleton Reference.
private static java.util.Stack iUidSet
          THe static UID stack.
private static int UIDFIRST
          The first UID in the set.
private static int UIDLAST
          The last UID in the set.
 
Constructor Summary
private FileSetManager()
           
 
Method Summary
private  java.io.File checkBuildFileNames(java.io.File aFile)
           
private  java.io.File checkFileNames(java.io.File aFile)
           
private  com.symbian.et.test.engine.ExecuteOnHost createBuildFile(java.io.File aMMPFile, java.io.File aBldInfFile, java.lang.String aBuildType)
           
private  com.symbian.et.test.engine.ExecuteOnDevice createTestRunFile(java.lang.String aDevicePath)
           
private  void gatherDependencies(com.symbian.et.test.framework.TstComponent aTstComponent, com.symbian.et.test.engine.EpocFileSet aFileSet)
           
private  com.symbian.et.test.engine.EpocFileSet generateFileSet(com.symbian.et.test.framework.TstComponent aTstComponent)
          create the list of files
static FileSetManager getInstance()
           
 void pop(com.symbian.et.test.framework.TstComponent aTstComponent)
          pop a FileSet if it is necessary
static java.lang.String popUid()
           
 com.symbian.et.test.engine.EpocFileSet push(com.symbian.et.test.framework.TstComponent aTstComponent)
          push a FileSet if it is necessary
static void pushUid(java.lang.String aUid)
           
 int size()
          get number of FileSet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

iInstance

private static FileSetManager iInstance
The FileSetManager Singleton Reference.


UIDFIRST

private static final int UIDFIRST
The first UID in the set.

See Also:
Constant Field Values

UIDLAST

private static final int UIDLAST
The last UID in the set. TestDriver uses 50 UID.

See Also:
Constant Field Values

iUidSet

private static java.util.Stack iUidSet
THe static UID stack.


iFileSets

private java.util.Stack iFileSets
The stack of file lists corresponding to files required by a particular node.

Constructor Detail

FileSetManager

private FileSetManager()
Method Detail

getInstance

public static FileSetManager getInstance()
Returns:
The fileset manager.

push

public com.symbian.et.test.engine.EpocFileSet push(com.symbian.et.test.framework.TstComponent aTstComponent)
push a FileSet if it is necessary

Parameters:
aTstComponent -
Returns:
A fileset.

pop

public void pop(com.symbian.et.test.framework.TstComponent aTstComponent)
pop a FileSet if it is necessary

Parameters:
aTstComponent -

generateFileSet

private com.symbian.et.test.engine.EpocFileSet generateFileSet(com.symbian.et.test.framework.TstComponent aTstComponent)
create the list of files

Parameters:
aTstComponent - A test Componenet
Returns:
A file set.

size

public int size()
get number of FileSet

Returns:
The number of filesets.

gatherDependencies

private void gatherDependencies(com.symbian.et.test.framework.TstComponent aTstComponent,
                                com.symbian.et.test.engine.EpocFileSet aFileSet)
Parameters:
aTstComponent -
aFileSet -

createTestRunFile

private com.symbian.et.test.engine.ExecuteOnDevice createTestRunFile(java.lang.String aDevicePath)
Parameters:
aDevicePath -
Returns:
An execute on device command.

createBuildFile

private com.symbian.et.test.engine.ExecuteOnHost createBuildFile(java.io.File aMMPFile,
                                                                 java.io.File aBldInfFile,
                                                                 java.lang.String aBuildType)
                                                          throws java.lang.Exception
Parameters:
aMMPFile -
aBldInfFile -
aBuildType -
Returns:
The build command.
Throws:
java.lang.Exception

checkBuildFileNames

private java.io.File checkBuildFileNames(java.io.File aFile)
Parameters:
aFile -
Returns:
The corrected filename.

checkFileNames

private java.io.File checkFileNames(java.io.File aFile)
Parameters:
aFile -
Returns:
The corrected filename.

popUid

public static java.lang.String popUid()
Returns:
The UID that gets poped of the set.

pushUid

public static void pushUid(java.lang.String aUid)
Parameters:
aUid - The UID to push onto the stack.