//----------------------------BEGIN LICENSE----------------------------
/* 
 * Willow : the Open Source WorkFlow Project
 * Distributable under GNU LGPL license by gun.org
 *
 * Copyright (C) 2004-2010 huihoo.org 
 * Copyright (C) 2004-2010  ZosaTapo <dertyang@hotmail.com> 
 * 
 * ====================================================================
 * Project Homepage : http://www.huihoo.org/willow
 * Source Forge     : http://sourceforge.net/projects/huihoo
 * Mailing list     : willow@lists.sourceforge.net 
 */
//----------------------------END  LICENSE----------------------------

package org.huihoo.workflow.server;

/** 
* This is the event class for notifications about changes to the attributes of the
*  workflow context of a workflow application.
* @see WorkflowContextAttributeListener
*/

public class WorkflowContextAttributeEvent extends WorkflowContextEvent
{
	private String name;
	private Object value;

	/** Construct a WorkflowContextAttributeEvent from the given context for the
	** given attribute name and attribute value. 
	*/
	public WorkflowContextAttributeEvent(WorkflowContext source, String name, Object value)
	{
		super(source);
		this.name = name;
		this.value = value;
	}

	/**
	* Return the name of the attribute that changed on the WorkflowContext.
	*
	*/
	public String getName()
	{
		return this.name;
	}

	/**
	* Returns the value of the attribute that has been added, removed, or replaced.
	* If the attribute was added, this is the value of the attribute. If the attribute was
	* removed, this is the value of the removed attribute. If the attribute was replaced, this
	* is the old value of the attribute.
	*
	*/

	public Object getValue()
	{
		return this.value;
	}
}
