mail.types
Class EncryptedMail

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

public class EncryptedMail
extends Mail


Nested Class Summary
 class EncryptedMail.AlreadyDecryptedException
           
 
Field Summary
private  org.w3c.dom.Element content
           
private  boolean encrypted
           
private  Mail m
           
(package private) static java.lang.String NAME
           
private  Node receiver
           
 
Fields inherited from class mail.Mail
id
 
Constructor Summary
EncryptedMail(ID receiver)
           
EncryptedMail(Node receiver, Mail m)
           
 
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 decrypt(CryptEngine decryptEngine)
           
 ID getSender()
          returns the sender of this mail.
 
Methods inherited from class mail.Mail
buildMail, equals, getID, getReceiver, hashCode, registerPackage
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

static java.lang.String NAME

receiver

private Node receiver

m

private Mail m

content

private org.w3c.dom.Element content

encrypted

private boolean encrypted
Constructor Detail

EncryptedMail

public EncryptedMail(ID receiver)

EncryptedMail

public EncryptedMail(Node receiver,
                     Mail m)
Method Detail

build

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

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

decrypt

public Mail decrypt(CryptEngine decryptEngine)
             throws EncryptionException,
                    MailBuildException
Throws:
EncryptionException
MailBuildException

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