/* $Id: Rule.js,v aefde150b392 2008/04/04 18:49:50 mro $
 * Copyright (c) 2003, 2007 WorldTicket A/S
 * All rights reserved.
 */

/** Rule Object is responsible for validating the person amounts.
 *
 *  <p>If you want to create a new Rule, then just extend this class and override the apply and init method, like this.</p>
 *
 *  <pre>
 *  function WorldTicketRule() {
 *      // Setup some const values for convenience 
 *      this.ADULT = 0;
 *      this.CHILD = 1;      
 *  }
 *
 *  // Extends the Rule Object
 *  WorldTicketRule.prototype = new Rule();
 *
 *  WorldTicketRule.prototype.apply = function() {
 *      // Get handlers and put them in some readabla variables
 *      var adult = this.handlers[this.ADULT];
 *      var child = this.handlers[this.CHILD];
 *
 *      // Create a rule which says: there can only be as many children as adults 
 *      child.setMax(adult.getMax())
 *   }
 *   
 *   WorldTicketRule.prototype.init = function() {
 *      // Loop through all handlers and set the maximum allowed amount to 5
 *      for (var a = 0 ; a < 5; a++) {              
 *           this.handlers[a].setMax(5);
 *      }
 *      
 *      // Call apply so the init values can be validated
 *      this.apply()
 *   }
 *   </pre>
 *
 *
 * @author  Claus Brøndby Reimer / 2M business applications a|s
 */

function Rule() {
    this.handlers;                        
}


/** Sets an array of RuleHandler objects.
 *
 *  @param aRuleHandlers an array of rule handlers.
 */
 
Rule.prototype.setHandlers = function(aRuleHandlers) {
    this.handlers = aRuleHandlers;
}


/** Applies the rule pattern on the RuleHandler objects
 */
 
Rule.prototype.apply = function() {
}

/** Initializes this Rule
 */
Rule.prototype.init = function() {    
}
