jsystem.framework.system
Class SystemObjectImpl

java.lang.Object
  extended byjsystem.framework.analyzer.AnalyzerImpl
      extended byjsystem.framework.system.SystemObjectImpl
All Implemented Interfaces:
Analyzer, SystemObject

public abstract class SystemObjectImpl
extends AnalyzerImpl
implements 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
protected  boolean isClosed
           
protected  Properties properties
           
protected  Reporter report
           
protected  Sut sut
           
protected  SystemObjectManager system
           
protected  SystemObjectManager systemManager
           
protected  Vector systemObjects
           
 
Fields inherited from interface jsystem.framework.system.SystemObject
PERMANENT_LIFETIME, TEST_LIFETIME
 
Constructor Summary
SystemObjectImpl()
           
 
Method Summary
 void close()
          Close the object.
protected  void closeFields()
           
protected  String fixPath(String relativePath)
           
 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.
protected  void initFields()
           
 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.
protected  void setSetters()
           
 void setXPath(String path)
          Set the object XPath.
 
Methods inherited from class jsystem.framework.analyzer.AnalyzerImpl
analyze, analyze, getTestAgainstObject, setTestAgainsObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

isClosed

protected boolean isClosed

system

protected SystemObjectManager system

sut

protected Sut sut

report

protected Reporter report

systemManager

protected SystemObjectManager systemManager

systemObjects

protected Vector systemObjects

properties

protected Properties properties
Constructor Detail

SystemObjectImpl

public SystemObjectImpl()
Method Detail

setName

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

Specified by:
setName in interface SystemObject
Parameters:
name - The object name.

getName

public String getName()
Get the system object name.

Specified by:
getName in interface SystemObject
Returns:
The system object name.

getLifeTime

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

Specified by:
getLifeTime in interface SystemObject
Returns:
the object lifetime.

setLifeTime

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

Specified by:
setLifeTime in interface SystemObject
Parameters:
lifeTime - The object lifetime.

getXPath

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

Specified by:
getXPath in interface SystemObject
Returns:
Object XPath.

setXPath

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

Specified by:
setXPath in interface SystemObject
Parameters:
path - Object XPath.

isClosed

public boolean isClosed()
Is the object close.

Specified by:
isClosed in interface SystemObject
Returns:
Return true if closed else return false.

setClose

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

Specified by:
setClose in interface SystemObject
Parameters:
isClosed - the isClosed status.

initFields

protected void initFields()
                   throws Exception
Throws:
Exception

setSetters

protected void setSetters()

init

public void init()
          throws Exception
Description copied from interface: SystemObject
Init the system object. This method will be called when the object is constracted.

Specified by:
init in interface SystemObject
Throws:
Exception

closeFields

protected void closeFields()

close

public void close()
Description copied from interface: SystemObject
Close the object. Will be called on object closed.

Specified by:
close in interface SystemObject

fixPath

protected String fixPath(String relativePath)