//----------------------------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.coreImpl.store;

import org.huihoo.workflow.server.WorkflowXPDL;
import org.huihoo.workflow.store.WorkflowCaseDatabase;
import org.huihoo.workflow.store.WorkflowCaseValidator;
import org.huihoo.workflow.store.WorkflowTemplate;
import org.huihoo.workflow.store.WorkflowDispatcher;
import org.huihoo.workflow.store.WorkflowUUIDGenerator;
import org.huihoo.workflow.store.WorkflowUserDatabase;
import org.huihoo.workflow.store.WorkflowWorkValidator;

public class WorkflowTemplateImpl implements WorkflowTemplate
{
	protected WorkflowXPDL ownerWorkflowXPDL;

	protected WorkflowUUIDGenerator workflowUUIDGenerator;
	protected WorkflowCaseDatabase workflowCaseDatabase;
	protected WorkflowUserDatabase workflowUserDatabase;
	protected WorkflowDispatcher workflowDistribute;

	protected WorkflowCaseValidator caseValidator;
	protected WorkflowWorkValidator workValidator;

	public WorkflowTemplateImpl()
	{
		this.workflowUUIDGenerator = new WorkflowUUIDGeneratorImpl(this);
		this.workflowCaseDatabase = new WorkflowCaseDatabaseImpl(this);
		this.workflowUserDatabase = new WorkflowUserDatabaseImpl(this);
		this.workflowDistribute = new WorkflowDistributeImpl(this);

		this.caseValidator = new WorkflowCaseValidatorImpl(this);
		this.workValidator = new WorkflowWorkValidatorImpl(this);

	}

	public WorkflowXPDL getOwnerWorkflowXPDL()
	{
		return this.ownerWorkflowXPDL;
	}

	public void setOwnerWorkflowXPDL(WorkflowXPDL ownerWorkflowXPDL)
	{
		this.ownerWorkflowXPDL = ownerWorkflowXPDL;
	}

	public WorkflowCaseDatabase getCaseDatabase()
	{
		return workflowCaseDatabase;
	}
	public WorkflowUserDatabase getUserDatabase()
	{
		return workflowUserDatabase;
	}

	public WorkflowUUIDGenerator getUUIDGenerator()
	{
		return workflowUUIDGenerator;
	}

	public WorkflowDispatcher getWorkflowDispatcher()
	{
		return workflowDistribute;
	}

	public WorkflowCaseValidator getCaseValidator()
	{
		return caseValidator;
	}

	public WorkflowWorkValidator getWorkValidator()
	{
		return workValidator;
	}
}