public final class PluginManager
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected boolean |
isMainPluginInit |
static java.lang.String |
MAIN_PLUGIN_CHECK_PROP |
static java.lang.String |
MAIN_PLUGIN_PROP |
protected Plugin |
mainPlugin |
protected LangProperties |
mainPluginCoreProperties |
static java.lang.String |
PLUGIN_BACKUP |
static java.lang.String |
PLUGIN_BUILD |
static java.lang.String |
PLUGIN_EXTENSION |
static java.lang.String |
PLUGIN_PRIVATE_PATH |
static java.lang.String |
PLUGIN_PUBLIC_PATH |
static java.lang.String |
PLUGIN_XML |
protected java.util.Collection<Plugin> |
pluginCollection |
protected java.util.Map<java.lang.String,Plugin> |
pluginMap |
protected java.io.File |
pluginPrivateFolder |
static java.lang.String |
REVISION |
Modifier and Type | Method and Description |
---|---|
boolean |
deletePluginFiles(Plugin plugin)
Delete all deployed files of the given plugin.
|
boolean |
deployPlugin(Plugin plugin,
java.lang.String archiveName)
Deploy all files from a given archive to the current JCMS directory tree.
|
java.util.Set<java.lang.String> |
getAllPathSet(boolean sources)
Returns a Set of relative path to all plugins declared files
|
java.util.Set<java.lang.String> |
getAllPathSet(boolean sources,
boolean generated,
boolean signature,
boolean pkg,
boolean jar,
java.lang.String prefix,
boolean directory)
Returns a Set of relative path to all plugins declared files
|
void |
getCssFiles(java.util.Collection<java.io.File> cssPaths,
java.util.Collection<Plugin> collection,
java.io.FileFilter filter)
Fill given cssPaths collection with plugins css path used for portals
|
void |
getCssFiles(java.util.Collection<java.io.File> cssPaths,
java.io.FileFilter filter)
Fill given cssPaths collection with plugins css path used for portals
|
java.util.Set<java.lang.String> |
getJarsPath()
Returns a Set of relative Path to all webapp's jar
|
Plugin |
getMainPlugin()
Returns the main plugin (or null if there is no main plugin)
|
LangProperties |
getMainPluginCoreProperties()
Returns the core properties the main plugin override.
|
java.lang.String |
getMainPluginName()
Returns the name of the main plugin (or null if there is no main plugin)
|
Plugin |
getPlugin(java.lang.String pluginName)
Returns the plugin for the given name or null
if it does not exists.
|
org.xml.sax.EntityResolver |
getPluginEntityResolver() |
static PluginManager |
getPluginManager()
Returns a PluginManager.
|
java.util.Set<java.lang.String> |
getPluginPath(boolean priv,
java.lang.String pluginName,
java.util.Set<java.lang.String> pluginSet)
Returns a Set of relative Path to plugin public/private folder with
all files stored on disk even if they are not declared in xml
|
java.util.Collection<Plugin> |
getPlugins()
Returns a Collection of plugins.
|
org.jdom.input.SAXBuilder |
getSAXBuilder() |
java.util.Set<java.lang.String> |
getWorkflowsPath()
Returns a Set of relative Path to all webapp's workflow
|
void |
init(Channel channel)
Inits the PluginManager.
|
void |
initMainPlugin()
Initialize main plugin (reserved for JCMS internals).
|
void |
initPlugins()
Inits all plugins that have been correctly loaded.
|
void |
initPlugins(java.util.Collection<Plugin> collection)
Inits all plugins that have been correctly loaded.
|
void |
invalidateIncludeCache()
Invalidate cache of plugin's JSP to include
for given tags.
|
boolean |
isMainPluginDefined()
Returns true if the main plugin has been defined.
|
Plugin |
loadArchive(java.io.File file)
Load a given Plugin Archive if it has not been already loadded
|
void |
loadLanguageProperties(LangProperties properties,
java.util.List<java.lang.String> jcmsLangList)
Iterates on plugin's collection and load only languages properties for initialized plugins.
|
void |
loadMainPluginProperties(LangProperties properties,
java.util.List<java.lang.String> jcmsLangList)
Loads all the properties of the main plugin.
|
Plugin |
loadPluginXML(java.io.File file)
Load a given Plugin Archive if it has not been already loadded
|
void |
loadProperties(LangProperties properties,
java.util.List<java.lang.String> jcmsLangList)
Iterates on plugin's collection and load properties, including language properties
for initialized plugins.
|
void |
loadProperties(LangProperties properties,
java.util.List<java.lang.String> jcmsLangList,
java.util.Collection<Plugin> collection,
boolean onlyLangProp)
Iterates on plugin's collection and load properties
for initialized plugins
|
boolean |
performDeletePackage(java.lang.String packageName)
Delete the given plugin package
|
java.util.Map<Plugin,java.util.Set<SignatureDiffEntry>> |
performDiffPlugins()
Perform a Diff on each loaded plugins and store results in a Map
|
void |
performInclude(java.lang.String tag,
javax.servlet.jsp.PageContext pageContext)
Iterates on plugin's collection and retrieve Plugins' JSP to include
for the given anchor.
|
void |
register(Plugin plugin)
Register a loaded plugin in PluginManager
|
void |
registerAlarmListener()
Iterates on plugin's collection and register AlarmListener
for initialized plugins.
|
void |
registerAlarmListener(java.util.Collection<Plugin> collection)
Iterates on plugin's collection and register AlarmListener
for initialized plugins
|
void |
registerAlertChannel()
Iterates on plugin's collection and register AlertChannel
for initialized plugins.
|
void |
registerAlertChannel(java.util.Collection<Plugin> collection)
Iterates on plugin's collection and register AlertChannel
for initialized plugins
|
void |
registerAuthenticationHandler()
Iterates on plugin's collection and register AuthenticationHandlers
for initialized plugins.
|
void |
registerAuthenticationHandler(java.util.Collection<Plugin> collection)
Iterates on plugin's collection and register AuthenticationHandlers
for initialized plugins
|
void |
registerChannelListener()
Iterates on plugin's collection and register ChannelListener
for initialized plugins.
|
void |
registerChannelListener(java.util.Collection<Plugin> collection)
Iterates on plugin's collection and register ChannelListener
for initialized plugins
|
void |
registerCleanFilter()
Iterates on plugin's collection and register CleanFilter
for initialized plugins.
|
void |
registerCleanFilter(java.util.Collection<Plugin> collection)
Iterates on plugin's collection and register CleanFilter
for initialized plugins
|
void |
registerDataController()
Iterates on plugin's collection and register DataController
for initialized plugins.
|
void |
registerDataController(java.util.Collection<Plugin> collection)
Iterates on plugin's collection and register DataController
for initialized plugins
|
void |
registerDBListener()
Iterates on plugin's collection and register DBlistener
for initialized plugins.
|
void |
registerDBListener(java.util.Collection<Plugin> collection)
Iterates on plugin's collection and register DBlistener
for initialized plugins
|
void |
registerHibernateMapping()
Iterates on plugin's collection and register Hibernate mappings
for initialized plugins.
|
void |
registerHibernateMapping(java.util.Collection<Plugin> collection)
Iterates on plugin's collection and register Hibernate mappings
for initialized plugins
|
void |
registerOpenApiResources(java.util.Collection<Plugin> collection)
Iterates on plugin's collection and register RestResource
for initialized plugins
|
void |
registerPolicyFilter()
Iterates on plugin's collection and register PolicyFilter
for initialized plugins.
|
void |
registerPolicyFilter(java.util.Collection<Plugin> collection)
Iterates on plugin's collection and register PolicyFilter
for initialized plugins
|
void |
registerQueryFilter()
Iterates on plugin's collection and register QueryFilter
for initialized plugins.
|
void |
registerQueryFilter(java.util.Collection<Plugin> collection)
Iterates on plugin's collection and register QueryFilter
for initialized plugins
|
void |
registerRestResource()
Iterates on plugin's collection and register RestResource
for initialized plugins.
|
void |
registerStoreListener(boolean beforeStoreLoad)
Iterates on plugin's collection and register StoreListener
for initialized plugins.
|
void |
registerStoreListener(java.util.Collection<Plugin> collection,
boolean beforeStoreLoad)
Iterates on plugin's collection and register StoreListener
for initialized plugins
|
void |
registerTemplates()
Iterates on plugin's collection and register types' template
for initialized plugins.
|
void |
registerTemplates(java.util.Collection<Plugin> collection)
Iterates on plugin's collection and register types' template
for initialized plugins
|
void |
setupPlugins()
Setup all plugins that have been correctly initialized.
|
void |
setupPlugins(java.util.Collection<Plugin> collection)
Setup all plugins that have been correctly initialized.
|
void |
signPlugins()
Sign all plugins that have been correctly initialized.
|
void |
signPlugins(java.util.Collection<Plugin> collection)
Sign all plugins that have been correctly initialized.
|
public static final java.lang.String REVISION
public static final java.lang.String PLUGIN_PRIVATE_PATH
public static final java.lang.String PLUGIN_PUBLIC_PATH
public static final java.lang.String PLUGIN_XML
public static final java.lang.String PLUGIN_BUILD
public static final java.lang.String PLUGIN_EXTENSION
public static final java.lang.String PLUGIN_BACKUP
public static final java.lang.String MAIN_PLUGIN_PROP
public static final java.lang.String MAIN_PLUGIN_CHECK_PROP
protected java.util.Collection<Plugin> pluginCollection
protected java.util.Map<java.lang.String,Plugin> pluginMap
protected java.io.File pluginPrivateFolder
protected LangProperties mainPluginCoreProperties
protected Plugin mainPlugin
protected boolean isMainPluginInit
public static PluginManager getPluginManager()
public void init(Channel channel)
channel
- the Channel singleton instancepublic void initPlugins()
public void initPlugins(java.util.Collection<Plugin> collection)
collection
- a collection of Pluginpublic void setupPlugins()
public void setupPlugins(java.util.Collection<Plugin> collection)
collection
- a collection of Pluginpublic java.lang.String getMainPluginName()
public Plugin getMainPlugin()
public boolean isMainPluginDefined()
public void initMainPlugin() throws java.lang.IllegalStateException
java.lang.IllegalStateException
- if the main plugin is not correctly startedpublic void loadMainPluginProperties(LangProperties properties, java.util.List<java.lang.String> jcmsLangList)
properties
- the properties where to load the main plugin propertiesjcmsLangList
- the JCMS language listpublic LangProperties getMainPluginCoreProperties()
public void signPlugins()
public void signPlugins(java.util.Collection<Plugin> collection)
collection
- a collection of Pluginpublic java.util.Map<Plugin,java.util.Set<SignatureDiffEntry>> performDiffPlugins()
public java.util.Set<java.lang.String> getAllPathSet(boolean sources)
sources
- also include .java sourcespublic java.util.Set<java.lang.String> getAllPathSet(boolean sources, boolean generated, boolean signature, boolean pkg, boolean jar, java.lang.String prefix, boolean directory)
sources
- also include .java sourcesgenerated
- include generated contentsignature
- add signature filepkg
- add package filejar
- add jar fileprefix
- add prefix to pathdirectory
- should resolve directory pathpublic org.xml.sax.EntityResolver getPluginEntityResolver()
public org.jdom.input.SAXBuilder getSAXBuilder()
public void register(Plugin plugin)
plugin
- the loaded pluginpublic Plugin loadPluginXML(java.io.File file)
file
- the folder that contains PLUGIN_XMLpublic Plugin loadArchive(java.io.File file)
file
- the archive that ends with PLUGIN_EXTENSIONpublic boolean deployPlugin(Plugin plugin, java.lang.String archiveName)
plugin
- the loaded PluginarchiveName
- the archive to deploypublic boolean deletePluginFiles(Plugin plugin)
plugin
- the loaded Pluginpublic boolean performDeletePackage(java.lang.String packageName)
packageName
- the name of the package to deletepublic void registerTemplates()
public void registerTemplates(java.util.Collection<Plugin> collection)
collection
- a collection of Pluginpublic void registerStoreListener(boolean beforeStoreLoad)
beforeStoreLoad
- boolean true before loading storepublic void registerStoreListener(java.util.Collection<Plugin> collection, boolean beforeStoreLoad)
collection
- a collection of PluginbeforeStoreLoad
- boolean true before loading storepublic void registerDBListener()
public void registerDBListener(java.util.Collection<Plugin> collection)
collection
- a collection of Pluginpublic void registerDataController()
public void registerDataController(java.util.Collection<Plugin> collection)
collection
- a collection of Pluginpublic void registerAlarmListener()
public void registerAlarmListener(java.util.Collection<Plugin> collection)
collection
- a collection of Pluginpublic void registerAlertChannel()
public void registerAlertChannel(java.util.Collection<Plugin> collection)
collection
- a collection of Pluginpublic void registerRestResource()
public void registerOpenApiResources(java.util.Collection<Plugin> collection)
collection
- a collection of Pluginpublic void registerChannelListener()
public void registerChannelListener(java.util.Collection<Plugin> collection)
collection
- a collection of Pluginpublic void registerQueryFilter()
public void registerQueryFilter(java.util.Collection<Plugin> collection)
collection
- a collection of Pluginpublic void registerCleanFilter()
public void registerCleanFilter(java.util.Collection<Plugin> collection)
collection
- a collection of Pluginpublic void registerPolicyFilter()
public void registerPolicyFilter(java.util.Collection<Plugin> collection)
collection
- a collection of Pluginpublic void registerAuthenticationHandler()
public void registerAuthenticationHandler(java.util.Collection<Plugin> collection)
collection
- a collection of Pluginpublic void registerHibernateMapping()
public void registerHibernateMapping(java.util.Collection<Plugin> collection)
collection
- a collection of Pluginpublic void getCssFiles(java.util.Collection<java.io.File> cssPaths, java.io.FileFilter filter)
cssPaths
- Collection of css pathfilter
- FileFilter for csspublic void getCssFiles(java.util.Collection<java.io.File> cssPaths, java.util.Collection<Plugin> collection, java.io.FileFilter filter)
cssPaths
- Collection of css pathcollection
- Collection of pluginsfilter
- FileFilter for csspublic void invalidateIncludeCache()
public void performInclude(java.lang.String tag, javax.servlet.jsp.PageContext pageContext)
tag
- the scope of includepageContext
- the current Jsp's pageContext, required !public void loadProperties(LangProperties properties, java.util.List<java.lang.String> jcmsLangList)
properties
- the channel propertiesjcmsLangList
- the lang list of JCMSpublic void loadLanguageProperties(LangProperties properties, java.util.List<java.lang.String> jcmsLangList)
properties
- the channel propertiesjcmsLangList
- the lang list of JCMSpublic void loadProperties(LangProperties properties, java.util.List<java.lang.String> jcmsLangList, java.util.Collection<Plugin> collection, boolean onlyLangProp)
properties
- the channel propertiesjcmsLangList
- the lang list of JCMScollection
- a collection of PluginonlyLangProp
- only the language propertiespublic java.util.Set<java.lang.String> getWorkflowsPath()
public java.util.Set<java.lang.String> getJarsPath()
public java.util.Set<java.lang.String> getPluginPath(boolean priv, java.lang.String pluginName, java.util.Set<java.lang.String> pluginSet)
priv
- boolean true if private or false if publicpluginName
- the name og the pluginpluginSet
- the set of known path to addpublic java.util.Collection<Plugin> getPlugins()
public Plugin getPlugin(java.lang.String pluginName)
pluginName
- the name of the pluginCopyright © 2001-2010 Jalios SA. All Rights Reserved.