/**
 * ReferenceEvaluator.java
 * Created on Jun 3, 2008
 * (C) Copyright TANDBERG Television Ltd.
 */
package com.tandbergtv.watchpoint.pmm.job.referenceEvaluator;

import java.util.Map;

/**
 * This is the abstract base class for all reference evaluator classes
 * 
 * @author spuranik
 */
public abstract class ReferenceEvaluator {

	// this is the next evaluator in the chain
	protected ReferenceEvaluator successor;

	/**
	 * @return the successor
	 */
	public ReferenceEvaluator getSuccessor() {
		return successor;
	}

	/**
	 * @param successor the successor to set
	 */
	public void setSuccessor(ReferenceEvaluator successor) {
		this.successor = successor;
	}

	/**
	 * This method evaluates the parameter reference in the object sent
	 * using the info passed along.
	 * 
	 * @param entity
	 * 	Entity which has reference parameters to be evaluated
	 * @param info
	 * 	info that will be helpful for evaluation.
	 */
	public abstract void evaluate(Object entity, Map<String, Object> info);
	
	/**
	 * This method will return the path for a given reference parameter
	 * in the actual object. Only one evaluator can return this value.
	 * 
	 * @param property
	 * @return
	 */
	public abstract ParameterReferencePath getPath(String property);
}
