com.funambol.client.test
Class TestFileManager

java.lang.Object
  extended by com.funambol.client.test.TestFileManager

public class TestFileManager
extends java.lang.Object

Singleton implementation of the test files core management logic. Use the singleton instance of this class through the getInstance() method. The exposed interface can be useful to retrieve generic file to be loaded from different contents: known supported content protocol are "http" and "file".


Field Summary
static java.lang.String TAG_LOG
          Tag log entry name
 
Method Summary
protected  java.lang.String getBaseUrl(java.lang.String scriptUrl)
          Accessor Method to get the base url related to the tests location
protected  java.lang.String getFile(java.lang.String scriptUrl)
          Get a script content given the absolute script url.
protected static TestFileManager getInstance()
          Core method to retireve the single instance of this class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TAG_LOG

public static final java.lang.String TAG_LOG
Tag log entry name

See Also:
Constant Field Values
Method Detail

getInstance

protected static TestFileManager getInstance()
Core method to retireve the single instance of this class. Uses the Singleton pattern.

Returns:
TestFileManager the TestFileManager singleton instance

getFile

protected java.lang.String getFile(java.lang.String scriptUrl)
                            throws java.lang.Exception
Get a script content given the absolute script url.

Parameters:
scriptUrl - is the String representation of the script location
Returns:
String the String formatted content of the given script
Throws:
java.lang.Exception - if any error occurred while retrieving the content of the script. This Exception can

getBaseUrl

protected java.lang.String getBaseUrl(java.lang.String scriptUrl)
Accessor Method to get the base url related to the tests location

Parameters:
scriptUrl - the String formatted script url
Returns:
String the String formatted url to be used as the base url for tests. Example: be the main script url "http://url.somewhere.com/folder1/folder2/Test.txt", this method will return be "http://url.somewhere.com/folder1/folder2". This method just return the url after the computation. Can return null if the baseUrl has not yet been calculated.


Copyright © 2001-2009 Funambol.