Rakesh API

org.rakeshv.mail
Class ServerPreferences

java.lang.Object
  extended by org.rakeshv.BaseObject
      extended by org.rakeshv.mail.ServerPreferences

public class ServerPreferences
extends BaseObject

A wrapper bean that provides easy access to all the properties configured in the application wide mail server preferences XML file. This class provides convenience methods that serve the purpose of hiding the complexity of the XML and object model from the application.

Copyright 2004, Rakesh Vidyadharan

Version:
$Id: ServerPreferences.java,v 1.1 2005/04/26 11:30:35 rakesh Exp $
Author:
Rakesh Vidyadharan 7th November, 2004

Field Summary
private  java.lang.String fileName
          The fully qualified path to the file that contains the preferences.
private  org.rakeshv.xml.mail.MailServerPreferences mailServerPreferences
          The reference to the MailServerPreferences object that is wrapped by this object.
 
Fields inherited from class org.rakeshv.BaseObject
END_OF_LINE
 
Constructor Summary
ServerPreferences()
          Default constructor.
 
Method Summary
 java.lang.String getAttachmentRootDirectory()
          Wrapper method that returns the attachmentRootDirectory element value.
 java.lang.String getConnectionProtocol()
          Wrapper method that returns the connectionProtocol element value.
 java.lang.String getDeletedImage()
          Wrapper method that returns the deletedImage element value.
 java.util.Collection getDomain()
          Wrapper method that returns the collection of domain element values.
 java.lang.String getFileName()
          Returns fileName.
 java.lang.String getHost()
          Wrapper method that returns the host element value.
 java.lang.String getInboxFolder()
          Wrapper method that returns the inboxFolder element value.
 org.rakeshv.xml.mail.MailServerPreferences getMailServerPreferences()
          Returns mailServerPreferences.
 java.lang.String getMailTransportProtocol()
          Wrapper method that returns the mailTransportProtocol element value.
 java.lang.String getNewImage()
          Wrapper method that returns the newImage element value.
 int getPort()
          Wrapper method that returns the port element value.
 java.lang.String getReadImage()
          Wrapper method that returns the readImage element value.
 java.lang.String getRepliedImage()
          Wrapper method that returns the repliedImage element value.
 java.lang.String getWebserverAttachmentPath()
          Wrapper method that returns the webserverAttachmentPath element value.
 void setFileName(java.lang.String fileName)
          Set fileName.
 void setMailServerPreferences(org.rakeshv.xml.mail.MailServerPreferences mailServerPreferences)
          Set mailServerPreferences.
 
Methods inherited from class org.rakeshv.BaseObject
printCollection, printMap, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

fileName

private java.lang.String fileName
The fully qualified path to the file that contains the preferences.


mailServerPreferences

private org.rakeshv.xml.mail.MailServerPreferences mailServerPreferences
The reference to the MailServerPreferences object that is wrapped by this object.

Constructor Detail

ServerPreferences

public ServerPreferences()
Default constructor. No special actions required.

Method Detail

getFileName

public final java.lang.String getFileName()
Returns fileName.

Returns:
String The value/reference of/to fileName.

setFileName

public final void setFileName(java.lang.String fileName)
                       throws MailException
Set fileName. After setting the fileName, create the appropriate instance of mailServerPreferences with the contents of the specified file.

Parameters:
fileName - The value to set.
Throws:
MailException - If errors are encountered while reading or parsing the file.

getMailServerPreferences

public final org.rakeshv.xml.mail.MailServerPreferences getMailServerPreferences()
Returns mailServerPreferences.

Returns:
MailServerPreferences The value/reference of/to mailServerPreferences.

setMailServerPreferences

public final void setMailServerPreferences(org.rakeshv.xml.mail.MailServerPreferences mailServerPreferences)
Set mailServerPreferences.

Parameters:
mailServerPreferences - The value to set.

getConnectionProtocol

public final java.lang.String getConnectionProtocol()
Wrapper method that returns the connectionProtocol element value.

Returns:
String - The connection protocol to use (usually imap).

getPort

public final int getPort()
Wrapper method that returns the port element value.

Returns:
int - The port number to connect to (usually 143)

getMailTransportProtocol

public final java.lang.String getMailTransportProtocol()
Wrapper method that returns the mailTransportProtocol element value.

Returns:
String - The mail protocol to use (usually smtp).

getHost

public final java.lang.String getHost()
Wrapper method that returns the host element value.

Returns:
String - The fully qualified name of the server to connect to.

getDomain

public final java.util.Collection getDomain()
Wrapper method that returns the collection of domain element values.

Returns:
Collection - The collection of additional domains which the server supports.

getInboxFolder

public final java.lang.String getInboxFolder()
Wrapper method that returns the inboxFolder element value.

Returns:
String - The name of the inbox folder.

getAttachmentRootDirectory

public final java.lang.String getAttachmentRootDirectory()
Wrapper method that returns the attachmentRootDirectory element value.

Returns:
String - The fully qualified path for the root directory for storing attachments.

getWebserverAttachmentPath

public final java.lang.String getWebserverAttachmentPath()
Wrapper method that returns the webserverAttachmentPath element value.

Returns:
String - The application relative/absolute path for accessing the attachments.

getDeletedImage

public final java.lang.String getDeletedImage()
Wrapper method that returns the deletedImage element value.

Returns:
String - The absolute/relative path for the deleted image.

getNewImage

public final java.lang.String getNewImage()
Wrapper method that returns the newImage element value.

Returns:
String - The absolute/relative path for the new image.

getReadImage

public final java.lang.String getReadImage()
Wrapper method that returns the readImage element value.

Returns:
String - The absolute/relative path for the read image.

getRepliedImage

public final java.lang.String getRepliedImage()
Wrapper method that returns the repliedImage element value.

Returns:
String - The absolute/relative path for the replied image.

Rakesh API

Copyright © 2002-2005 - Rakesh Vidyadharan