jsystem.framework.fixture
Class FixtureManager

java.lang.Object
  extended byjsystem.framework.fixture.FixtureManager

public class FixtureManager
extends Object

Responsable for the fixture navigation and execution. Support the fixture modle.


Method Summary
 void addListener(FixtureListener listener)
           
 void failTo(String fixtureName)
          Navigate to the fixture using the failTearDownPath
 ArrayList getAllChildrens(Fixture parent)
          Get all the childrens of a fixture.
 String getCurrentFixture()
          Get the current fixture.
 Vector getFixturePath(Fixture fixture)
          Get the path to fixture.
static FixtureManager getInstance()
          Get and instance of the FixtureManager.
 void goTo(String fixtureName)
          Navigate to the fixture.
 void initFixtureModel()
          init the fixture model.
 boolean isCurrent(Fixture f)
          Check if the pass fixture is the current fixture.
 boolean isDisableFixture()
          Is the fixture modle disabled
 void removeListener(FixtureListener listener)
          Remove a fixture listener.
 void setCurrentFixture(String currentFixture)
          Set the current fixture.
 void setDisableFixture(boolean disableFixture)
          Set the disable status.
protected  boolean useReloadingTestSuiteLoader()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static FixtureManager getInstance()
Get and instance of the FixtureManager.

Returns:
FixtureManager instance.

isCurrent

public boolean isCurrent(Fixture f)
Check if the pass fixture is the current fixture.

Parameters:
f - The fixture to be tested
Returns:
true if it's the current fixture, false if not.

initFixtureModel

public void initFixtureModel()
init the fixture model. Should be called when the model changes.


useReloadingTestSuiteLoader

protected boolean useReloadingTestSuiteLoader()

getFixturePath

public Vector getFixturePath(Fixture fixture)
                      throws Exception
Get the path to fixture.

Parameters:
fixture - The fixture to find the path to.
Returns:
Return a vector of the fixture in the path.
Throws:
Exception

goTo

public void goTo(String fixtureName)
          throws Throwable
Navigate to the fixture.

Parameters:
fixtureName - The fixture to navigate to.
Throws:
Throwable

failTo

public void failTo(String fixtureName)
            throws Throwable
Navigate to the fixture using the failTearDownPath

Parameters:
fixtureName - The fixture name to navigate to.
Throws:
Throwable

getAllChildrens

public ArrayList getAllChildrens(Fixture parent)
Get all the childrens of a fixture.

Parameters:
parent - The parent fixture to get it childrens.
Returns:
A vector with all the childrens fixtures.

addListener

public void addListener(FixtureListener listener)

removeListener

public void removeListener(FixtureListener listener)
Remove a fixture listener.

Parameters:
listener - the listener to be removed.

getCurrentFixture

public String getCurrentFixture()
Get the current fixture.

Returns:
The current fixture name.

setCurrentFixture

public void setCurrentFixture(String currentFixture)
                       throws Exception
Set the current fixture. it will be done without executing the fixture path.

Parameters:
currentFixture - The new fixture.
Throws:
Exception

isDisableFixture

public boolean isDisableFixture()
Is the fixture modle disabled

Returns:
true if disable, false if not.

setDisableFixture

public void setDisableFixture(boolean disableFixture)
Set the disable status. If disabled no fixture execution will be done.

Parameters:
disableFixture - The disable status to be set.