Jwma

dtw.webmail.admin
Class JwmaStatus

java.lang.Object
  |
  +--dtw.webmail.admin.JwmaStatus

public class JwmaStatus
extends java.lang.Object

Class that implements a wrapper for and a proxy to available * status information. *

* * @author Dieter Wimberger * @version 0.9.7 07/02/2003


Field Summary
static int[] DIRECTORY_TYPES
          Prescription of the SHOULD STATE of directories.
static int[] FILE_TYPES
          Prescription of the SHOULD STATE of files.
 
Method Summary
static JwmaStatus createJwmaStatus()
          Creates the JwmaStatus singleton * instance.
 int getDirectoryCount()
          Returns the number of observed directories as * int.
 java.lang.String getDirectoryPath(int directory)
          Returns the full path of the directory as String.
 java.lang.String getDirResolveHint(int directory)
          Returns the resolve hint, if the directory is not * in the prescribed state.
 int getFileCount()
          Returns the number of observed files as * int.
 java.lang.String getFilePath(int file)
          Returns the full path of the file as String.
 java.lang.String getFileResolveHint(int file)
          Returns the resolve hint, if the file is not * in the prescribed state.
 int getKernelStatus()
          Returns the status of the kernel as int.
 java.lang.String getMailTransportLimit()
          Returns an String representing the maximum * size allowed for a message to be transported via jwma.
 java.lang.String getMTAHost()
          Returns the site's MTA hostaddress * setting.
 java.lang.String getPostOfficeHost()
          Returns the site's post office hostaddress * setting.
static JwmaStatus getReference()
          Returns the reference to the singleton instance.
 java.lang.String getSettingsDump()
          Returns a dump of the loaded settings file.
 boolean isDirectoryOk(int directory)
          Tests if the given directory is in the prescribed state.
 boolean isFileOk(int file)
          Tests if the given file is in the prescribed state.
 boolean isKernelOk()
          Tests if the kernel is up an running completely.
 boolean supportsMixedFolders()
          Tests if the preset post office supports maildir style * mixture of messages and subfolders.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DIRECTORY_TYPES

public static final int[] DIRECTORY_TYPES
Prescription of the SHOULD STATE of directories.


FILE_TYPES

public static final int[] FILE_TYPES
Prescription of the SHOULD STATE of files.

Method Detail

getDirectoryCount

public int getDirectoryCount()
Returns the number of observed directories as * int. * * @return the number of observed directories as int.


isDirectoryOk

public boolean isDirectoryOk(int directory)
Tests if the given directory is in the prescribed state. *

* The states are encoded within the * FileStatus class as constants, and prescribed * for the observed directories in the DIRECTORY_TYPES * constant. * * @param directory, the index of the directory as int. * * @return true if the given directory is in prescribed state, * false otherwise. * * @see #DIRECTORY_TYPES * @see dtw.webmail.admin.FileStatus#READABLE_DIRECTORY * @see dtw.webmail.admin.FileStatus#WRITEABLE_DIRECTORY


getDirResolveHint

public java.lang.String getDirResolveHint(int directory)
Returns the resolve hint, if the directory is not * in the prescribed state. *

* The method returns an empty string if the directory is * in the prescribed state. * * @param directory, the index of the directory as int. * * @return the resolve hint as String.


getDirectoryPath

public java.lang.String getDirectoryPath(int directory)
Returns the full path of the directory as String. * * @param directory, the index of the directory as int. * * @return the full path as String.


getFileCount

public int getFileCount()
Returns the number of observed files as * int. * * @return the number of observed files as int.


isFileOk

public boolean isFileOk(int file)
Tests if the given file is in the prescribed state. *

* The states are encoded within the * FileStatus class as constants, and prescribed * for the observed directories in the FILE_TYPES * constant. * * @param file, the index of the file as int. * * @return true if the given file is in prescribed state, * false otherwise. * * @see #FILE_TYPES * @see dtw.webmail.admin.FileStatus#READABLE_FILE * @see dtw.webmail.admin.FileStatus#WRITEABLE_FILE


getFileResolveHint

public java.lang.String getFileResolveHint(int file)
Returns the resolve hint, if the file is not * in the prescribed state. *

* The method returns an empty string if the directory is * in the prescribed state. * * @param file, the index of the file as int. * * @return the resolve hint as String.


getFilePath

public java.lang.String getFilePath(int file)
Returns the full path of the file as String. * * @param file, the index of the file as int. * * @return the full path as String.


isKernelOk

public boolean isKernelOk()
Tests if the kernel is up an running completely. * If this test returns false, the getKernelStatus() * method can be used to obtain status information. * * @return true if the kernel is up and running error free, * false otherwise. * * @see #getKernelStatus()


getKernelStatus

public int getKernelStatus()
Returns the status of the kernel as int. * The information content of this number can be obtained from * the documentation (Deployment-> Boot Process) or * * online. * * @return an int describing the state of the kernel.


getPostOfficeHost

public java.lang.String getPostOfficeHost()
Returns the site's post office hostaddress * setting. * * @return local site's post office hostaddress * as String.


getMTAHost

public java.lang.String getMTAHost()
Returns the site's MTA hostaddress * setting. * * @return local site's post MTA hostaddress * as String.


supportsMixedFolders

public boolean supportsMixedFolders()
Tests if the preset post office supports maildir style * mixture of messages and subfolders. * * @return true if mixed mode store, false otherwise.


getMailTransportLimit

public java.lang.String getMailTransportLimit()
Returns an String representing the maximum * size allowed for a message to be transported via jwma. * * @return maximum size of a message to be transported as * String.


getSettingsDump

public java.lang.String getSettingsDump()
Returns a dump of the loaded settings file. * * @return the dump of the loaded settings file as String.


createJwmaStatus

public static JwmaStatus createJwmaStatus()
                                   throws JwmaException
Creates the JwmaStatus singleton * instance. * * @return the newly created singleton instance. * * @throws JwmaException if the status can not be prepared.

JwmaException

getReference

public static JwmaStatus getReference()
Returns the reference to the singleton instance.


Jwma

Copyright © 2000-2003 jwma team (All Rights Reserved.)