com.extrememessaging.ResponseMaster
Class eCategories

java.lang.Object
  extended by com.extrememessaging.ResponseMaster.eCategories

public final class eCategories
extends java.lang.Object

This class holds information about the categories


Field Summary
static int DefaultCategory
          The default category
static int NotCategorized
          The category returned if a rule did not match
static int NUM_CATEGORIES
          The number of categories
 
Constructor Summary
eCategories()
           
 
Method Summary
static boolean FromIsOriginalToForCategory(int CategoryID)
          Is the from address is the original to address for this category?
static int GetCategoryIDFromName(java.lang.String CategoryName)
          Looks up the id of the category from the name
static java.lang.String GetCategoryNameFromID(int eCategory)
          Looks up the name of the category from the id
static void ReadFromFiles(java.lang.String[] saFileNames)
          Read the list of categories
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NUM_CATEGORIES

public static int NUM_CATEGORIES
The number of categories


DefaultCategory

public static int DefaultCategory
The default category


NotCategorized

public static final int NotCategorized
The category returned if a rule did not match

See Also:
Constant Field Values
Constructor Detail

eCategories

public eCategories()
Method Detail

FromIsOriginalToForCategory

public static boolean FromIsOriginalToForCategory(int CategoryID)
Is the from address is the original to address for this category?

Returns:
true if the from address is the original to address for this category

ReadFromFiles

public static void ReadFromFiles(java.lang.String[] saFileNames)
                          throws ResponseMasterException
Read the list of categories

Parameters:
saFileNames - The names of the files to read the list of categories from
Throws:
ResponseMasterException - is thrown if there is a problem

GetCategoryIDFromName

public static int GetCategoryIDFromName(java.lang.String CategoryName)
                                 throws InvalidCategoryName
Looks up the id of the category from the name

Parameters:
CategoryName - The name of the category
Returns:
The id of the category
Throws:
An - InvalidCategoryName exception is thrown if the category name is incorrect
InvalidCategoryName

GetCategoryNameFromID

public static java.lang.String GetCategoryNameFromID(int eCategory)
Looks up the name of the category from the id

Returns:
The name of the category, or "Unknown" if the id was not found