|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jalios.jcms.plugin.PluginManager
public final class PluginManager
Singleton used to manage plugin's life cycle. It also contains utility methods and constants for plugins. 1. Initialization of PluginManager 2. Loading Plugins 3. Initialize dependencies 4. Initializing deployed Plugins 5. Setup deployed plugins
Field Summary | |
---|---|
static String |
PLUGIN_BACKUP
|
static String |
PLUGIN_BUILD
|
static String |
PLUGIN_EXTENSION
|
static String |
PLUGIN_PRIVATE_PATH
|
static String |
PLUGIN_PUBLIC_PATH
|
static String |
PLUGIN_XML
|
protected Collection<Plugin> |
pluginCollection
|
protected Map<String,Plugin> |
pluginMap
|
protected File |
pluginPrivateFolder
|
static String |
REVISION
|
Method Summary | |
---|---|
boolean |
deletePluginFiles(Plugin plugin)
Delete all deployed files of the given plugin. |
boolean |
deployPlugin(Plugin plugin,
String archiveName)
Deploy all files from a given archive to the current JCMS directory tree. |
Set<String> |
getAllPathSet(boolean sources)
Returns a Set of relative path to all plugins declared files |
Set<String> |
getAllPathSet(boolean sources,
boolean generated,
boolean signature,
boolean pkg,
boolean jar,
String prefix,
boolean directory)
Returns a Set of relative path to all plugins declared files |
void |
getCssFiles(Collection<File> cssPaths,
Collection<Plugin> collection,
FileFilter filter)
Fill given cssPaths collection with plugins css path used for portals |
void |
getCssFiles(Collection<File> cssPaths,
FileFilter filter)
Fill given cssPaths collection with plugins css path used for portals |
Set<String> |
getJarsPath()
Returns a Set of relative Path to all webapp's jar |
Plugin |
getPlugin(String pluginName)
Returns the plugin for the given name or null if it does not exists. |
EntityResolver |
getPluginEntityResolver()
|
static PluginManager |
getPluginManager()
Returns a PluginManager. |
Set<String> |
getPluginPath(boolean priv,
String pluginName,
Set<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 |
Collection<Plugin> |
getPlugins()
Returns a Collection of plugins. |
org.jdom.input.SAXBuilder |
getSAXBuilder()
|
Set<String> |
getWorkflowsPath()
Returns a Set of relative Path to all webapp's workflow |
void |
init(Channel channel)
Inits the PluginManager. |
void |
initPlugins()
Inits all plugins that have been correctly loaded. |
void |
initPlugins(Collection<Plugin> collection)
Inits all plugins that have been correctly loaded. |
void |
invalidateIncludeCache()
Invalidate cache of plugin's JSP to include for given tags. |
Plugin |
loadArchive(File file)
Load a given Plugin Archive if it has not been already loadded |
void |
loadLanguageProperties(LangProperties properties,
List<String> jcmsLangList)
Iterates on plugin's collection and load only languages properties for initialized plugins. |
Plugin |
loadPluginXML(File file)
Load a given Plugin Archive if it has not been already loadded |
void |
loadProperties(LangProperties properties,
List<String> jcmsLangList)
Iterates on plugin's collection and load properties, including language properties for initialized plugins. |
void |
loadProperties(LangProperties properties,
List<String> jcmsLangList,
Collection<Plugin> collection,
boolean onlyLangProp)
Iterates on plugin's collection and load properties for initialized plugins |
boolean |
performDeletePackage(String packageName)
Delete the given plugin package |
Map<Plugin,Set<SignatureDiffEntry>> |
performDiffPlugins()
Perform a Diff on each loaded plugins and store results in a Map |
void |
performInclude(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(Collection<Plugin> collection)
Iterates on plugin's collection and register AlarmListener for initialized plugins |
void |
registerAuthenticationHandler()
Iterates on plugin's collection and register AuthenticationHandlers for initialized plugins. |
void |
registerAuthenticationHandler(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(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(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(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(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(Collection<Plugin> collection)
Iterates on plugin's collection and register Hibernate mappings for initialized plugins |
void |
registerOpenApiResources(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(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(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(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(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(Collection<Plugin> collection)
Setup all plugins that have been correctly initialized. |
void |
signPlugins()
Sign all plugins that have been correctly initialized. |
void |
signPlugins(Collection<Plugin> collection)
Sign all plugins that have been correctly initialized. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String REVISION
public static final String PLUGIN_PRIVATE_PATH
public static final String PLUGIN_PUBLIC_PATH
public static final String PLUGIN_XML
public static final String PLUGIN_BUILD
public static final String PLUGIN_EXTENSION
public static final String PLUGIN_BACKUP
protected Collection<Plugin> pluginCollection
protected Map<String,Plugin> pluginMap
protected File pluginPrivateFolder
Method Detail |
---|
public static PluginManager getPluginManager()
public void init(Channel channel)
channel
- the Channel singleton instancepublic void initPlugins()
public void initPlugins(Collection<Plugin> collection)
collection
- a collection of Pluginpublic void setupPlugins()
public void setupPlugins(Collection<Plugin> collection)
collection
- a collection of Pluginpublic void signPlugins()
public void signPlugins(Collection<Plugin> collection)
collection
- a collection of Pluginpublic Map<Plugin,Set<SignatureDiffEntry>> performDiffPlugins()
public Set<String> getAllPathSet(boolean sources)
sources
- also include .java sources
public Set<String> getAllPathSet(boolean sources, boolean generated, boolean signature, boolean pkg, boolean jar, 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 path
public EntityResolver getPluginEntityResolver()
public org.jdom.input.SAXBuilder getSAXBuilder()
public void register(Plugin plugin)
plugin
- the loaded pluginpublic Plugin loadPluginXML(File file)
file
- the folder that contains PLUGIN_XML
public Plugin loadArchive(File file)
file
- the archive that ends with PLUGIN_EXTENSION
public boolean deployPlugin(Plugin plugin, String archiveName)
plugin
- the loaded PluginarchiveName
- the archive to deploy
public boolean deletePluginFiles(Plugin plugin)
plugin
- the loaded Plugin
public boolean performDeletePackage(String packageName)
packageName
- the name of the package to delete
public void registerTemplates()
public void registerTemplates(Collection<Plugin> collection)
collection
- a collection of Pluginpublic void registerStoreListener(boolean beforeStoreLoad)
beforeStoreLoad
- boolean true before loading storepublic void registerStoreListener(Collection<Plugin> collection, boolean beforeStoreLoad)
collection
- a collection of PluginbeforeStoreLoad
- boolean true before loading storepublic void registerDBListener()
public void registerDBListener(Collection<Plugin> collection)
collection
- a collection of Pluginpublic void registerDataController()
public void registerDataController(Collection<Plugin> collection)
collection
- a collection of Pluginpublic void registerAlarmListener()
public void registerAlarmListener(Collection<Plugin> collection)
collection
- a collection of Pluginpublic void registerRestResource()
public void registerOpenApiResources(Collection<Plugin> collection)
collection
- a collection of Pluginpublic void registerChannelListener()
public void registerChannelListener(Collection<Plugin> collection)
collection
- a collection of Pluginpublic void registerQueryFilter()
public void registerQueryFilter(Collection<Plugin> collection)
collection
- a collection of Pluginpublic void registerCleanFilter()
public void registerCleanFilter(Collection<Plugin> collection)
collection
- a collection of Pluginpublic void registerPolicyFilter()
public void registerPolicyFilter(Collection<Plugin> collection)
collection
- a collection of Pluginpublic void registerAuthenticationHandler()
public void registerAuthenticationHandler(Collection<Plugin> collection)
collection
- a collection of Pluginpublic void registerHibernateMapping()
public void registerHibernateMapping(Collection<Plugin> collection)
collection
- a collection of Pluginpublic void getCssFiles(Collection<File> cssPaths, FileFilter filter)
cssPaths
- Collection of css pathfilter
- FileFilter for csspublic void getCssFiles(Collection<File> cssPaths, Collection<Plugin> collection, FileFilter filter)
cssPaths
- Collection of css pathcollection
- Collection of pluginsfilter
- FileFilter for csspublic void invalidateIncludeCache()
public void performInclude(String tag, javax.servlet.jsp.PageContext pageContext)
tag
- the scope of includepageContext
- the current Jsp's pageContext, required !public void loadProperties(LangProperties properties, List<String> jcmsLangList)
properties
- the channel propertiesjcmsLangList
- the lang list of JCMSpublic void loadLanguageProperties(LangProperties properties, List<String> jcmsLangList)
properties
- the channel propertiesjcmsLangList
- the lang list of JCMSpublic void loadProperties(LangProperties properties, List<String> jcmsLangList, Collection<Plugin> collection, boolean onlyLangProp)
properties
- the channel propertiesjcmsLangList
- the lang list of JCMScollection
- a collection of Pluginpublic Set<String> getWorkflowsPath()
public Set<String> getJarsPath()
public Set<String> getPluginPath(boolean priv, String pluginName, Set<String> pluginSet)
priv
- boolean true if private or false if publicpluginName
- the name og the pluginpluginSet
- the set of known path to add
public Collection<Plugin> getPlugins()
public Plugin getPlugin(String pluginName)
pluginName
- the name of the plugin
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |