|
IBM Rational Functional Tester Version 8.1.1000 IBM Rational Functional Tester API Reference Project Version 2.3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.rational.test.ft.datapool.DatapoolFactory
public class DatapoolFactory
The DatapoolFactory is a singleton object so that
IDatapool
and IDatapoolIterator
instances can be shared. Being a singleton object means that only gets constructed
and everyone uses the same factory instance to construct the shared objects.
Test scripts by default use managed datapools that share the datapool and iterator instance across multiple scripts.
Refer to the datapool package
documentation for a discussion on how to iterate over datapool contents manually.
Nested Class Summary | |
---|---|
static class |
DatapoolFactory.IteratorClassName
|
Field Summary | |
---|---|
static java.lang.String |
DEFAULT_ITERATOR_CLASS
|
Constructor Summary | |
---|---|
protected |
DatapoolFactory()
The constructor is intentionally protected so that only once instance of the DatapoolFactory can be constructed. |
Method Summary | |
---|---|
IDatapoolVariable |
addVariable(IDatapool datapool, java.lang.String variableName, java.lang.Object initialValue)
|
IDatapoolVariable |
addVariable(IDatapool datapool, java.lang.String variableName, java.lang.Object initialValue, java.lang.String[] enumLiterals)
|
void |
close(IDatapoolIterator iterator)
Return the iterator to the factory so that it can be properly destroyed. |
IDatapool |
constructDatapool()
|
static DatapoolFactory |
get()
The DatapoolFactory is a singleton object and only one should get constructed. |
DatapoolFactory.IteratorClassName[] |
getIteratorClassNames()
Return the default iterator classes for display in the UI. |
java.lang.String |
getLoadFileName(IDatapool datapool)
Returns the file name for the datapool as it was loaded or null if the supplied datapool was not loaded from a file. |
IDatapoolRecord |
getNewValuesRecord(IDatapool datapool)
|
boolean |
isDatapoolInCache(java.lang.String datapoolFileName)
|
boolean |
iteratorExists(IDatapool datapool)
|
IDatapool |
load(java.io.File dpFile, boolean sharedInstance)
Load the datapool from the specified file. |
IDatapool |
loadForEdit(java.io.File dpFile, boolean sharedInstance)
|
IDatapoolIterator |
open(IDatapool datapool, java.lang.String iteratorClassName)
Return an iterator instance of the supplied iterator class. |
IDatapoolIterator |
open(IDatapool datapool, java.lang.String iteratorClassName, boolean shareDatapoolIterator)
Construct a datapool iterator based on the supplied datapool and iterator class name. |
void |
save(IDatapool datapool)
|
void |
saveAs(IDatapool datapool, java.io.File dpFile)
|
void |
setLoadFileName(IDatapool datapool, java.lang.String fileName)
Update the file name for the datapool should be stored to by default. |
void |
unload(IDatapool datapool)
Removes a reference to an instance of a datapool. |
void |
unload(IDatapool datapool)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DEFAULT_ITERATOR_CLASS
Constructor Detail |
---|
protected DatapoolFactory()
get
method for access to the singleton.
Method Detail |
---|
public static DatapoolFactory get()
public IDatapool load(java.io.File dpFile, boolean sharedInstance)
IDatapoolFactory
sharedInstance
is requested then the cache of other datapools that have been opened is checked for an
existing copy of the datapool. Note that modifying a shared instance of the datapool may effect other uses of the datapool and should only be done in a confined execution environment.
load
in interface IDatapoolFactory
dpFile
- The datapool file name.sharedInstance
- Available for sharing instances of the datapool, which can save significantly
on datapool loading overhead.IDatapoolFactory.unload(IDatapool)
public void unload(IDatapool datapool)
IDatapoolFactory
unload
in interface IDatapoolFactory
datapool
- The datapool instance being unloaded.IDatapoolFactory.load(java.io.File,boolean)
public java.lang.String getLoadFileName(IDatapool datapool)
null
if the supplied datapool was not loaded from a file.
public void setLoadFileName(IDatapool datapool, java.lang.String fileName)
public IDatapoolIterator open(IDatapool datapool, java.lang.String iteratorClassName)
IDatapoolFactory
open
in interface IDatapoolFactory
datapool
- The datapool instance being iterated over.IDatapoolFactory.close(IDatapoolIterator)
public IDatapoolIterator open(IDatapool datapool, java.lang.String iteratorClassName, boolean shareDatapoolIterator)
public void close(IDatapoolIterator iterator)
IDatapoolFactory
close
in interface IDatapoolFactory
iterator
- The iterator being freed.IDatapoolFactory.open(IDatapool,String)
public boolean iteratorExists(IDatapool datapool)
public IDatapool constructDatapool()
public IDatapool loadForEdit(java.io.File dpFile, boolean sharedInstance)
public void save(IDatapool datapool)
public void saveAs(IDatapool datapool, java.io.File dpFile)
public void unload(IDatapool datapool)
public DatapoolFactory.IteratorClassName[] getIteratorClassNames()
public IDatapoolRecord getNewValuesRecord(IDatapool datapool)
public IDatapoolVariable addVariable(IDatapool datapool, java.lang.String variableName, java.lang.Object initialValue)
public IDatapoolVariable addVariable(IDatapool datapool, java.lang.String variableName, java.lang.Object initialValue, java.lang.String[] enumLiterals)
public boolean isDatapoolInCache(java.lang.String datapoolFileName)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |