//----------------------------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.xpdl.condition;

import org.huihoo.workflow.xpdl.WorkflowCondition;



public class ScriptCondition extends WorkflowCondition
{
	protected String content;
	
	public ScriptCondition()
	{
	}
	
	public ScriptCondition(String content)
	{
		this.setContent(content);
	}
	public ConditionType    getType()
	{
		return ConditionType.CONDITION_SCRIPT;
	}
	
	public String  getContent()
	{
		return content;
	}
	public void    setContent(String content)
	{
		this.content=content;
	}
	
	
	public String getTagName()
	{
		return "Condition";
	}
	
	public String toString()
	{
		StringBuffer sb = new StringBuffer();
		
		sb.append("[");
		sb.append(getTagName()+":");
		sb.append("[type=");
		sb.append(getType());
		sb.append("],");
		sb.append("[content=");
		sb.append(content==null ? "?" : content);
		sb.append("]");
		sb.append("]");
		
		return sb.toString();
	}
}
