Class DefaultPluginsManager

java.lang.Object
org.gvsig.andami.impl.DefaultPluginsManager
All Implemented Interfaces:
PluginsManager

public class DefaultPluginsManager extends Object implements PluginsManager
  • Constructor Details

    • DefaultPluginsManager

      public DefaultPluginsManager()
  • Method Details

    • getExclusiveUIExtension

      public ExclusiveUIExtension getExclusiveUIExtension()
      Description copied from interface: PluginsManager
      Return the ExclusiveUIExtension installed in the application or null.
      Specified by:
      getExclusiveUIExtension in interface PluginsManager
      Returns:
    • getExtension

      public IExtension getExtension(Class<? extends IExtension> extension)
      Description copied from interface: PluginsManager
      Gets the instance of the extension whose class is provided.
      Specified by:
      getExtension in interface PluginsManager
      Parameters:
      extension - , class of the extension to retrieve
      Returns:
      The instance of the extension, or null if the instance does not exist.
    • getExtension

      public IExtension getExtension(String extension)
      Description copied from interface: PluginsManager
      Gets the instance of the extension whose class name is provided.
      Specified by:
      getExtension in interface PluginsManager
      Parameters:
      extension - , class name of the extension to retrieve
      Returns:
      The instance of the extension, or null if the instance does not exist.
    • getExtensions

      public Iterator<IExtension> getExtensions()
      Description copied from interface: PluginsManager
      Return an iterator over al extensions loaded in the application.
      Specified by:
      getExtensions in interface PluginsManager
      Returns:
      iterator over extensions
    • getPlugin

      public PluginServices getPlugin(Class<? extends IExtension> extension)
      Return the associated pluginServices to the extension class passed as parameter.
      Specified by:
      getPlugin in interface PluginsManager
      Parameters:
      extension -
      Returns:
      plugin services
    • getPlugin

      public PluginServices getPlugin(Object obj)
      Description copied from interface: PluginsManager
      Return the associated pluginServices to the object passed as parameter.
      Specified by:
      getPlugin in interface PluginsManager
      Returns:
      plugin services
    • getPlugin

      public PluginServices getPlugin(String pluginName)
      Description copied from interface: PluginsManager
      Return the associated pluginServices to the extension plugin.
      Specified by:
      getPlugin in interface PluginsManager
      Parameters:
      pluginName - , name of the plugin
      Returns:
      plugin services
    • getPluginHomeFolder

      public File getPluginHomeFolder(String pluginName)
      Specified by:
      getPluginHomeFolder in interface PluginsManager
    • getPackageInfo

      public org.gvsig.installer.lib.api.PackageInfo getPackageInfo(Class<? extends IExtension> extension)
      Description copied from interface: PluginsManager
      Get the package info associated to the plugin of the extension.
      Specified by:
      getPackageInfo in interface PluginsManager
      Parameters:
      extension - extension of the plugin
      Returns:
      plugin package info
    • getPackageInfo

      public org.gvsig.installer.lib.api.PackageInfo getPackageInfo(String pluginName)
      Description copied from interface: PluginsManager
      Get the package info associated to the plugin with the specified name.
      Specified by:
      getPackageInfo in interface PluginsManager
      Parameters:
      pluginName - , name of the plugin
      Returns:
      plugin package info
    • getPackageInfo

      public org.gvsig.installer.lib.api.PackageInfo getPackageInfo()
      Description copied from interface: PluginsManager
      Get the package info associated to the application.
      Specified by:
      getPackageInfo in interface PluginsManager
      Returns:
      application package info
    • getPlugins

      public List<PluginServices> getPlugins()
      Description copied from interface: PluginsManager
      Return the list of plugins loaded in the application
      Specified by:
      getPlugins in interface PluginsManager
      Returns:
      list of plugins
    • setExclusiveUIExtension

      public void setExclusiveUIExtension(ExclusiveUIExtension extension)
      Description copied from interface: PluginsManager
      Set an extension to control the visivility of all the extensions of the application.
      Specified by:
      setExclusiveUIExtension in interface PluginsManager
      Parameters:
      extension -
    • getText

      public String getText(Object obj, String msg)
      Specified by:
      getText in interface PluginsManager
    • translate

      public String translate(String msg)
      Description copied from interface: PluginsManager
      Translate the message key to the current language used in the application.
      Specified by:
      translate in interface PluginsManager
      Parameters:
      msg - key to translate
      Returns:
      message traslated or the key
    • getApplicationFolder

      public File getApplicationFolder()
      Description copied from interface: PluginsManager
      Returns the main application folder, where the application is installed.
      Specified by:
      getApplicationFolder in interface PluginsManager
      Returns:
      the main application folder
    • getPluginsDirectory

      public File getPluginsDirectory()
      Specified by:
      getPluginsDirectory in interface PluginsManager
    • getPluginsFolder

      public File getPluginsFolder()
      Description copied from interface: PluginsManager
      Returns the plugins folder.
      Specified by:
      getPluginsFolder in interface PluginsManager
      Returns:
      the plugins folder
    • getPluginsFolders

      public List<File> getPluginsFolders()
      Description copied from interface: PluginsManager
      Returns a list of folder on the plugins are instaleds.
      Specified by:
      getPluginsFolders in interface PluginsManager
      Returns:
      list of folders File of the plugins.
    • getInstallFolder

      public File getInstallFolder()
      Description copied from interface: PluginsManager
      Returns the default folder with the installable package bundles.
      Specified by:
      getInstallFolder in interface PluginsManager
      Returns:
      the default folder with the installable package bundles
    • getApplicationHomeFolder

      public File getApplicationHomeFolder()
      Description copied from interface: PluginsManager
      Returns the application folder in the home of user.
      Specified by:
      getApplicationHomeFolder in interface PluginsManager
      Returns:
      the main application folder
    • addStartupTask

      public void addStartupTask(String name, Runnable task, boolean in_event_thread, int priority)
      Description copied from interface: PluginsManager
      This method allows plugins register task to do before initializacion of all gvSIG plugins. Task with higher priority value are executed after.
      Specified by:
      addStartupTask in interface PluginsManager
      Parameters:
      name - of the task
      task - runnable with the code of the task
      in_event_thread - , true if the task shoul run in the AWT event thread.
      priority - of the task.
    • addShutdownTask

      public void addShutdownTask(String name, Runnable task, boolean in_event_thread, int priority)
      Description copied from interface: PluginsManager
      This method allows plugins register task to do after close the application. Task with higher priority value are executed after.
      Specified by:
      addShutdownTask in interface PluginsManager
      Parameters:
      name - of the task
      task - runnable with the code of the task
      in_event_thread - , true if the task shoul run in the AWT event thread.
      priority - of the task.
    • executeStartupTasks

      public void executeStartupTasks()
      Description copied from interface: PluginsManager
      This method executes registered task to run before the initialization of all plugins. The tasks are sorted according to the priority and executed in a separated thread.
      Specified by:
      executeStartupTasks in interface PluginsManager
    • executeShutdownTasks

      public void executeShutdownTasks()
      Description copied from interface: PluginsManager
      This method executes registered task to run after the close of the application. The tasks are sorted according to the priority and executed in a separated thread.
      Specified by:
      executeShutdownTasks in interface PluginsManager
    • getApplicationI18nFolder

      public File getApplicationI18nFolder()
      Description copied from interface: PluginsManager
      Returns the default folder where the internationalization files are installed.
      Specified by:
      getApplicationI18nFolder in interface PluginsManager
      Returns:
      the default folder where the internationalization files are installed.
    • getFirewallConfiguration

      public FirewallConfiguration getFirewallConfiguration()
      Specified by:
      getFirewallConfiguration in interface PluginsManager
    • getApplicationVersion

      public org.gvsig.installer.lib.api.Version getApplicationVersion()
      Specified by:
      getApplicationVersion in interface PluginsManager
    • getUnsavedData

      public List<IUnsavedData> getUnsavedData()
      Description copied from interface: PluginsManager
      Return a list of unsaved data
      Specified by:
      getUnsavedData in interface PluginsManager
      Returns:
    • saveUnsavedData

      public void saveUnsavedData(List<IUnsavedData> unsavedData) throws UnsavedDataException
      Description copied from interface: PluginsManager
      Save the provided unsaved data as parameter
      Specified by:
      saveUnsavedData in interface PluginsManager
      Parameters:
      unsavedData -
      Throws:
      UnsavedDataException
    • getApplicationName

      public String getApplicationName()
      Specified by:
      getApplicationName in interface PluginsManager
    • getTempFolder

      public File getTempFolder()
      Description copied from interface: PluginsManager
      Gets the temporary folder of the plugins framework.
      Specified by:
      getTempFolder in interface PluginsManager
      Returns:
      the temp folder
    • getTempFile

      public File getTempFile(String name)
      Description copied from interface: PluginsManager
      Get the file name in the temporary folder of the plugins framework.
      Specified by:
      getTempFile in interface PluginsManager
      Parameters:
      name -
      Returns:
    • getTempFile

      public File getTempFile(String name, String sufix)
      Description copied from interface: PluginsManager
      Create a unique file name in the temporary folder of the plugins framework.
      Specified by:
      getTempFile in interface PluginsManager
      Parameters:
      name - base name used for create the unique file name
      sufix - to add the the unique file name
      Returns:
    • desktopBrowse

      public boolean desktopBrowse(URI uri)
      Description copied from interface: PluginsManager
      Browses to a given URI
      Specified by:
      desktopBrowse in interface PluginsManager
      Parameters:
      uri -
      Returns:
    • desktopOpen

      public boolean desktopOpen(File file)
      Description copied from interface: PluginsManager
      Open a given file
      Specified by:
      desktopOpen in interface PluginsManager
      Parameters:
      file -
      Returns:
    • getArguments

      public Arguments getArguments()
      Specified by:
      getArguments in interface PluginsManager