jsystem.framework.sut
Class SutImpl

java.lang.Object
  extended byjsystem.framework.sut.SutImpl
All Implemented Interfaces:
Sut

public class SutImpl
extends Object
implements Sut

The default SUT implemantation.


Constructor Summary
SutImpl()
           
 
Method Summary
 List getAllValues(String path)
          Get a list of all the values found.
 byte[] getSutXml()
          return the sut xml.
 String getValue(String path)
          Get a value from the XML file.
 void setSutXml(byte[] sutXml)
          Set the SUT file
 void setSutXml(File sutXml)
          Set the SUT file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SutImpl

public SutImpl()
Method Detail

setSutXml

public void setSutXml(File sutXml)
               throws FileNotFoundException,
                      ParseException
Description copied from interface: Sut
Set the SUT file.

Specified by:
setSutXml in interface Sut
Parameters:
sutXml - The SUT file.
Throws:
FileNotFoundException
ParseException

setSutXml

public void setSutXml(byte[] sutXml)
               throws ParseException
Description copied from interface: Sut
Set the SUT file

Specified by:
setSutXml in interface Sut
Parameters:
sutXml - The SUT file as a byte array.
Throws:
ParseException

getSutXml

public byte[] getSutXml()
Description copied from interface: Sut
return the sut xml.

Specified by:
getSutXml in interface Sut
Returns:
the sut xml as byte array

getValue

public String getValue(String path)
                throws Exception
Description copied from interface: Sut
Get a value from the XML file. In the default implemantation XPath is used.

Specified by:
getValue in interface Sut
Parameters:
path - XPath to the requested value.
Returns:
The requested value or null if not found.
Throws:
Exception

getAllValues

public List getAllValues(String path)
                  throws Exception
Description copied from interface: Sut
Get a list of all the values found.

Specified by:
getAllValues in interface Sut
Parameters:
path - XPath to the values.
Returns:
A list of the values.
Throws:
Exception