All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class semper.txlayer.transaction.NRView

java.lang.Object
   |
   +----semper.txlayer.transaction.NRView

public abstract class NRView
extends Object
implements Serializable
The NRView class contains a representation of Objects that is suitable for signing. In general this means that this representation must be Serializable. This class should be extended by most TXLayer Extensions.


Constructor Index

 o NRView(Serializable, String, String, Date)
Constructor.

Method Index

 o compareSerializables(Serializable, Serializable)
Compares two Serializables.
 o exportToLineOfHTML()
 o getDate()
 o getFrom()
 o getFromToDate()
 o getS()
 o getTo()
 o toString()
 o verify()
This method is supposed to do further verification of the NRView.

Constructors

 o NRView
 public NRView(Serializable s,
               String from,
               String to,
               Date date)
Constructor.

Parameters:
s - The Serializable that can be used for signing the NRView.
from - Is the name of the sender in a transfer.
to - Is the name of the receiver in a transfer.
date - Is the date of the transfer.

Methods

 o compareSerializables
 protected static final boolean compareSerializables(Serializable s1,
                                                     Serializable s2)
Compares two Serializables. This method is intended to be a helper for subclasses extending NRView who want to implement the equals(Object) method in a reasonable way. The implementation below may not work in all situations because the ByteArrayOutputStreams are not guaraunteed to have the same output even although the serializables are the same. Thus this method is currently not used.

Parameters:
s1 - First Serializable.
s2 - Second Serializable.
Returns:
true If the two serializables have the same contents, false otherwise.
 o toString
 public String toString()
Returns:
One line of text, with a newline at the end.
Overrides:
toString in class Object
 o exportToLineOfHTML
 public String exportToLineOfHTML()
Returns:
One line of HTML, with a newline at the end.
 o getS
 public Serializable getS()
Returns:
The Serializable inside us.
 o getFromToDate
 public String getFromToDate()
Returns:
The from inside us.
 o getFrom
 public String getFrom()
Returns:
The from inside us.
 o getTo
 public String getTo()
Returns:
The to inside us.
 o getDate
 public Date getDate()
Returns:
The date inside us.
 o verify
 public abstract boolean verify()
This method is supposed to do further verification of the NRView.


All Packages  Class Hierarchy  This Package  Previous  Next  Index