Package ro.sync.exml.plugin
Class PluginDescriptor
java.lang.Object
ro.sync.exml.plugin.PluginDescriptor
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classContains a plugin description + plugin type + keyboard shortcuts -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringAdditional DITA OT plugin type.static final StringAdditional frameworks location plugin type.static final StringAdditional translations plugin type.static final StringAdditional XProc Engine type.static final StringExtension point for external AI connectors that allow connection to an AI servicestatic final StringExtension point for external AI functionsstatic final StringExtension that provide an Author CSS.static final StringThe startup extension.static final StringExtension point to provide additional CSP.static final StringDocument processor extension type.static final StringExtension point for external document validatorstatic final StringGeneral extension type.static final StringCSS Styles filter plugin type.static final StringA lock handler factory.static final StringOpen redirector plugin type.static final StringOption page extension plugin type.static final StringOption page group extension plugin type.static final StringRefactoring operations provider plugin type.static final StringSelection processor extension type.static final StringTargeted URL stream handler extension type.static final StringAn XSLT transformer extension.static final StringExtension point to provide trusted hosts.static final StringURL stream handler extension type.static final StringURL stream handler extension type.static final StringURL stream handler extension type.static final StringDeprecated.static final StringWebappStaticResourcesFolderstatic final StringWebApp plugin servlet.static final StringWebApp plugin servlet filter.static final StringWebappStaticResourcesFolderstatic final StringWorkspace access plugin type.static final StringWorkspace access plugin type implemented in JavaScript.static final StringA JavaScript module of the Workspace access plugin.static final StringAn XQuery transformer extension. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddContextInstance(Object contextInstance) Add a context instance.voidPut an extension corresponding to the specified key.voidaddPluginContributedToolbar(ro.sync.exml.plugin.PluginContributedToolbar toolbarInfo) Add a toolbar.voidaddPluginContributedView(ro.sync.exml.plugin.PluginContributedView viewInfo) Add a contributed viewGet the base directory of the plugin.Getter for all context instances.List<ro.sync.exml.plugin.PluginContributedToolbar>Gets the toolbars contributed by this plugin.List<ro.sync.exml.plugin.PluginContributedView>Get the description of the plugin.Get all the extensions of a plugin.getExtensions(String key) Get the extension corresponding to the specified key.getID()getName()Gets the name of the plugin.Get the vendor of the plugin.Get the version of the plugin.booleanbooleanGet the enabled status.voidsetBaseDir(File baseDir) Set the base dir of the plugin.voidsetConfigUrlPath(String configUrlPath) voidsetDescription(String description) Set the description of the plugin.voidsetDisabledFromFile(boolean isDisabledFromFile) Sets the disabled status from 'plugin.disable' file.voidsetEnabledStatus(boolean enabledStatus) Set the plugin enabled status.voidSets the ID of the plugin.voidsetLicense(String license) voidSet the name of the plugin.voidsetShouldAcceptLicense(boolean shouldAcceptLicense) voidSet the vendor of the plugin.voidsetVersion(String version) Set the version of the plugin.booleantoString()The string representation of the plugin descriptor.
-
Field Details
-
WEBAPP_CSS_RESOURCE
WebappStaticResourcesFolder- See Also:
-
SELECTION_PROCESSOR
Selection processor extension type.- See Also:
-
WEBAPP_SERVLET_FILTER
WebApp plugin servlet filter.- See Also:
-
WEBAPP_SERVLET
WebApp plugin servlet.- See Also:
-
WEBAPP_STATIC_RESOURCE_FOL
WebappStaticResourcesFolder- See Also:
-
GENERAL_EXTENSION
General extension type.- See Also:
-
DOCUMENT_PROCESSOR
Document processor extension type.- See Also:
-
URL_STREAM_HANDLER
Deprecated.URL stream handler extension type.- See Also:
-
URL_HANDLER
URL stream handler extension type.- See Also:
-
TARGETED_URL_HANDLER
Targeted URL stream handler extension type.- See Also:
-
TRANSFORMER
An XSLT transformer extension.- See Also:
-
XQUERY_TRANSFORMER
An XQuery transformer extension.- See Also:
-
URL_CHOOSER
URL stream handler extension type.- See Also:
-
URL_CHOOSER_TOOLBAR
URL stream handler extension type.- See Also:
-
COMPONENTS_VALIDATOR_EXTENSION
The startup extension.- See Also:
-
OPEN_REDIRECTOR
Open redirector plugin type.- See Also:
-
WORKSPACE_ACCESS
Workspace access plugin type.- See Also:
-
WORKSPACE_ACCESS_JS
Workspace access plugin type implemented in JavaScript.- See Also:
-
WORKSPACE_ACCESS_JS_MODULE
A JavaScript module of the Workspace access plugin.- See Also:
-
OPTION_PAGE
Option page extension plugin type.- See Also:
-
OPTION_PAGE_GROUP
Option page group extension plugin type.- See Also:
-
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
A lock handler factory.- See Also:
-
REFACTORING_OPERATIONS_PROVIDER
Refactoring operations provider plugin type.- See Also:
-
ADDITIONAL_DITA_OT
Additional DITA OT plugin type.- See Also:
-
ADDITIONAL_XPROC_ENGINE
Additional XProc Engine type.- See Also:
-
AUTHOR_STYLESHEET
Extension that provide an Author CSS.- See Also:
-
ADDITIONAL_FRAMEWORKS
Additional frameworks location plugin type.- See Also:
-
ADDITIONAL_UI_TRANSLATIONS
Additional translations plugin type.- See Also:
-
TRUSTED_HOSTS
Extension point to provide trusted hosts.- See Also:
-
CSP
Extension point to provide additional CSP.- See Also:
-
DOCUMENT_VALIDATOR
Extension point for external document validator- See Also:
-
AI_FUNCTIONS
Extension point for external AI functions- See Also:
-
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
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
Add a context instance.- Parameters:
contextInstance- a context instance.
-
getContextInstances
Getter for all context instances.- Returns:
- the context instances.
-
getDescription
Get the description of the plugin.- Returns:
- The description of the plugin.
-
setDescription
Set the description of the plugin.- Parameters:
description- The description of the plugin.
-
getName
Gets the name of the plugin.- Returns:
- The name of the plugin.
-
setName
Set the name of the plugin.- Parameters:
name- The name of the plugin.
-
setID
Sets the ID of the plugin. Empty string is treated as no ID.- Parameters:
id- ID of the plugin.
-
getID
- Returns:
- Returns the id of the plugin or
nullif the plugin doesn't have an ID.
-
getVendor
Get the vendor of the plugin.- Returns:
- The vendor name.
-
setVendor
Set the vendor of the plugin.- Parameters:
vendor- The vendor of the plugin.
-
getVersion
Get the version of the plugin.- Returns:
- The plugin version.
-
setVersion
Set the version of the plugin.- Parameters:
version- The version of the plugin.
-
isEnabledStatus
public boolean isEnabledStatus()Get the enabled status.- Returns:
- Returns
trueif the plugin is enabled.
-
setEnabledStatus
public void setEnabledStatus(boolean enabledStatus) Set the plugin enabled status.- Parameters:
enabledStatus-trueif the plugin is enabled.falseif the plugin is disabled.
-
isDisabledFromFile
public boolean isDisabledFromFile()- Returns:
- Returns
trueif the plugin is disabled using 'plugin.disable' file.
-
setDisabledFromFile
public void setDisabledFromFile(boolean isDisabledFromFile) Sets the disabled status from 'plugin.disable' file.- Parameters:
isDisabledFromFile- Thetrueif the plugin is disabled using 'plugin.disable' file.
-
getBaseDir
Get the base directory of the plugin.- Returns:
- The plugin base directory.
-
setBaseDir
Set the base dir of the plugin.- Parameters:
baseDir- The base dir of the plugin.
-
getConfigUrlPath
- Returns:
- Returns the configUrl.
-
setConfigUrlPath
- 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
- 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
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
The string representation of the plugin descriptor. -
getLicense
- Returns:
- Returns the license.
-
setLicense
- Parameters:
license- The license to set.
-