/** Class ConditionStub
 *
 * Stub for class Condition
 *
 * @author Chris Kern
 * @author Erin Nichols
 * @author Joe Simonson
 * @version 1.0 of Oct 1999
 */

public class ConditionStub

    implements Condition {

    /*+--------------+
     *|    Fields    |
     *+--------------+
     */

    /* Each "Condition" has three parts. */

    /** 1. A "header", such as "Name", "Date", or "MessageID". */
    protected String header;

    /** 2. An "operator", such as "<", "!=", or ">=".
     * XXX perhaps a class should be made for operator? */
    protected String operator;

    /** 3. A "target", such as "Joe", "9/9/99", or "[zangband]*"
     * XXX target needs to be able to accept wildcards..perhaps another class? */
    protected String target;


    /*+--------------+
     *| Constructors |
     *+--------------+
     */

    /** Null constructor */
    public ConditionStub() {

    }

    /** Full constructor */
    public ConditionStub(String head, String operate, String targ) {
        this.header = head;
        this.operator = operate;
        this.target = targ;
    }

    /*+-----------+
     *|  Methods  |
     *+-----------+
     */

    /** Extract the header */
    public String getHeader() {

        return this.header;

    }

    /** Extract the operator */
    public String getOperator() {

        return this.operator;

    }
    
    /** Extract the target */
    public String getTarget() {

        return this.target;

    }
    
    /** Set the header */
    public void setHeader(String head) {

        this.header = head;

    }
    
    /** Set the operator */
    public void setOperator(String operate) {

        this.operator = operate;

    }
    
    /** Set the target */
    public void setTarget(String targ) {
        this.target = targ;

    }//setTarget(String)


    /** Purpose       - Applies this rule to a list of messages 
     * Parameters     - The list of messages the rule should be applied to
     * Preconditions  - listOfMessages is a valid MessageInfoList
     * Postconditions - The list is sorted per the rule
     * Produces       - nothing
     * Problems       - none 
     */

    public boolean isRuleTrue(MailMessage message) {
        return true; 
        
    }//isRuleTrue()

    /** Purpose       - Applies this rule to a list of messages 
     * Parameters     - The list of messages the rule should be applied to
     * Preconditions  - listOfMessages is a valid MessageInfoList
     * Postconditions - The list is sorted per the rule
     * Produces       - nothing
     * Problems       - none 
     */
    public void sortList(MessageInfoListStub listOfMessages) {

    }// sortList(MessageInfoListStub)


    /** Purpose       - Returns a new message list created by the rule application 
     * Parameters     - none
     * Preconditions  - none
     * Postconditions - A messageInfoList is created
     * Produces       - A list of messages sorted by the rule
     * Problems       - none
     */
    public MessageInfoListStub returnList() {

        return new MessageInfoListStub();

    }


}

