jsystem.framework.system
Interface SystemObject

All Known Implementing Classes:
SystemObjectImpl

public interface SystemObject

System Object is a convention to represent the setup/system you are working on with a single object. The steps in the tests will be operations on the setup/system object.


Field Summary
static int PERMANENT_LIFETIME
          Set the object lifetime to permanent lifetiem.
static int TEST_LIFETIME
          Set the lifetime of the object to the test life time.
 
Method Summary
 void close()
          Close the object.
 int getLifeTime()
          Get the object lifetime.
 String getName()
          Get the system object name.
 String getXPath()
          Get the object XPath in the sut XML file.
 void init()
          Init the system object.
 boolean isClosed()
          Is the object close.
 void setClose(boolean isClosed)
          Set the object isClosed status.
 void setLifeTime(int lifeTime)
          Set the object lifetime.
 void setName(String name)
          Set the System Object name.
 void setXPath(String path)
          Set the object XPath.
 

Field Detail

TEST_LIFETIME

public static final int TEST_LIFETIME
Set the lifetime of the object to the test life time. Will be init every test.

See Also:
Constant Field Values

PERMANENT_LIFETIME

public static final int PERMANENT_LIFETIME
Set the object lifetime to permanent lifetiem. This object will be available as long as the framework is running.

See Also:
Constant Field Values
Method Detail

setName

public void setName(String name)
Set the System Object name.

Parameters:
name - The object name.

getName

public String getName()
Get the system object name.

Returns:
The system object name.

init

public void init()
          throws Exception
Init the system object. This method will be called when the object is constracted.

Throws:
Exception

close

public void close()
Close the object. Will be called on object closed.


isClosed

public boolean isClosed()
Is the object close.

Returns:
Return true if closed else return false.

setClose

public void setClose(boolean isClosed)
Set the object isClosed status.

Parameters:
isClosed - the isClosed status.

getLifeTime

public int getLifeTime()
Get the object lifetime. The default lifetime is PERMANENT_LIFETIME.

Returns:
the object lifetime.

setLifeTime

public void setLifeTime(int lifeTime)
Set the object lifetime. Can be one of two: TEST_LIFETIME or PERMANENT_LIFETIME.

Parameters:
lifeTime - The object lifetime.

getXPath

public String getXPath()
Get the object XPath in the sut XML file.

Returns:
Object XPath.

setXPath

public void setXPath(String path)
Set the object XPath.

Parameters:
path - Object XPath.