com.openindex.openestate.tool
Class ImmoToolPlugin

java.lang.Object
  extended by com.openindex.openestate.tool.ImmoToolPlugin
All Implemented Interfaces:
Pluggable
Direct Known Subclasses:
AgencyPlugin, CalendarPlugin, ContactsPlugin, ImmoToolLanguagePack

public abstract class ImmoToolPlugin
extends Object
implements Pluggable

Allgemeine Implementierung eines Add-Ons.
$Id: ImmoToolPlugin.java 1845 2012-10-18 16:34:47Z andy $

Author:
Andreas Rudolph

Field Summary
static String RES_PLUGIN_APIVERSION
           
static String RES_PLUGIN_AUTHOR
           
static String RES_PLUGIN_DESCRIPTION
           
static String RES_PLUGIN_LICENSE
           
static String RES_PLUGIN_TITLE
           
static String RES_PLUGIN_VERSION
           
static String RES_PLUGIN_WEBSITE
           
 
Constructor Summary
ImmoToolPlugin()
          Erzeugt eine Instanz der Klasse 'ImmoToolPlugin'
 
Method Summary
 void clearResources()
           
 ImmoToolPluginException createException(String msg)
           
 ImmoToolPluginException createException(String msg, Throwable t)
           
 javax.help.HelpSet createHelpSet()
          Erzeugt den Handbuch-Eintrag des Plugins.
 JMenu createMenu()
          Erzeugt den Hauptmenü-Eintrag des Plugins.
protected  JMenuItem createMenuItem(Action action)
          Hilfsfunktion zur Erzeugung eines Menü-Eintrages.
 List<ImmoToolSetupPanel> createSetupPanels()
          Erzeugt eine Liste mit Konfigurations-Formularen für das Plugin im Einstellungsdialog.
 org.jdesktop.swingx.JXTaskPane createTaskPane()
          Erzeugt den Sidebar-Eintrag des Plugins.
 void exportDatabase(File dir, ImmoToolDb db, ImmoToolProject project, JOptionFileChooser dlg, ImmoToolTask.Callback callback)
           
protected  void exportSchema(ImmoToolDb db, String name, InputStream in)
          Export eines Schemas zur Verwendung in der XML-Datenbank
 void exportSchemas(ImmoToolDb db)
          Registrierung von XML-Schemas zur Verwendung in der Datenbank.
 ActionMap getActionMap()
           
 String getAuthor()
           
 String getDescription()
           
 Map<String,JOptionFileChooser.OptionField> getExportDatabaseSettings()
           
 String getLicense()
           
 int getMinimalVersion()
           
abstract  String getName()
           
 org.jdesktop.application.ResourceMap getResourceMap()
           
 String getTitle()
           
 String getVersion()
           
 String getWebsite()
           
 void initDatabase(ImmoToolDb db, ImmoToolProject project, ImmoToolTask.Callback callback)
           
 void installOrUpdate(org.apache.http.client.HttpClient client)
           
static Map<String,ImmoToolPlugin> listAvailablePlugins()
           
 void load()
           
 void rebuildDatabase(ImmoToolDb db, ImmoToolProject project, ImmoToolTask.Callback callback)
           
 void save()
           
 void uninstall()
           
 void update(ImmoToolProject project, ImmoToolDb db, String oldVersion, String newVersion)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.openindex.openestate.tool.utils.engine.Pluggable
destroy, getIcon, getURI, hasOptions, init, openOptions
 

Field Detail

RES_PLUGIN_APIVERSION

public static final String RES_PLUGIN_APIVERSION
See Also:
Constant Field Values

RES_PLUGIN_AUTHOR

public static final String RES_PLUGIN_AUTHOR
See Also:
Constant Field Values

RES_PLUGIN_DESCRIPTION

public static final String RES_PLUGIN_DESCRIPTION
See Also:
Constant Field Values

RES_PLUGIN_LICENSE

public static final String RES_PLUGIN_LICENSE
See Also:
Constant Field Values

RES_PLUGIN_TITLE

public static final String RES_PLUGIN_TITLE
See Also:
Constant Field Values

RES_PLUGIN_VERSION

public static final String RES_PLUGIN_VERSION
See Also:
Constant Field Values

RES_PLUGIN_WEBSITE

public static final String RES_PLUGIN_WEBSITE
See Also:
Constant Field Values
Constructor Detail

ImmoToolPlugin

public ImmoToolPlugin()
Erzeugt eine Instanz der Klasse 'ImmoToolPlugin'

Method Detail

clearResources

public void clearResources()

createException

public ImmoToolPluginException createException(String msg)

createException

public ImmoToolPluginException createException(String msg,
                                               Throwable t)

createHelpSet

public javax.help.HelpSet createHelpSet()
                                 throws javax.help.HelpSetException
Erzeugt den Handbuch-Eintrag des Plugins.

Returns:
Handbuch-Instanz
Throws:
javax.help.HelpSetException - interner Fehler

createMenu

public JMenu createMenu()
Erzeugt den Hauptmenü-Eintrag des Plugins.

Returns:
Hauptmenü-Eintrag

createMenuItem

protected JMenuItem createMenuItem(Action action)
Hilfsfunktion zur Erzeugung eines Menü-Eintrages.

Parameters:
action -
Returns:

createSetupPanels

public List<ImmoToolSetupPanel> createSetupPanels()
Erzeugt eine Liste mit Konfigurations-Formularen für das Plugin im Einstellungsdialog.

Returns:
Liste mit Formularen

createTaskPane

public org.jdesktop.swingx.JXTaskPane createTaskPane()
Erzeugt den Sidebar-Eintrag des Plugins.

Returns:
Sidebar-Eintrag

exportSchema

protected void exportSchema(ImmoToolDb db,
                            String name,
                            InputStream in)
                     throws ImmoToolPluginException
Export eines Schemas zur Verwendung in der XML-Datenbank

Parameters:
db - Datenbank
name - Schema-Name
in - InputStream des Schemas
Throws:
ImmoToolPluginException - Fehler

exportSchemas

public void exportSchemas(ImmoToolDb db)
                   throws ImmoToolPluginException
Registrierung von XML-Schemas zur Verwendung in der Datenbank.

Parameters:
db - Datenbank
Throws:
ImmoToolPluginException - Fehler

getActionMap

public ActionMap getActionMap()

getAuthor

public String getAuthor()

getDescription

public String getDescription()
Specified by:
getDescription in interface Pluggable
Returns:
the description for this plugin

getExportDatabaseSettings

public Map<String,JOptionFileChooser.OptionField> getExportDatabaseSettings()

getLicense

public String getLicense()

getMinimalVersion

public int getMinimalVersion()
Specified by:
getMinimalVersion in interface Pluggable
Returns:
the minimal version of the main application for which this plugin can work

getName

public abstract String getName()
Specified by:
getName in interface Pluggable
Returns:
the name for this plugin, should not be null

getResourceMap

public org.jdesktop.application.ResourceMap getResourceMap()

getTitle

public String getTitle()

getVersion

public String getVersion()
Specified by:
getVersion in interface Pluggable
Returns:
the version for this plugin

getWebsite

public String getWebsite()

exportDatabase

public void exportDatabase(File dir,
                           ImmoToolDb db,
                           ImmoToolProject project,
                           JOptionFileChooser dlg,
                           ImmoToolTask.Callback callback)
                    throws ImmoToolException
Throws:
ImmoToolException

initDatabase

public void initDatabase(ImmoToolDb db,
                         ImmoToolProject project,
                         ImmoToolTask.Callback callback)
                  throws ImmoToolException
Throws:
ImmoToolException

installOrUpdate

public void installOrUpdate(org.apache.http.client.HttpClient client)
                     throws PlugEngineException
Throws:
PlugEngineException

listAvailablePlugins

public static Map<String,ImmoToolPlugin> listAvailablePlugins()

load

public void load()

rebuildDatabase

public void rebuildDatabase(ImmoToolDb db,
                            ImmoToolProject project,
                            ImmoToolTask.Callback callback)
                     throws ImmoToolException
Throws:
ImmoToolException

save

public void save()

uninstall

public void uninstall()
               throws PlugEngineException
Throws:
PlugEngineException

update

public void update(ImmoToolProject project,
                   ImmoToolDb db,
                   String oldVersion,
                   String newVersion)
            throws ImmoToolException
Throws:
ImmoToolException


Copyright © 2012 OpenEstate. All Rights Reserved.