org.blojsom.plugin.moblog
Class Mailbox

java.lang.Object
  extended byorg.blojsom.plugin.moblog.Mailbox

public class Mailbox
extends java.lang.Object

Mailbox.

This file is a container for everything the thread will need to connect to and to store into.

Since:
blojsom 2.14
Version:
$Id: Mailbox.java,v 1.14 2006/01/04 16:53:12 czarneckid Exp $
Author:
David Czarnecki, Mark Lussier

Constructor Summary
Mailbox()
          Default constructor.
Mailbox(java.lang.String hostname, java.lang.String userid, java.lang.String password)
          Construct a new mailbox for a given hostname, user, and password.
 
Method Summary
 java.util.Map getAttachmentMimeTypes()
          Retrieve the Map of attachment mime-types
 java.lang.String getAttachmentMimeTypesAsStringList()
          Retrieve the accepted attachment MIME types as a string list
 java.util.Map getAuthorizedAddresses()
          Retrieve the authorized e-mail from addresses for this mailbox
 BlogUser getBlogUser()
          Retrive the BlogUser for this mailbox
 java.lang.String getCategoryName()
          Retrieve the category name for new moblog entries
 java.lang.String getEntriesDirectory()
          Retrive the directory where new blog entries will be created
 java.lang.String getFolder()
          Retrieve the mail folder
 java.lang.String getHostName()
          Retrieve the mailbox hostname
 java.lang.String getIgnoreExpression()
          Retrieve the regular expression for ignoring bits of text
 java.util.Map getImageMimeTypes()
          Retrieve the Map of image mime-types
 java.lang.String getImageMimeTypesAsStringList()
          Retrieve the accepted image MIME types as a string list
 java.lang.String getOutputDirectory()
          Retrieve the output directory where attachments will be written
 java.lang.String getPassword()
          Retrieve the mailbox user password
 java.lang.String getSecretWord()
          Retrieve the secret word for this mailbox
 java.util.Map getTextMimeTypes()
          Retrieve the Map of text mime-types
 java.lang.String getTextMimeTypesAsStringList()
          Retrieve the accepted text MIME types as a string list
 java.lang.String getUrlPrefix()
          Retrieve the URL prefix for linking to attachments
 java.lang.String getUserId()
          Retreive the mailbox user id
 boolean isEnabled()
          Retrieve whether or not this mailbox is enabled
 void setAttachmentMimeTypes(java.util.Map attachmentMimeTypes)
          Set the Map of attachment mime-types
 void setAuthorizedAddresses(java.util.Map authorizedAddresses)
          Set the authorized e-mail from addresses for this mailbox
 void setBlogUser(BlogUser user)
          Set the BlogUser for this mailbox
 void setCategoryName(java.lang.String categoryName)
          Set the category name for new moblog entries
 void setEnabled(boolean enabled)
          Set whether or not this mailbox is enabled
 void setEntriesDirectory(java.lang.String entriesDirectory)
          Set the directory where new blog entries will be created
 void setFolder(java.lang.String folder)
          Set the mail folder
 void setHostName(java.lang.String hostName)
          Set the mailbox hostname
 void setIgnoreExpression(java.lang.String ignoreExpression)
          Set the regular expression for ignoring bits of text
 void setImageMimeTypes(java.util.Map imageMimeTypes)
          Set the Map of image mime-types
 void setOutputDirectory(java.lang.String outputDirectory)
          Set the output directory where attachments will be written
 void setPassword(java.lang.String password)
          Set the mailbox user password
 void setSecretWord(java.lang.String secretWord)
          Set the secret word for this mailbox.
 void setTextMimeTypes(java.util.Map textMimeTypes)
          Set the Map of text mime-types
 void setUrlPrefix(java.lang.String urlPrefix)
          Set the URL prefix for linking to attachments
 void setUserId(java.lang.String userId)
          Set the mailbox user id
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Mailbox

public Mailbox()
Default constructor.


Mailbox

public Mailbox(java.lang.String hostname,
               java.lang.String userid,
               java.lang.String password)
Construct a new mailbox for a given hostname, user, and password.

Parameters:
hostname - Mailbox hostname
userid - Mailbox user id
password - Mailbox user password
Method Detail

getHostName

public java.lang.String getHostName()
Retrieve the mailbox hostname

Returns:
Mailbox hostname (e.g. mail.domain.com)

setHostName

public void setHostName(java.lang.String hostName)
Set the mailbox hostname

Parameters:
hostName - Mailbox hostname (e.g. mail.domain.com)

getUserId

public java.lang.String getUserId()
Retreive the mailbox user id

Returns:
Mailbox user id

setUserId

public void setUserId(java.lang.String userId)
Set the mailbox user id

Parameters:
userId - Mailbox user id

getPassword

public java.lang.String getPassword()
Retrieve the mailbox user password

Returns:
Mailbox user password

setPassword

public void setPassword(java.lang.String password)
Set the mailbox user password

Parameters:
password - Mailbox user password

getFolder

public java.lang.String getFolder()
Retrieve the mail folder

Returns:
Mail folder

setFolder

public void setFolder(java.lang.String folder)
Set the mail folder

Parameters:
folder - Mail folder

getOutputDirectory

public java.lang.String getOutputDirectory()
Retrieve the output directory where attachments will be written

Returns:
Output directory

setOutputDirectory

public void setOutputDirectory(java.lang.String outputDirectory)
Set the output directory where attachments will be written

Parameters:
outputDirectory - Output directory

getUrlPrefix

public java.lang.String getUrlPrefix()
Retrieve the URL prefix for linking to attachments

Returns:
URL prefix (e.g. http://www.blog.com/resources/)

setUrlPrefix

public void setUrlPrefix(java.lang.String urlPrefix)
Set the URL prefix for linking to attachments

Parameters:
urlPrefix - (e.g. http://www.blog.com/resources/)

getEntriesDirectory

public java.lang.String getEntriesDirectory()
Retrive the directory where new blog entries will be created

Returns:
Entries directory

setEntriesDirectory

public void setEntriesDirectory(java.lang.String entriesDirectory)
Set the directory where new blog entries will be created

Parameters:
entriesDirectory - Entries directory

getCategoryName

public java.lang.String getCategoryName()
Retrieve the category name for new moblog entries

Returns:
Category name

setCategoryName

public void setCategoryName(java.lang.String categoryName)
Set the category name for new moblog entries

Parameters:
categoryName - Category name

isEnabled

public boolean isEnabled()
Retrieve whether or not this mailbox is enabled

Returns:
true if the mailbox is enabled, false otherwise

setEnabled

public void setEnabled(boolean enabled)
Set whether or not this mailbox is enabled

Parameters:
enabled - true if the mailbox is enabled, false otherwise

getBlogUser

public BlogUser getBlogUser()
Retrive the BlogUser for this mailbox

Returns:
BlogUser

setBlogUser

public void setBlogUser(BlogUser user)
Set the BlogUser for this mailbox

Parameters:
user - BlogUser

getImageMimeTypes

public java.util.Map getImageMimeTypes()
Retrieve the Map of image mime-types

Returns:
Map of image mime-types

getImageMimeTypesAsStringList

public java.lang.String getImageMimeTypesAsStringList()
Retrieve the accepted image MIME types as a string list

Returns:
String list of accepted image mime types
Since:
blojsom 2.16

setImageMimeTypes

public void setImageMimeTypes(java.util.Map imageMimeTypes)
Set the Map of image mime-types

Parameters:
imageMimeTypes - Map of image mime-types

getAttachmentMimeTypes

public java.util.Map getAttachmentMimeTypes()
Retrieve the Map of attachment mime-types

Returns:
Map of image mime-types

getAttachmentMimeTypesAsStringList

public java.lang.String getAttachmentMimeTypesAsStringList()
Retrieve the accepted attachment MIME types as a string list

Returns:
String list of accepted attachment mime types
Since:
blojsom 2.16

setAttachmentMimeTypes

public void setAttachmentMimeTypes(java.util.Map attachmentMimeTypes)
Set the Map of attachment mime-types

Parameters:
attachmentMimeTypes - Map of attachment mime-types

getTextMimeTypes

public java.util.Map getTextMimeTypes()
Retrieve the Map of text mime-types

Returns:
Map of image mime-types

getTextMimeTypesAsStringList

public java.lang.String getTextMimeTypesAsStringList()
Retrieve the accepted text MIME types as a string list

Returns:
String list of accepted text mime types
Since:
blojsom 2.16

setTextMimeTypes

public void setTextMimeTypes(java.util.Map textMimeTypes)
Set the Map of text mime-types

Parameters:
textMimeTypes - Map of text mime-types

getSecretWord

public java.lang.String getSecretWord()
Retrieve the secret word for this mailbox

Returns:
Secret word which must be present at the start of the subject of the e-mail
Since:
blojsom 2.15

setSecretWord

public void setSecretWord(java.lang.String secretWord)
Set the secret word for this mailbox.

Parameters:
secretWord - Secret word which must be present at the start of the subject of the e-mail
Since:
blojsom 2.15

getAuthorizedAddresses

public java.util.Map getAuthorizedAddresses()
Retrieve the authorized e-mail from addresses for this mailbox

Returns:
Authorized e-mail from addresses for this mailbox
Since:
blojsom 2.16

setAuthorizedAddresses

public void setAuthorizedAddresses(java.util.Map authorizedAddresses)
Set the authorized e-mail from addresses for this mailbox

Parameters:
authorizedAddresses - Authorized e-mail from addresses for this mailbox
Since:
blojsom 2.16

getIgnoreExpression

public java.lang.String getIgnoreExpression()
Retrieve the regular expression for ignoring bits of text

Returns:
Regular expression for ignoring bits of text
Since:
blojsom 2.22

setIgnoreExpression

public void setIgnoreExpression(java.lang.String ignoreExpression)
Set the regular expression for ignoring bits of text

Parameters:
ignoreExpression - Regular expression for ignoring bits of text
Since:
blojsom 2.22