Class PluginServiceImpl
java.lang.Object
org.craftercms.engine.plugin.impl.PluginServiceImpl
- All Implemented Interfaces:
PluginService
Default implementation for
PluginService- Since:
- 4.0.0
- Author:
- joseross
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPluginServiceImpl(org.craftercms.core.service.ContentStoreService contentStoreService, org.craftercms.commons.config.EncryptionAwareConfigurationReader configurationReader, String configurationPathPattern) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPluginVariables(String url, BiConsumer<String, Object> setter) Adds variables related to plugins if the given URL belongs to a pluginprotected org.craftercms.core.service.Contextorg.apache.commons.configuration2.HierarchicalConfiguration<?> getPluginConfig(String pluginId) Loads the configuration for a given pluginprotected StringgetPluginConfigPath(String pluginPath) protected StringgetPluginId(String pluginPath) protected org.apache.commons.configuration2.HierarchicalConfiguration<?> loadPluginConfiguration(org.craftercms.core.service.Context context, String pluginPath) protected booleanpluginConfigExists(String path)
-
Field Details
-
PLUGIN_ID_KEY
- See Also:
-
PLUGIN_CONFIG_KEY
- See Also:
-
PLUGIN_ID_PLACEHOLDER
- See Also:
-
pattern
-
contentStoreService
protected org.craftercms.core.service.ContentStoreService contentStoreService -
configurationReader
protected org.craftercms.commons.config.EncryptionAwareConfigurationReader configurationReader -
configurationPathPattern
-
-
Constructor Details
-
PluginServiceImpl
@ConstructorProperties({"contentStoreService","configurationReader","configurationPathPattern"}) public PluginServiceImpl(org.craftercms.core.service.ContentStoreService contentStoreService, org.craftercms.commons.config.EncryptionAwareConfigurationReader configurationReader, String configurationPathPattern)
-
-
Method Details
-
getPluginConfig
public org.apache.commons.configuration2.HierarchicalConfiguration<?> getPluginConfig(String pluginId) Description copied from interface:PluginServiceLoads the configuration for a given plugin- Specified by:
getPluginConfigin interfacePluginService- Parameters:
pluginId- the id of the plugin- Returns:
- the configuration object
-
loadPluginConfiguration
protected org.apache.commons.configuration2.HierarchicalConfiguration<?> loadPluginConfiguration(org.craftercms.core.service.Context context, String pluginPath) -
addPluginVariables
Description copied from interface:PluginServiceAdds variables related to plugins if the given URL belongs to a plugin- Specified by:
addPluginVariablesin interfacePluginService- Parameters:
url- the URL to checksetter- the setter for the variables
-
pluginConfigExists
-
getPluginId
-
getPluginConfigPath
-
getCurrentContext
protected org.craftercms.core.service.Context getCurrentContext()
-