Class PluginDescriptor

java.lang.Object
ro.sync.exml.plugin.PluginDescriptor

@API(type=NOT_EXTENDABLE, src=PUBLIC) public class PluginDescriptor extends Object
Descriptor of the plugin.

A plugin is characterised by:

- name The plugin name as it will appear in the oXygen menus.

- description A short description of what the plugin does.

- vendor The name of the vendor.

- version The current version.

- baseDir The base dir used for file crreation.

- extensions A set of extensions.

  • Field Details

    • WEBAPP_CSS_RESOURCE

      public static final String WEBAPP_CSS_RESOURCE
      WebappStaticResourcesFolder
      See Also:
    • SELECTION_PROCESSOR

      public static final String SELECTION_PROCESSOR
      Selection processor extension type.
      See Also:
    • WEBAPP_SERVLET_FILTER

      public static final String WEBAPP_SERVLET_FILTER
      WebApp plugin servlet filter.
      See Also:
    • WEBAPP_SERVLET

      public static final String WEBAPP_SERVLET
      WebApp plugin servlet.
      See Also:
    • WEBAPP_STATIC_RESOURCE_FOL

      public static final String WEBAPP_STATIC_RESOURCE_FOL
      WebappStaticResourcesFolder
      See Also:
    • GENERAL_EXTENSION

      public static final String GENERAL_EXTENSION
      General extension type.
      See Also:
    • DOCUMENT_PROCESSOR

      public static final String DOCUMENT_PROCESSOR
      Document processor extension type.
      See Also:
    • URL_STREAM_HANDLER

      @Deprecated public static final String URL_STREAM_HANDLER
      Deprecated.
      URL stream handler extension type.
      See Also:
    • URL_HANDLER

      public static final String URL_HANDLER
      URL stream handler extension type.
      See Also:
    • TARGETED_URL_HANDLER

      public static final String TARGETED_URL_HANDLER
      Targeted URL stream handler extension type.
      See Also:
    • TRANSFORMER

      public static final String TRANSFORMER
      An XSLT transformer extension.
      See Also:
    • XQUERY_TRANSFORMER

      public static final String XQUERY_TRANSFORMER
      An XQuery transformer extension.
      See Also:
    • URL_CHOOSER

      public static final String URL_CHOOSER
      URL stream handler extension type.
      See Also:
    • URL_CHOOSER_TOOLBAR

      public static final String URL_CHOOSER_TOOLBAR
      URL stream handler extension type.
      See Also:
    • COMPONENTS_VALIDATOR_EXTENSION

      public static final String COMPONENTS_VALIDATOR_EXTENSION
      The startup extension.
      See Also:
    • OPEN_REDIRECTOR

      public static final String OPEN_REDIRECTOR
      Open redirector plugin type.
      See Also:
    • WORKSPACE_ACCESS

      public static final String WORKSPACE_ACCESS
      Workspace access plugin type.
      See Also:
    • WORKSPACE_ACCESS_JS

      public static final String WORKSPACE_ACCESS_JS
      Workspace access plugin type implemented in JavaScript.
      See Also:
    • WORKSPACE_ACCESS_JS_MODULE

      public static final String WORKSPACE_ACCESS_JS_MODULE
      A JavaScript module of the Workspace access plugin.
      See Also:
    • OPTION_PAGE

      public static final String OPTION_PAGE
      Option page extension plugin type.
      See Also:
    • OPTION_PAGE_GROUP

      public static final String OPTION_PAGE_GROUP
      Option page group extension plugin type.
      See Also:
    • GENERAL_STYLES_FILTER

      public static final String GENERAL_STYLES_FILTER
      CSS Styles filter plugin type. This filter will be used to filter CSS styles for any document presented in author mode.
      See Also:
    • LOCK_HANDLER_FACTORY

      public static final String LOCK_HANDLER_FACTORY
      A lock handler factory.
      See Also:
    • REFACTORING_OPERATIONS_PROVIDER

      public static final String REFACTORING_OPERATIONS_PROVIDER
      Refactoring operations provider plugin type.
      See Also:
    • ADDITIONAL_DITA_OT

      public static final String ADDITIONAL_DITA_OT
      Additional DITA OT plugin type.
      See Also:
    • ADDITIONAL_XPROC_ENGINE

      public static final String ADDITIONAL_XPROC_ENGINE
      Additional XProc Engine type.
      See Also:
    • AUTHOR_STYLESHEET

      public static final String AUTHOR_STYLESHEET
      Extension that provide an Author CSS.
      See Also:
    • ADDITIONAL_FRAMEWORKS

      public static final String ADDITIONAL_FRAMEWORKS
      Additional frameworks location plugin type.
      See Also:
    • ADDITIONAL_UI_TRANSLATIONS

      public static final String ADDITIONAL_UI_TRANSLATIONS
      Additional translations plugin type.
      See Also:
    • TRUSTED_HOSTS

      public static final String TRUSTED_HOSTS
      Extension point to provide trusted hosts.
      See Also:
    • CSP

      public static final String CSP
      Extension point to provide additional CSP.
      See Also:
    • DOCUMENT_VALIDATOR

      public static final String DOCUMENT_VALIDATOR
      Extension point for external document validator
      See Also:
    • AI_FUNCTIONS

      public static final String AI_FUNCTIONS
      Extension point for external AI functions
      See Also:
    • AI_CONNECTORS

      public static final String AI_CONNECTORS
      Extension point for external AI connectors that allow connection to an AI service
      See Also:
  • Constructor Details

    • PluginDescriptor

      public PluginDescriptor()
  • Method Details

    • getExtensions

      Get the extension corresponding to the specified key.

      Available extensions for the moment are: SELECTION_PROCESSOR & GENERAL_EXTENSION.

      Parameters:
      key - The extension key.
      Returns:
      The extension corresponding to the specified key.
    • getExtensions

      Get all the extensions of a plugin.
      Returns:
      an immutable list of all the extensions of a plugin.
    • addExtension

      public void addExtension(PluginDescriptor.PluginExtensionDescription descr)
      Put an extension corresponding to the specified key. Available extensions for the moment are: SELECTION_PROCESSOR & GENERAL_EXTENSION.
      Parameters:
      descr - The plugin extension description.
    • addContextInstance

      public void addContextInstance(Object contextInstance)
      Add a context instance.
      Parameters:
      contextInstance - a context instance.
    • getContextInstances

      public List<Object> getContextInstances()
      Getter for all context instances.
      Returns:
      the context instances.
    • getDescription

      public String getDescription()
      Get the description of the plugin.
      Returns:
      The description of the plugin.
    • setDescription

      public void setDescription(String description)
      Set the description of the plugin.
      Parameters:
      description - The description of the plugin.
    • getName

      public String getName()
      Gets the name of the plugin.
      Returns:
      The name of the plugin.
    • setName

      public void setName(String name)
      Set the name of the plugin.
      Parameters:
      name - The name of the plugin.
    • setID

      public void setID(String id)
      Sets the ID of the plugin. Empty string is treated as no ID.
      Parameters:
      id - ID of the plugin.
    • getID

      public String getID()
      Returns:
      Returns the id of the plugin or null if the plugin doesn't have an ID.
    • getVendor

      public String getVendor()
      Get the vendor of the plugin.
      Returns:
      The vendor name.
    • setVendor

      public void setVendor(String vendor)
      Set the vendor of the plugin.
      Parameters:
      vendor - The vendor of the plugin.
    • getVersion

      public String getVersion()
      Get the version of the plugin.
      Returns:
      The plugin version.
    • setVersion

      public void setVersion(String version)
      Set the version of the plugin.
      Parameters:
      version - The version of the plugin.
    • isEnabledStatus

      public boolean isEnabledStatus()
      Get the enabled status.
      Returns:
      Returns true if the plugin is enabled.
    • setEnabledStatus

      public void setEnabledStatus(boolean enabledStatus)
      Set the plugin enabled status.
      Parameters:
      enabledStatus - true if the plugin is enabled. false if the plugin is disabled.
    • isDisabledFromFile

      public boolean isDisabledFromFile()
      Returns:
      Returns true if the plugin is disabled using 'plugin.disable' file.
    • setDisabledFromFile

      public void setDisabledFromFile(boolean isDisabledFromFile)
      Sets the disabled status from 'plugin.disable' file.
      Parameters:
      isDisabledFromFile - The true if the plugin is disabled using 'plugin.disable' file.
    • getBaseDir

      public File getBaseDir()
      Get the base directory of the plugin.
      Returns:
      The plugin base directory.
    • setBaseDir

      public void setBaseDir(File baseDir)
      Set the base dir of the plugin.
      Parameters:
      baseDir - The base dir of the plugin.
    • getConfigUrlPath

      public String getConfigUrlPath()
      Returns:
      Returns the configUrl.
    • setConfigUrlPath

      public void setConfigUrlPath(String configUrlPath)
      Parameters:
      configUrlPath - The configUrl to set.
    • addPluginContributedView

      public void addPluginContributedView(ro.sync.exml.plugin.PluginContributedView viewInfo)
      Add a contributed view
      Parameters:
      viewInfo - Information about the view
    • getContributedViews

      public List<ro.sync.exml.plugin.PluginContributedView> getContributedViews()
      Returns:
      Returns the contributedViews.
    • addPluginContributedToolbar

      public void addPluginContributedToolbar(ro.sync.exml.plugin.PluginContributedToolbar toolbarInfo)
      Add a toolbar.
      Parameters:
      toolbarInfo - Information about the new toolbar.
    • getContributedToolbars

      public List<ro.sync.exml.plugin.PluginContributedToolbar> getContributedToolbars()
      Gets the toolbars contributed by this plugin.
      Returns:
      The list of contributed toolbars.
    • shouldAcceptLicense

      public boolean shouldAcceptLicense()
      Returns:
      Returns the shouldAcceptLicense.
    • setShouldAcceptLicense

      public void setShouldAcceptLicense(boolean shouldAcceptLicense)
      Parameters:
      shouldAcceptLicense - The shouldAcceptLicense to set.
    • toString

      public String toString()
      The string representation of the plugin descriptor.
      Overrides:
      toString in class Object
      Returns:
      The string representation.
    • getLicense

      public String getLicense()
      Returns:
      Returns the license.
    • setLicense

      public void setLicense(String license)
      Parameters:
      license - The license to set.