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

import org.huihoo.workflow.WorkflowComponent;
import org.huihoo.workflow.WorkflowException;
import org.huihoo.workflow.server.WorkflowCase;
import org.huihoo.workflow.server.WorkflowWork;
import org.huihoo.workflow.xpdl.WorkflowProcess;

public interface WorkflowUUIDGenerator  extends WorkflowComponent
{  
	/** Object number for well-known <code>ObjID</code> of the case. */
	public static final int CASE_UUID = 1;

	/** Object number for well-known <code>ObjID</code> of the work. */
	public static final int WORK_UUID = 2;

	/** Object number for well-known <code>ObjID</code> of the path. */
	public static final int PATH_UUID = 3;

	/** Object number for well-known <code>ObjID</code> of the batch. */
	public static final int BATCH_UUID = 4;
	
//----------------------------------------------------------------------
//
//----------------------------------------------------------------------			
	public WorkflowTemplate getWorkflowTemplate();
	public void  setWorkflowTemplate(WorkflowTemplate workflowTemplate);
	
//----------------------------------------------------------------------
//
//----------------------------------------------------------------------			
	
  public String nextCaseUUID(WorkflowProcess workflowProcess) throws WorkflowException;
  
  public String nextWorkUUID(WorkflowCase workflowCase) throws WorkflowException;
  
  public String nextPathUUID(WorkflowCase workflowCase) throws WorkflowException;
  
  public String nextBatchUUID(WorkflowWork workfloWork) throws WorkflowException;
}
