com.bigzip.plugin
Interface BiGZiPPlugin


public interface BiGZiPPlugin

The ArchivePlugin interface is used to extend the types of archive file formats that BiGZiP can handle. To develop a new plugin, this interface must be implemented and the fully qualified name of the implementation added to the bigzip_archiveplugin.config file.


Method Summary
 ArchiveModel createNew(java.io.File file)
          Creates a new archive file.
 java.lang.String[] getExtensions()
          Returns an array of extensions handled by the archive format.
 javax.swing.filechooser.FileFilter[] getFileFilters()
          Return the file filters for use in new and open file dialogs.
 javax.help.HelpSet getHelpSet()
           
 javax.swing.ImageIcon getLargeIcon()
           
 java.lang.String getPluginCompany()
           
 java.lang.String getPluginDescription()
           
 java.lang.String getPluginMajorVersion()
           
 java.lang.String getPluginMinorVersion()
           
 java.lang.String getPluginName()
           
 Settings getRegistrationSettings()
           
 Settings getSettings()
           
 javax.swing.ImageIcon getSmallIcon()
           
 ArchiveModel openExisting(java.io.File file)
          Opens an existing archive file.
 void setRegistrationSettings(Settings settings)
          BiGZiP calls this method to pass a registration settings object to the plugin.
 void setSettings(Settings settings)
          BiGZiP calls this method to pass a settings object to the plugin.
 

Method Detail

getExtensions

public java.lang.String[] getExtensions()
Returns an array of extensions handled by the archive format. The string in the array contain the extension without an initial period.
Returns:
An array of strings containing the extensions handled.

getFileFilters

public javax.swing.filechooser.FileFilter[] getFileFilters()
Return the file filters for use in new and open file dialogs. If the method returns null, the program will construct a file filter from the plugin number and the extensions returned from getExtension().
Returns:
The file filters or null for the default file filter.

getLargeIcon

public javax.swing.ImageIcon getLargeIcon()
Returns:
the large icon that represents the plugin.

getPluginCompany

public java.lang.String getPluginCompany()
Returns:
The name of the company that developed the plugin.

getPluginDescription

public java.lang.String getPluginDescription()
Returns:
A description of the plugin.

getPluginName

public java.lang.String getPluginName()
Returns:
The 'product' name of the plugin.

getPluginMajorVersion

public java.lang.String getPluginMajorVersion()
Returns:
The major version of the plugin. eg. 1.xx

Note, this value impacts the settings database. Changes to this value will cause a reset to the information stored.

getPluginMinorVersion

public java.lang.String getPluginMinorVersion()
Returns:
The minor version of the plugin. eg. x.01

Note, this value is ignored by the settings database.

getSmallIcon

public javax.swing.ImageIcon getSmallIcon()
Returns:
the large icon that represents the plugin.

getHelpSet

public javax.help.HelpSet getHelpSet()
Returns:
the Java HelpSet for the plugin. If you do not intend to include Java Help files then you must return an empty HelpSet. Eg. return new HelpSet();

getRegistrationSettings

public Settings getRegistrationSettings()
Returns:
The registration settings object that holds the plugin's user registration details and serial number. The information is stored in the "registration.data" located in the user's workspace under bigzip.

getSettings

public Settings getSettings()
Returns:
The settings object that holds the plugin's settings.

setRegistrationSettings

public void setRegistrationSettings(Settings settings)
BiGZiP calls this method to pass a registration settings object to the plugin. The plugin can use this object to store user details and serial number which will be stored when the program exits. This method is guarenteed to be called before any requests are made to open an archive or to create a new archive.
Parameters:
settings - The settings object.

setSettings

public void setSettings(Settings settings)
BiGZiP calls this method to pass a settings object to the plugin. The plugin can use this object to store settings that will be stored when the program exits. This method is guarenteed to be called before any requests are made to open an archive or to create a new archive.
Parameters:
settings - The settings object.

createNew

public ArchiveModel createNew(java.io.File file)
Creates a new archive file. The archive file should be empty if the archive file format can handle empty archives.
Parameters:
file - The path of the new archive file.
Returns:
The archive object that can be used to access the details of the archive.

openExisting

public ArchiveModel openExisting(java.io.File file)
Opens an existing archive file.
Parameters:
file - The path of the existing archive file.
Returns:
The archive object that can be used to access the details of the archive.