lhmc.plugins
Class PluginFactory

java.lang.Object
  extended by lhmc.plugins.PluginFactory

public class PluginFactory
extends java.lang.Object

PluginFactory decides which plugin must be executed depending on the file type of the giben file.

Version:
0.01 29 Mar 2007
Author:
Cristina Roura Claver

Constructor Summary
PluginFactory()
           
 
Method Summary
 int figureOutfileType(java.io.File file)
          Figures out the type of file.
 int figureOutfileType(SmbFile smbFile)
          Figures out the type of file.
 Plugin getPlugin(int cdType)
          Returns the plugin suitable to execute the giben cdType.
 Plugin getPlugin(java.net.URL url)
          Returns the plugin suitable to execute the giben file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PluginFactory

public PluginFactory()
Method Detail

getPlugin

public Plugin getPlugin(java.net.URL url)
Returns the plugin suitable to execute the giben file.

Parameters:
url - the url file to execute.
Returns:
the plugin to use for executing the file.

getPlugin

public Plugin getPlugin(int cdType)
Returns the plugin suitable to execute the giben cdType.

Parameters:
cdType - the cdType to execute.
Returns:
the plugin to use for executing the cd or dvd.

figureOutfileType

public int figureOutfileType(java.io.File file)
Figures out the type of file.

Parameters:
file - the file to get the type.
Returns:
an integer that matches d.

figureOutfileType

public int figureOutfileType(SmbFile smbFile)
Figures out the type of file.

Parameters:
smbFile - the smbfile to get the type.
Returns:
an integer that matches d.