mail.types
Class SignedMail

java.lang.Object
  extended by mail.Mail
      extended by mail.types.SignedMail

public class SignedMail
extends Mail


Field Summary
private  org.w3c.dom.Element content
           
private  Mail m
           
(package private) static java.lang.String NAME
           
private  CryptEngine sender
           
private  boolean signed
           
 
Fields inherited from class mail.Mail
id, receiver
 
Constructor Summary
SignedMail(ID receiver)
           
SignedMail(ID receiver, Mail m, CryptEngine sender)
           
 
Method Summary
 void build(org.w3c.dom.Element e)
           
 org.w3c.dom.Element buildContent(org.w3c.dom.Document d)
          builds an XML-Element out of this Mail
 Mail getMail()
           
 ID getSender()
          returns the sender of this mail.
 java.lang.String toString()
           
 boolean verifySignature(CryptEngine checkEngine)
           
 
Methods inherited from class mail.Mail
buildMail, equals, getID, getReceiver, hashCode, registerPackage
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

NAME

static java.lang.String NAME

sender

private CryptEngine sender

m

private Mail m

content

private org.w3c.dom.Element content

signed

private boolean signed
Constructor Detail

SignedMail

public SignedMail(ID receiver)

SignedMail

public SignedMail(ID receiver,
                  Mail m,
                  CryptEngine sender)
Method Detail

build

public void build(org.w3c.dom.Element e)
           throws MailBuildException
Specified by:
build in class Mail
Throws:
MailBuildException

buildContent

public org.w3c.dom.Element buildContent(org.w3c.dom.Document d)
                                 throws MailBuildException
Description copied from class: Mail
builds an XML-Element out of this Mail

Specified by:
buildContent in class Mail
Parameters:
d - the document to place the element into
Returns:
the created XML-element
Throws:
MailBuildException

verifySignature

public boolean verifySignature(CryptEngine checkEngine)
                        throws EncryptionException
Throws:
EncryptionException

getMail

public Mail getMail()

getSender

public ID getSender()
Description copied from class: Mail
returns the sender of this mail. The sender might not be public, so it is possible for this method to return null, if the sender wishes to stay hidden (e.g. by encryption)

Specified by:
getSender in class Mail
Returns:
the sender, or null, if the sender is hidden

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object