|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmail.MailArchive.Folder
public class MailArchive.Folder
represents a folder
Field Summary | |
---|---|
private java.io.File |
dir
directory the folder is stored in |
private java.util.Properties |
ids
maps the Mail-ID to the Filenames the Mails are stored by |
private java.util.Vector<MailArchive.MailEntry> |
mails
stores the mails in the folder |
private int |
num
greatest number a file is saved by |
private java.util.Properties |
props
maps the Mail-filenames to their encryption properties (so they don't hav to be redecrypted, to get the info) |
private java.util.Vector<MailArchive.Folder> |
subfolder
stores the subfolders in this folder |
Constructor Summary | |
---|---|
MailArchive.Folder(java.io.File dir)
creates a new folder at the specified directory |
Method Summary | |
---|---|
boolean |
equals(MailArchive.Folder f)
two folder equal, if their directory equals |
private boolean |
exists(Mail m)
tests, if a mail exists already TODO: this could also use mails-vector |
MailArchive.Folder |
getFolder(int i)
|
int |
getIndex(MailArchive.Folder f)
|
int |
getIndex(MailArchive.MailEntry me)
|
MailArchive.MailEntry |
getMail(int i)
|
void |
initFolder()
loads the folder into their ram-representation |
private void |
initMails()
loads the mails contained in this directory into the ram-stored vector |
int |
numFolder()
|
int |
numMails()
|
void |
setProps(java.lang.String name,
java.lang.String props)
sets the properties for a given mail-name and saves them |
MailArchive.MailEntry |
store(Mail m)
stores a mail in this folder |
java.lang.String |
toString()
prints this folders name |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private java.io.File dir
private int num
private java.util.Properties ids
private java.util.Properties props
private java.util.Vector<MailArchive.MailEntry> mails
private java.util.Vector<MailArchive.Folder> subfolder
Constructor Detail |
---|
public MailArchive.Folder(java.io.File dir)
dir
- Method Detail |
---|
private void initMails()
public java.lang.String toString()
toString
in class java.lang.Object
private boolean exists(Mail m)
m
-
public void setProps(java.lang.String name, java.lang.String props) throws SavingException
name
- props
-
SavingException
public MailArchive.MailEntry store(Mail m) throws SavingException
m
-
SavingException
public boolean equals(MailArchive.Folder f)
f
-
public void initFolder()
public MailArchive.Folder getFolder(int i)
public int getIndex(MailArchive.Folder f)
public int numFolder()
public MailArchive.MailEntry getMail(int i)
public int getIndex(MailArchive.MailEntry me)
public int numMails()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |