All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class semper.txlayer.transaction.NRToken

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

public final class NRToken
extends Object
implements Browseable, Serializable
NRTokens contain proofs about things that happened during a Transaction. The proof is a signed Statement, containing an NRWrapper with all sorts of data.
We implement the semper.util.browser.Browseable interface. This is work in progress and not finished.

See Also:
Statement, NRView, NRWrapper, NonRepudiation

Constructor Index

 o NRToken(Statement)
Constructor.

Method Index

 o compareTo(Browseable, int, boolean)
Method for sorting Browseables on a specified key.
 o exportToLineOfASCII()
Export as a flat ASCII String.
 o exportToLineOfHTML()
Export as an HTML formatted String, consisting of a single line.
 o exportToLinesOfHTML()
Export as an HTML formatted String, consisting of several lines.
 o getActions()
Obtain the names of the actions which can be called for a browseable.
 o getBA()
 o getKeys()
Obtain the names of the keys which can be used to sort.
 o getMethodName(int)
Obtain the name of the method that should be called for a browseable.
 o getName()
 o getNrrornro()
 o getNRView()
 o getReceiver()
 o getReceiverTime()
 o getSender()
 o getSenderTime()
 o getStatement()
 o getUsedCertificateAsHTML()
 o toString()
 o verify()
Verify the signed statement.
 o verifySignature()
This method verifies the signature of the NRToken, i.e., the receipt.
 o verifySignatureResultAsHTML()

Constructors

 o NRToken
 public NRToken(Statement statement)
Constructor.

Parameters:
statement - The statement contains the NRView and a signature.

Methods

 o toString
 public String toString()
Overrides:
toString in class Object
 o getStatement
 public Statement getStatement()
Returns:
The signed statement inside us.
 o getSender
 public String getSender()
Returns:
The sender inside us. This is a name from a SituationDescription used to create the signed statement.
 o getReceiver
 public String getReceiver()
Returns:
The receiver inside us. This is a name from a SituationDescription used to create the signed statement.
 o getBA
 public String getBA()
Returns:
The BA name inside us. This is a name from a SituationDescription used to create the signed statement.
 o getNRView
 public NRView getNRView()
Returns:
The nrview inside us.
 o getSenderTime
 public Date getSenderTime()
Returns:
The local time of the sender when he signed the NRView.
 o getReceiverTime
 public Date getReceiverTime()
Returns:
The local time of the receiver when the NRView was signed.
 o getNrrornro
 public String getNrrornro()
Returns:
Either NRTransfer.NRR or NRTransfer.NRO.
 o verify
 public boolean verify()
Verify the signed statement.

Returns:
True when the signature is ok, false otherwise.
 o getName
 public String getName()
 o exportToLineOfHTML
 public String exportToLineOfHTML()
Export as an HTML formatted String, consisting of a single line. The HTML should be limited to those HTML tags supported by the Tinguin. The method gives full control over the formatting.

 o exportToLinesOfHTML
 public String exportToLinesOfHTML()
Export as an HTML formatted String, consisting of several lines. The HTML should be limited to those HTML tags supported by the Tinguin. The method gives full control over the formatting.

 o exportToLineOfASCII
 public String exportToLineOfASCII()
Export as a flat ASCII String. The ASCII String is to be included in a simply formatted file, for example. The method gives full control over the formatting.

 o compareTo
 public int compareTo(Browseable other,
                      int keyno,
                      boolean reverse)
Method for sorting Browseables on a specified key. Other methods could make sorting (and selecting) on individual fields possible.

Precondition: the objects must be of the same type.

Parameters:
other - Browseable object to compare with this.
keyno - number of the key field to use in comparisons.
reverse - if true use the reverse order.
Returns:
-1, 0, or 1 if this is "less than", "equal to", or "larger than" other, respectively.
 o getKeys
 public String[] getKeys()
Obtain the names of the keys which can be used to sort. The index of the key in the result array is its key number.

Returns:
a String per key.
 o getActions
 public String[] getActions()
Obtain the names of the actions which can be called for a browseable.

Returns:
a String per action.
 o getMethodName
 public String getMethodName(int n)
Obtain the name of the method that should be called for a browseable.

Returns:
the name of the method.
 o verifySignature
 public boolean verifySignature()
This method verifies the signature of the NRToken, i.e., the receipt.

Returns:
a boolean value of the verification result, i.e., true iff the signature is valid, false else.
 o getUsedCertificateAsHTML
 public String getUsedCertificateAsHTML()
 o verifySignatureResultAsHTML
 public String verifySignatureResultAsHTML()

All Packages  Class Hierarchy  This Package  Previous  Next  Index