com.jthomas.mailfaces
Class FaceGroup

java.lang.Object
  |
  +--com.jthomas.mailfaces.FaceGroup

public class FaceGroup
extends java.lang.Object

The FaceGroup class will handle Group statements from the .opt file.

 Group statements have the form:
   Group name  filename
 
 The file will contain a list of email addresses in a 
 comma separated format. .csv 
 Most Adress books have the capability of creating an 
 export file that is in CSV format.
 
 It will also support an Eudora Nickname file that contains:
   alias name email
   note ...
  
 
 We will parse the lines in the file and build a hashtable that 
 contains each email address as the key.  
 A hashtable with a key of group name will keep track of the 
 individual group hashtables. 
    
 The matchGroup(groupname,address) method will be used to determine if
 the specified address is in the specified group.

Author:
John Thomas FaceResolver, Mailmsg, FaceOptions

Constructor Summary
FaceGroup()
           
 
Method Summary
 void display()
          Method to display the Groups.
static FaceGroup getRef()
          Static Class Method to access the one and Only FaceOptions object
 void refreshOptions()
          refreshOptions() gets control initially and when the user refreshes the Option file.
 boolean resolve(java.lang.String group, Mailmsg mailmsg)
          Determines if the sender of the mailmsg is in the specified group.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FaceGroup

public FaceGroup()
Method Detail

getRef

public static FaceGroup getRef()
Static Class Method to access the one and Only FaceOptions object


refreshOptions

public void refreshOptions()
refreshOptions() gets control initially and when the user refreshes the Option file. The Group statements have the syntax:
Group group1 filename1
   - Initialize the FaceGroup object.
   - Get array of Group statements 
    - For each statenment: 
     - parse the statement 
      - read the file and build a hashtable
        of the email addresses
     - store the hashtabel in a hashmap with the groupname
        as the key.
    
  


resolve

public boolean resolve(java.lang.String group,
                       Mailmsg mailmsg)
Determines if the sender of the mailmsg is in the specified group.

Parameters:
group - The group name that should be checked.
mailmsg - The mail that is being checked.
Returns:
true if from or reply-to address is a member of the specified group.

display

public void display()
Method to display the Groups.