|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.tigris.eyebrowse.MailingListArchive
Business object which encapsulates database and mbox data, and
provides an API to list operations. Currently used most by the the
classes in the org.tigris.eyerowse.programs
package.
Constructor Summary | |
MailingListArchive()
Needed for loading of this class as an IFileRotate implementation. |
|
MailingListArchive(EyebrowseDb.ListInfo list)
|
|
MailingListArchive(java.lang.String name)
Creates a new instance with the specified name. |
|
MailingListArchive(java.lang.String name,
java.lang.String description,
java.lang.String filePath,
java.lang.String indexDirPath)
Creates a new instance with the specified attributes. |
Method Summary | |
void |
addIndex()
Adds the index already set for this object. |
void |
addIndex(java.lang.String indexDirPath)
Adds the index directory at indexDirPath for this
list. |
void |
addList()
|
void |
addListFile()
Adds the list file set for this object. |
void |
addListFile(java.lang.String filePath)
|
void |
deleteList()
removes all database entries for this list finds list by name |
void |
deleteListAndFiles()
removes the list and all the list files, use with caution! |
void |
deleteOnlyIndex()
removes only the index record for this list finds list by name |
java.lang.String |
getActiveListFilePath()
Returns the path to the active mbox file for this list. |
protected org.tigris.eyebrowse.util.IFileRotate |
getFileRotator()
Gets the configured IFileRotate implementation
keyed by the org.tigris.eyebrowse.fileRotator
property, caching an instance if one doesn't already exist. |
int |
getID()
returns the ID that was set by the constructor, if it wasnt set at instantiation time then it's gotten from the database |
java.lang.String |
getLastListFilePath()
Returns the path to the last file for list by ID or null if there is none for the list. |
java.lang.String |
getName()
Returns the name of this list. |
boolean |
hasConsistentData()
Diagnositc routine which checks the database for consistency against the active list file. |
void |
rotateActiveListFile()
Rotates the active mbox file for this list according to the algorithm provided by the configured IFileRotate
implementation's rotateFile() method. |
java.lang.String |
rotateFile(MailingListArchive archive)
Eyebrowse's default implementation of the IFileRotate interface. |
void |
setDescription(java.lang.String description)
|
void |
setFilePath(java.lang.String filePath)
|
void |
setID(int id)
|
void |
setIndexDirPath(java.lang.String indexDirPath)
|
void |
updateDescription()
|
void |
updateDescription(java.lang.String description)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MailingListArchive()
IFileRotate
implementation.public MailingListArchive(java.lang.String name)
public MailingListArchive(java.lang.String name, java.lang.String description, java.lang.String filePath, java.lang.String indexDirPath)
name
- The list name.description
- The list description.filePath
- The path to the active list data file.indexDirPath
- The path to the index directory.public MailingListArchive(EyebrowseDb.ListInfo list)
MailingListArchive(String, String, String, String)
Method Detail |
public void setDescription(java.lang.String description)
public void setID(int id)
public void setFilePath(java.lang.String filePath)
public void setIndexDirPath(java.lang.String indexDirPath)
public void addList() throws EyebrowseException
public void addListFile(java.lang.String filePath) throws EyebrowseException
filePath
- The file path.addListFile()
public void addListFile() throws EyebrowseException
public void addIndex(java.lang.String indexDirPath) throws EyebrowseException, IndexerException
indexDirPath
for this
list.indexDirPath
- The path to the index directory to add.addIndex()
public void addIndex() throws EyebrowseException, IndexerException
public void deleteList() throws EyebrowseException
public void deleteListAndFiles() throws EyebrowseException
public void deleteOnlyIndex() throws EyebrowseException
public int getID() throws EyebrowseException
public java.lang.String getName()
public java.lang.String getActiveListFilePath() throws EyebrowseException
public final void rotateActiveListFile() throws EyebrowseException
IFileRotate
implementation's rotateFile()
method. Logs
rotation status.EyebrowseException
- Couldn't rotate the mbox.rotateFile(MailingListArchive)
,
IFileRotate
public java.lang.String rotateFile(MailingListArchive archive) throws EyebrowseException
Eyebrowse's default implementation of the IFileRotate
interface. Rotates the
active mbox file for this list, creating a new mbox for the
current month (if it doesn't already exist and the file is
writable), producing a date-stamped file name corresponding to
the current month (using the date format yyyyMM).
The configured IFileRotate
implementation is
called by the rotateActiveListFile()
method.
rotateFile
in interface org.tigris.eyebrowse.util.IFileRotate
archive
- List archive to rotate -- the class loaded
default implementation won't have the necessary identifying
information. Quite possibly a reference to ourself.rotateActiveListFile()
,
IFileRotate
protected org.tigris.eyebrowse.util.IFileRotate getFileRotator() throws EyebrowseException
IFileRotate
implementation
keyed by the org.tigris.eyebrowse.fileRotator
property, caching an instance if one doesn't already exist.public java.lang.String getLastListFilePath() throws EyebrowseException
public void updateDescription() throws EyebrowseException
public void updateDescription(java.lang.String description) throws EyebrowseException
public boolean hasConsistentData() throws EyebrowseException
EyebrowseException
- Error checking consistency.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |