ice.storm
Interface PilotFactory

All Superinterfaces:
ScripterFactory
All Known Implementing Classes:
DefaultFactory

public interface PilotFactory
extends ScripterFactory

Factory for creating pilots and scripters. This interface is a factory for creating Pilots ans Scripters. The factory object is is used to create pilots as well as to check whether a given pilot supports a certain content.

Author:
Alexey Goloshubin, ICEsoft

Method Summary
 Pilot createPilot(ContentLoader loader)
          Create a pilot to display the content that is being loaded by the ContentLoader.
 Pilot createPilot(String contentType)
          Create a pilot for a given content type.
 Scripter createScripter(String scriptName)
          Create an interpreter for procesing commands in scripting language called scriptName
 Enumeration getAllPilotInfos()
          Get a enumeration of all PilotInfos that describe all (so far) known pilots.
 Enumeration getAllScripterInfos()
          Get a enumeration of all ScripterInfos describing all (so far) known scripters
 ScripterInfo getScripterInfo(String alias)
           
 boolean isContentTypeSupported(Pilot pilot, ContentLoader loader, String contentType)
          Check whether the specified pilot can display the data of a given content type or that is going to be loaded by the ContentLoader.
 

Method Detail

createPilot

public Pilot createPilot(String contentType)
Create a pilot for a given content type. This will use existing mappings between contentType and pilots.

Parameters:
contentType - content type of the data
Returns:
a Pilot that can display the data of this content type

createPilot

public Pilot createPilot(ContentLoader loader)
Create a pilot to display the content that is being loaded by the ContentLoader.

Parameters:
loader - ContentLoader that is doing the loading of the data
Returns:
a Pilot that can display this content

isContentTypeSupported

public boolean isContentTypeSupported(Pilot pilot,
                                      ContentLoader loader,
                                      String contentType)
Check whether the specified pilot can display the data of a given content type or that is going to be loaded by the ContentLoader.

Parameters:
pilot - Pilot that is being checked
loader - ContentLoader that is doing the loading of the data
contentType - contentType of the data. If this value is specified it overrides the contentType that is determined by the loader.
Returns:
true if the pilot can display the data

getAllPilotInfos

public Enumeration getAllPilotInfos()
Get a enumeration of all PilotInfos that describe all (so far) known pilots.

Returns:
Enumeration of PilotInfo objects

createScripter

public Scripter createScripter(String scriptName)
Create an interpreter for procesing commands in scripting language called scriptName

Specified by:
createScripter in interface ScripterFactory
Parameters:
scriptName - name of the scripting language
Returns:
an instance of Scripter object

getScripterInfo

public ScripterInfo getScripterInfo(String alias)
Specified by:
getScripterInfo in interface ScripterFactory

getAllScripterInfos

public Enumeration getAllScripterInfos()
Get a enumeration of all ScripterInfos describing all (so far) known scripters

Specified by:
getAllScripterInfos in interface ScripterFactory
Returns:
Enumeration of ScriptInfo objects