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 class
Contains a plugin description + plugin type + keyboard shortcuts -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Additional DITA OT plugin type.static final String
Additional frameworks location plugin type.static final String
Additional translations plugin type.static final String
Additional XProc Engine type.static final String
Extension point for external AI connectors that allow connection to an AI servicestatic final String
Extension point for external AI functionsstatic final String
Extension that provide an Author CSS.static final String
The startup extension.static final String
Extension point to provide additional CSP.static final String
Document processor extension type.static final String
Extension point for external document validatorstatic final String
General extension type.static final String
CSS Styles filter plugin type.static final String
A lock handler factory.static final String
Open redirector plugin type.static final String
Option page extension plugin type.static final String
Option page group extension plugin type.static final String
Refactoring operations provider plugin type.static final String
Selection processor extension type.static final String
Targeted URL stream handler extension type.static final String
An XSLT transformer extension.static final String
Extension point to provide trusted hosts.static final String
URL stream handler extension type.static final String
URL stream handler extension type.static final String
URL stream handler extension type.static final String
Deprecated.static final String
WebappStaticResourcesFolderstatic final String
WebApp plugin servlet.static final String
WebApp plugin servlet filter.static final String
WebappStaticResourcesFolderstatic final String
Workspace access plugin type.static final String
Workspace access plugin type implemented in JavaScript.static final String
A JavaScript module of the Workspace access plugin.static final String
An XQuery transformer extension. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addContextInstance
(Object contextInstance) Add a context instance.void
Put an extension corresponding to the specified key.void
addPluginContributedToolbar
(ro.sync.exml.plugin.PluginContributedToolbar toolbarInfo) Add a toolbar.void
addPluginContributedView
(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.boolean
boolean
Get the enabled status.void
setBaseDir
(File baseDir) Set the base dir of the plugin.void
setConfigUrlPath
(String configUrlPath) void
setDescription
(String description) Set the description of the plugin.void
setDisabledFromFile
(boolean isDisabledFromFile) Sets the disabled status from 'plugin.disable' file.void
setEnabledStatus
(boolean enabledStatus) Set the plugin enabled status.void
Sets the ID of the plugin.void
setLicense
(String license) void
Set the name of the plugin.void
setShouldAcceptLicense
(boolean shouldAcceptLicense) void
Set the vendor of the plugin.void
setVersion
(String version) Set the version of the plugin.boolean
toString()
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
null
if 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
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
- Thetrue
if 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.
-