/*
 * Created on 2004-6-7
 *
 * To change the template for this generated file go to
 * Window - Preferences - Java - Code Generation - Code and Comments
 */
package org.huihoo.willow;

import java.io.File;

import org.huihoo.willow.session.SessionManager;
import workflow.store.RealmDatabase;

/**
 * @author reic
 *
 * To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Generation - Code and Comments
 */
public interface Engine extends Container
{
	/**
	 * Return the <code>Service</code> with which we are associated (if any).
	 */
	public Service getService();

	/**
	 * Set the <code>Service</code> with which we are associated (if any).
	 *
	 * @param service The service that owns this Engine
	 */
	public void setService(Service service);
	
	
	/**
	 * Return the application root for this Engine.  This can be an absolute
	 * pathname, a relative pathname  
	 */
	public String getEngineBase();

	/**
	 * Return the default session timeout (in minutes) for this
	 * workflow client.
	 */
	public int getSessionTimeout();

	/**
	 * Set the default session timeout (in minutes) for this
	 * workflow client.
	 *
	 * @param timeout The new default session timeout
	 */
	public void setSessionTimeout(int timeout);

	/**
	 * Return the application root for this Engine. 
	 */
	public File getAbsoluteEngineBase();

	/**
	 * Set the application root for this Engine. This can be an absolute
	 * pathname, a relative pathname 
	 *
	 * @param appBase The new application root
	 */
	public void setEngineBase(String engineBase);


	/**
	 * Return the value of the auto deploy flag.  If true, it indicates that 
	 * this engine's child webapps should be discovred and automatically 
	 * deployed dynamically.
	 */
	public boolean getAutoDeploy();


	/**
	 * Set the auto deploy flag value for this engine.
	 * 
	 * @param autoDeploy The new auto deploy flag
	 */
	public void setAutoDeploy(boolean autoDeploy);
	
    
	/**
	 * Return the value of the deploy on startup flag.  If true, it indicates 
	 * that this host's child webapps should be discovred and automatically 
	 * deployed.
	 */
	public boolean getDeployOnStartup();


	/**
	 * Set the deploy on startup flag value for this host.
	 * 
	 * @param deployOnStartup The new deploy on startup flag
	 */
	public void setDeployOnStartup(boolean deployOnStartup);
	
	/**
	 * Return the RealmDatabase with which this ServiceProviderProvider is associated.  If there is
	 * no associated RealmDatabase return <code>null</code>.
	 */
	public RealmDatabase getRealmDatabase();

	/**
	 * Set the Realm with which this ServiceProviderProvider is associated.
	 *
	 * @param realmDatabase The newly associated Realm
	 */
	public void setRealmDatabase(RealmDatabase realmDatabase);

	
	/**
	 * Return the SessionManager with which this Engine is associated. 
	 */
	public SessionManager getSessionManager();


	/**
	 * Set the Manager with which this Engine is associated.
	 *
	 * @param SessionManager The newly associated SessionManager
	 */
	public void setSessionManager(SessionManager manager);	
}
