Class Plugin
java.lang.Object
fr.paris.lutece.portal.service.plugin.Plugin
- All Implemented Interfaces:
Serializable,Comparable<Plugin>
- Direct Known Subclasses:
PluginDefaultImplementation
This class is the general plugin element
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintImplementation of the Comparable interface.booleanReturn the list of stylesheets that should be used in the Back OfficeReturn the list of Javascript Files that should be used in the Back OfficeReturns the list of XPage Applications of the pluginReturns a Connection Service associated to the pluginReturns the Copyright of the pluginReturns all CSS Style Sheets of the plugin with no mode associatedgetCssStyleSheets(int mode) Returns all CSS Style Sheets of the plugin associated with a modeGets the current database connection pool associated to the pluginReturns the description of the pluginReturns the Documentation's URL of the pluginGets the freemarker auto-imports.Gets the freemarker auto-includes.Returns the Icon's URL of the pluginReturns the list of insert services of the pluginReturns all Javascript File of the plugin with no mode associatedgetJavascriptFiles(int mode) Returns all Javascript File of the plugin associated with a modeReturns the max core version compatibility for the pluginReturns the min core version compatibility for the plugingetName()Returns the name of the pluginGets plugin's parametersgetParamValue(String strParamName) Gets a parameter value for a given parameter nameReturns the list of portlet type of the pluginReturns the Provider of the pluginReturns the Provider's URL of the pluginReturns the list of portlet type of the pluginReturns the main Class of the pluginintgetType()Returns the type of the pluginReturns the version of the plugingetXPageTheme(jakarta.servlet.http.HttpServletRequest request) Returns the theme the plugin use for rendering a XpagebooleanReturns weither or not plugin has daemon.inthashCode()booleanReturns weither or not plugin has portlet.abstract voidinit()Initializes the plugin at the first loadvoidinitConnectionService(String strPoolName) Initializes the plugin's ConnectionServicevoidinstall()Installs a PluginbooleanGive the scope of css stylesheetsbooleanGive the scope of css stylesheetsbooleanReturns if the plugin needs a database connection poolbooleanReturns the installation status of the pluginbooleanGive the scope of javascriptsbooleanGive the scope of javascriptsvoidsetConnectionService(PluginConnectionService connectionService) Sets the connection servicevoidsetCopyright(String strCopyright) Sets the copyrightvoidsetDescription(String strDescription) Sets the description of the pluginvoidsetDocumentationUrl(String strDocumentationUrl) Sets the url of the plugin's DocumentationvoidsetIconUrl(String strIconUrl) Sets the url of the plugin's iconvoidsetIsDbPoolRequired(boolean bDbPoolRequired) Sets the boolean which shows if a pool is requiredvoidsetIsInstalled(boolean bIsInstalled) Sets the boolean which shows if the plugin is installedvoidsetMaxCoreVersion(String strMaxCoreVersion) Sets the the max core version compatibility for the pluginvoidsetMinCoreVersion(String strMinCoreVersion) Sets the the min core version compatibility for the pluginvoidSets the name of the pluginvoidsetPoolName(String strPoolName) Updates a database connection pool associated to the plugin and stores itvoidsetProvider(String strProvider) Sets the provider namevoidsetProviderUrl(String strProviderUrl) Sets the provider urlvoidsetServiceClass(String strPluginClass) Sets the class service of pluginvoidsetStatus(boolean bStatus) Modify the plugin statusvoidsetVersion(String strVersion) Sets the version plugin nametoString()Useful for debuggingvoidUninstalls a PluginvoidupdatePoolName(String strPoolName) Updates a database connection pool associated to the plugin and stores it
-
Field Details
-
PLUGIN_TYPE_FEATURE
public static final int PLUGIN_TYPE_FEATURE- See Also:
-
PLUGIN_TYPE_PORTLET
public static final int PLUGIN_TYPE_PORTLET- See Also:
-
PLUGIN_TYPE_APPLICATION
public static final int PLUGIN_TYPE_APPLICATION- See Also:
-
PLUGIN_TYPE_INSERTSERVICE
public static final int PLUGIN_TYPE_INSERTSERVICE- See Also:
-
PLUGIN_TYPE_CONTENTSERVICE
public static final int PLUGIN_TYPE_CONTENTSERVICE- See Also:
-
PLUGIN_TYPE_DAEMON
public static final int PLUGIN_TYPE_DAEMON- See Also:
-
-
Constructor Details
-
Plugin
public Plugin()
-
-
Method Details
-
init
public abstract void init()Initializes the plugin at the first load -
hasPortlets
public boolean hasPortlets()Returns weither or not plugin has portlet.- Returns:
- true if the plugin contains one or more portlet
-
hasDaemons
public boolean hasDaemons()Returns weither or not plugin has daemon.- Returns:
- true if the plugin contains one or more daemon
-
setStatus
public void setStatus(boolean bStatus) Modify the plugin status- Parameters:
bStatus- true installed, false uninstalled
-
updatePoolName
Updates a database connection pool associated to the plugin and stores it- Parameters:
strPoolName- the name of the pool
-
setPoolName
Updates a database connection pool associated to the plugin and stores it- Parameters:
strPoolName- The name of the pool
-
getDbPoolName
Gets the current database connection pool associated to the plugin- Returns:
- The name of the database for the pool checked
-
install
public void install()Installs a Plugin -
uninstall
public void uninstall()Uninstalls a Plugin -
getType
public int getType()Returns the type of the plugin- Returns:
- the plugin type as a int
-
getInsertServices
Returns the list of insert services of the plugin- Returns:
- the plugin list of ContentServiceEntry
-
getApplications
Returns the list of XPage Applications of the plugin- Returns:
- the plugin list of XPageApplicationEntry
-
getPortletTypes
Returns the list of portlet type of the plugin- Returns:
- the plugin list of portlet type
-
getRights
Returns the list of portlet type of the plugin- Returns:
- the plugin list of rights
-
getName
Returns the name of the plugin- Returns:
- the plugin name as a String
-
setName
Sets the name of the plugin- Parameters:
strName- The plugin name
-
getVersion
Returns the version of the plugin- Returns:
- the plugin version as a String
-
setVersion
Sets the version plugin name- Parameters:
strVersion- The version
-
getDescription
Returns the description of the plugin- Returns:
- the plugin description as a String
-
setDescription
Sets the description of the plugin- Parameters:
strDescription- The description
-
getProvider
Returns the Provider of the plugin- Returns:
- the plugin Provider as a String
-
setProvider
Sets the provider name- Parameters:
strProvider- The provider name
-
getProviderUrl
Returns the Provider's URL of the plugin- Returns:
- the plugin Provider's URL as a String
-
setProviderUrl
Sets the provider url- Parameters:
strProviderUrl- the name of the provider
-
getIconUrl
Returns the Icon's URL of the plugin- Returns:
- the plugin Icon's URL as a String
-
setIconUrl
Sets the url of the plugin's icon- Parameters:
strIconUrl- The url of icon
-
getDocumentationUrl
Returns the Documentation's URL of the plugin- Returns:
- the plugin Documentation's URL as a String
-
setDocumentationUrl
Sets the url of the plugin's Documentation- Parameters:
strDocumentationUrl- The documentation Url
-
getCopyright
Returns the Copyright of the plugin- Returns:
- the plugin Copyright as a String
-
setCopyright
Sets the copyright- Parameters:
strCopyright- The copyright
-
getServiceClass
Returns the main Class of the plugin- Returns:
- the Class as a String
-
setServiceClass
Sets the class service of plugin- Parameters:
strPluginClass- The plugin class
-
isInstalled
public boolean isInstalled()Returns the installation status of the plugin- Returns:
- the installation status as an int
-
setIsInstalled
public void setIsInstalled(boolean bIsInstalled) Sets the boolean which shows if the plugin is installed- Parameters:
bIsInstalled- The installed boolean
-
getMinCoreVersion
Returns the min core version compatibility for the plugin- Returns:
- the min core version as a String
-
setMinCoreVersion
Sets the the min core version compatibility for the plugin- Parameters:
strMinCoreVersion- The min core version
-
getMaxCoreVersion
Returns the max core version compatibility for the plugin- Returns:
- the max core version as a String
-
setMaxCoreVersion
Sets the the max core version compatibility for the plugin- Parameters:
strMaxCoreVersion- The max core version
-
isDbPoolRequired
public boolean isDbPoolRequired()Returns if the plugin needs a database connection pool- Returns:
- true if the plugin needs a database connection pool, otherwise false
-
setIsDbPoolRequired
public void setIsDbPoolRequired(boolean bDbPoolRequired) Sets the boolean which shows if a pool is required- Parameters:
bDbPoolRequired- The dbpool boolean
-
getConnectionService
Returns a Connection Service associated to the plugin- Returns:
- _connectionService The connection service
-
setConnectionService
Sets the connection service- Parameters:
connectionService- The connection Service object
-
initConnectionService
Initializes the plugin's ConnectionService- Parameters:
strPoolName- The pool name
-
getParams
Gets plugin's parameters- Returns:
- _mapParams The hastable of parameters
-
getParamValue
Gets a parameter value for a given parameter name- Parameters:
strParamName- The name of the parameter- Returns:
- null
-
compareTo
Implementation of the Comparable interface.- Specified by:
compareToin interfaceComparable<Plugin>- Parameters:
plugin- A plugin Object- Returns:
- 1, 0 ou -1 according the plugin name
-
equals
-
getCssStyleSheets
Returns all CSS Style Sheets of the plugin with no mode associated- Returns:
- The list of CSS Style Sheets with no mode associated
-
getCssStyleSheets
Returns all CSS Style Sheets of the plugin associated with a mode- Parameters:
mode- the mode- Returns:
- The list of CSS Style Sheets associated with the mode
- Since:
- 5.1.0
-
getXPageTheme
Returns the theme the plugin use for rendering a Xpage- Parameters:
request- The HttpServletRequest- Returns:
- The theme
-
getJavascriptFiles
Returns all Javascript File of the plugin with no mode associated- Returns:
- The list of Javascript File with no mode associated
-
getJavascriptFiles
Returns all Javascript File of the plugin associated with a mode- Parameters:
mode- the mode- Returns:
- The list of Javascript File with associated with the mode
- Since:
- 5.1.0
-
isCssStylesheetsScopePortal
public boolean isCssStylesheetsScopePortal()Give the scope of css stylesheets- Returns:
- true if scope is portal otherwise false
-
isCssStylesheetsScopeXPage
public boolean isCssStylesheetsScopeXPage()Give the scope of css stylesheets- Returns:
- true if scope is portal otherwise false
-
isJavascriptFilesScopePortal
public boolean isJavascriptFilesScopePortal()Give the scope of javascripts- Returns:
- true if scope is portal otherwise false
-
isJavascriptFilesScopeXPage
public boolean isJavascriptFilesScopeXPage()Give the scope of javascripts- Returns:
- true if scope is portal otherwise false
-
getAdminCssStyleSheets
Return the list of stylesheets that should be used in the Back Office- Returns:
- the list of stylesheets that should be used in the Back Office
- Since:
- 5.1
-
getAdminJavascriptFiles
Return the list of Javascript Files that should be used in the Back Office- Returns:
- the list of Javascript Files that should be used in the Back Office
- Since:
- 5.1
-
getFreeMarkerAutoIncludes
Gets the freemarker auto-includes.- Returns:
- the freemarker auto-includes
-
getFreeMarkerAutoImports
Gets the freemarker auto-imports.- Returns:
- the freemarker auto-imports
-
toString
Useful for debugging -
hashCode
public int hashCode()
-