Package ru.bgcrm.plugin
Class Plugin
java.lang.Object
ru.bgcrm.plugin.Plugin
- Direct Known Subclasses:
Plugin
,Plugin
,Plugin
,Plugin
,Plugin
,Plugin
,Plugin
,Plugin
,Plugin
,Plugin
,Plugin
,Plugin
,Plugin
,Plugin
,Plugin
,Plugin
,Plugin
,Plugin
,Plugin
,Plugin
,Plugin
,Plugin
,Plugin
,Plugin
,Plugin
,Plugin
,Plugin
,Plugin
,Plugin
,Plugin
Parent class for all the plugins.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionPackages for searching annotated actions.DB cleaner.Dependencies plugin IDs.Plugin's XML document from 'plugin.xml'.getEndpoints
(String key) Endpoints for connecting the plugin in JSP templates.getId()
Plugin's ID.Class
<? extends MessageTypeEmail> getMessageTypeClass
(String name) Message type class, supported by the plugin.Plugin's entities.getResourcePath
(String name) Gets path of a file, placed int the plugin's package.Used DB tables.getTitle()
Human readable plugin title.final String
Prefix 'Plugin ' plusgetTitle()
.XML document from the plugin's package.void
init
(Connection con) Initialization during server's start.boolean
If the plugin enabled.boolean
isSystem()
System plugins are always loaded, enabled and not show in the list.Default implementation, loads endpoints from the XMLdocument
.
-
Field Details
-
PATH_JS
- See Also:
-
PATH_LIB
- See Also:
-
PATH_CSS
- See Also:
-
PATH_JSP_ADMIN_PLUGIN
- See Also:
-
PATH_JSP_USER_PLUGIN
- See Also:
-
PATH_JSP_OPEN_PLUGIN
- See Also:
-
-
Constructor Details
-
Plugin
-
-
Method Details
-
getId
Plugin's ID.- Returns:
-
getTitle
Human readable plugin title.- Returns:
-
getTitleWithPrefix
Prefix 'Plugin ' plusgetTitle()
.- Returns:
-
isSystem
public boolean isSystem()System plugins are always loaded, enabled and not show in the list.- Returns:
-
getDocument
Plugin's XML document from 'plugin.xml'.- Returns:
- parsed document object from or empty document if there is no such file.
-
getXml
XML document from the plugin's package.- Parameters:
name
-defaultValue
-- Returns:
-
loadEndpoints
Default implementation, loads endpoints from the XMLdocument
. Deprecated way, for backward compatibility only.- Returns:
-
getResourcePath
Gets path of a file, placed int the plugin's package.- Parameters:
name
- name of the file.- Returns:
-
getActionPackages
Packages for searching annotated actions.- Returns:
-
getDependencies
Dependencies plugin IDs.- Returns:
-
getEndpoints
Endpoints for connecting the plugin in JSP templates.- Returns:
-
getMessageTypeClass
Message type class, supported by the plugin.- Parameters:
name
- name of the type, must start from the plugin ID.- Returns:
-
init
Initialization during server's start.- Parameters:
con
-- Throws:
Exception
-
isEnabled
If the plugin enabled.- Parameters:
config
- configuration, where the plugin can be explicitly enabled.defaultValue
- default value if not explicitly enabled: '1' - enabled, 'lic' - if presented in license.- Returns:
- true or false.
-
getLocalization
- Returns:
- the plugin's localization from l10n.xml if exists, or
null
-
getLocalizer
- Returns:
- the plugin's only localization for
Localization.getLang()
language.
-
getTables
Used DB tables.- Returns:
-
getObjectTypes
Plugin's entities.- Returns:
-
getCleaner
DB cleaner.- Returns:
-