TPTP 4.4.0 Testing Tools Project
Internal API Specification

org.eclipse.tptp.test.auto.gui.internal.macro
Class ObjectMineManager

java.lang.Object
  extended byorg.eclipse.tptp.test.auto.gui.internal.macro.ObjectMineManager

public class ObjectMineManager
extends java.lang.Object

In addition to the macro of each test case, a test suite also contains an object mine keeps a reference of all resolved objects. The purpose of the object mine is to resolve a widget once and use it many times. This is a singleton class that can be accessed via getInstance()


Method Summary
 void clearCache()
          Removes all entries in cache.
static ObjectMineManager getInstance()
          Return the instance of this singleton class
 IObjectMine loadObjectMine(org.eclipse.hyades.models.common.facades.behavioral.ITestSuite testSuite)
           
 IObjectMine loadObjectMine(org.eclipse.hyades.models.common.facades.behavioral.ITestSuite testSuite, boolean useCache)
          Load the object mine of the passed in test suite
 IObjectMine loadObjectMine(java.lang.String objectMineXML)
          This method should be used if the object mine will be loaded for reading purposes.
 void markObjectMineDirty(org.eclipse.hyades.models.common.facades.behavioral.ITestSuite testSuite)
          Marks the object mine of the passed in test suite as dirty
 void writeObjectMine(IObjectMine objectMine)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static ObjectMineManager getInstance()
Return the instance of this singleton class

Returns:
The instance of this class

loadObjectMine

public IObjectMine loadObjectMine(org.eclipse.hyades.models.common.facades.behavioral.ITestSuite testSuite,
                                  boolean useCache)
                           throws ObjectMine.UIObjectNotFound,
                                  ObjectMine.IDCollisionException,
                                  org.eclipse.core.runtime.CoreException
Load the object mine of the passed in test suite

Parameters:
testSuite - The test suite whose object mine is requested
useCache - Uses the cached value if this is set to true; otherwise the object mine is reloaded and returned.
Returns:
the object mine of the test suite that is passed in.
Throws:
UIObjectNotFound - In case an expected object is not found
IDCollisionException - In case there is a collision id
org.eclipse.core.runtime.CoreException - In case of any unexpected error
ObjectMine.UIObjectNotFound
ObjectMine.IDCollisionException

loadObjectMine

public IObjectMine loadObjectMine(java.lang.String objectMineXML)
                           throws ObjectMine.UIObjectNotFound,
                                  ObjectMine.IDCollisionException,
                                  org.eclipse.core.runtime.CoreException
This method should be used if the object mine will be loaded for reading purposes. Contributors will not be able to use this returned object mine to write any objects.

Parameters:
objectMineXML - The XML string representing the object mine
Returns:
the object mine of the test suite that is passed in.
Throws:
UIObjectNotFound - In case an expected object is not found
IDCollisionException - In case there is a collision id
org.eclipse.core.runtime.CoreException - In case of any unexpected error
ObjectMine.UIObjectNotFound
ObjectMine.IDCollisionException

writeObjectMine

public void writeObjectMine(IObjectMine objectMine)

loadObjectMine

public IObjectMine loadObjectMine(org.eclipse.hyades.models.common.facades.behavioral.ITestSuite testSuite)
                           throws ObjectMine.UIObjectNotFound,
                                  ObjectMine.IDCollisionException,
                                  org.eclipse.core.runtime.CoreException
Throws:
ObjectMine.UIObjectNotFound
ObjectMine.IDCollisionException
org.eclipse.core.runtime.CoreException

markObjectMineDirty

public void markObjectMineDirty(org.eclipse.hyades.models.common.facades.behavioral.ITestSuite testSuite)
Marks the object mine of the passed in test suite as dirty

Parameters:
testSuite - The test suite

clearCache

public void clearCache()
Removes all entries in cache. This should be carefully used.


TPTP 4.4.0 Testing Tools Project
Internal API Specification