ColdBox Platform Version 2.6.4

coldbox.system.services
Class PluginService

WEB-INF.cftags.component
        extended by coldbox.system.services.BaseService
            extended by coldbox.system.services.PluginService

public class PluginService
extends BaseService

The coldbox plugin service


Constructor Summary
init(any controller)
          Constructor
 
Method Summary
 void clearDictionary()
          Clear the cache dictionary
 any get(any plugin, boolean custom, [any module=''], [boolean init='true'])
          Get a new/cached plugin instance
 struct getCacheDictionary()
          Get the plugin cache dictionary
 string getCorePluginsPath()
          Get the base invocation path where core plugins exist
 string getCustomPluginsExternalPath()
          Get the base invocation path where external custom convention plugins exist
 string getCustomPluginsPath()
          Get the base invocation path where custom convention plugins exist
 string getCustomPluginsPhysicalPath()
          Get the physical path where custom convention plugins exist
 string getExtensionsPath()
          Get the base invocation path where extension plugins exist
 string getExtensionsPhysicalPath()
          Get the physical path where extension plugins exist
private struct getNewMDEntry()
          Get a new metadata entry structure for plugins
private string getPluginCacheKey(any plugin, boolean custom, [any module=''])
          Get the plugin Cache Key
private string locatePluginPath(any plugin, boolean custom, [any module=''])
          Locate a full plugin instantiation path from the requested plugin name
 any new(any plugin, boolean custom, [any module=''], [boolean init='true'])
          Create a New Plugin Instance whether it is core or custom
 void onConfigurationLoad()
private void setCacheDictionary(BaseDictionary cacheDictionary)
          Set the plugin cache dictionary
private void setCorePluginsPath(string corePluginsPath)
          Set CorePluginsPath
private void setCustomPluginsExternalPath(string customPluginsExternalPath)
          Set customPluginsExternalPath
private void setCustomPluginsPath(string customPluginsPath)
          Set CorePluginsPath
private void setCustomPluginsPhysicalPath(string customPluginsPhysicalPath)
          Set customPluginsPhysicalPath
private void setExtensionsPath(string extensionsPath)
          Set ExtensionsPath
private void setExtensionsPhysicalPath(string extensionsPhysicalPath)
          Set ExtensionsPhysicalPath
private struct storeMetadata(string pluginKey, any pluginMD)
          Store a plugin's metadata introspection
 
Methods inherited from class coldbox.system.services.BaseService
convertToColdBox, debug, getColdboxOCM, getLogger, getUtil, getcontroller, isFamilyType, onAspectsLoad, onShutdown, setcontroller
 
Methods inherited from class WEB-INF.cftags.component
 

Constructor Detail

init

public init(any controller)
Constructor

Parameters:
controller
Method Detail

clearDictionary

public void clearDictionary()
Clear the cache dictionary


get

public any get(any plugin, boolean custom, [any module=''], [boolean init='true'])
Get a new/cached plugin instance

Parameters:
plugin - The name (classpath) of the plugin to create. We will search for it.
custom - Custom plugin or coldbox plugin
module - The module to retrieve the plugin from
init - Auto init() the plugin upon construction

getCacheDictionary

public struct getCacheDictionary()
Get the plugin cache dictionary


getCorePluginsPath

public string getCorePluginsPath()
Get the base invocation path where core plugins exist.


getCustomPluginsExternalPath

public string getCustomPluginsExternalPath()
Get the base invocation path where external custom convention plugins exist.


getCustomPluginsPath

public string getCustomPluginsPath()
Get the base invocation path where custom convention plugins exist.


getCustomPluginsPhysicalPath

public string getCustomPluginsPhysicalPath()
Get the physical path where custom convention plugins exist.


getExtensionsPath

public string getExtensionsPath()
Get the base invocation path where extension plugins exist.


getExtensionsPhysicalPath

public string getExtensionsPhysicalPath()
Get the physical path where extension plugins exist.


getNewMDEntry

private struct getNewMDEntry()
Get a new metadata entry structure for plugins


getPluginCacheKey

private string getPluginCacheKey(any plugin, boolean custom, [any module=''])
Get the plugin Cache Key

Parameters:
plugin - The name (classpath) of the plugin to create
custom - Custom plugin or coldbox plugin
module - The module to retrieve the plugin from

locatePluginPath

private string locatePluginPath(any plugin, boolean custom, [any module=''])
Locate a full plugin instantiation path from the requested plugin name

Parameters:
plugin - The plugin to validate the path on.
custom - Whether its a custom plugin or not.
module - The module to retrieve the plugin from

new

public any new(any plugin, boolean custom, [any module=''], [boolean init='true'])
Create a New Plugin Instance whether it is core or custom

Parameters:
plugin - The name (classpath) of the plugin to create
custom - Custom plugin or coldbox plugin
module - The module to retrieve the plugin from
init - Auto init() the plugin upon construction

onConfigurationLoad

public void onConfigurationLoad()

Overrides:
onConfigurationLoad in class BaseService

setCacheDictionary

private void setCacheDictionary(BaseDictionary cacheDictionary)
Set the plugin cache dictionary. NOT EXPOSED to avoid screwups

Parameters:
cacheDictionary

setCorePluginsPath

private void setCorePluginsPath(string corePluginsPath)
Set CorePluginsPath

Parameters:
corePluginsPath

setCustomPluginsExternalPath

private void setCustomPluginsExternalPath(string customPluginsExternalPath)
Set customPluginsExternalPath

Parameters:
customPluginsExternalPath

setCustomPluginsPath

private void setCustomPluginsPath(string customPluginsPath)
Set CorePluginsPath

Parameters:
customPluginsPath

setCustomPluginsPhysicalPath

private void setCustomPluginsPhysicalPath(string customPluginsPhysicalPath)
Set customPluginsPhysicalPath

Parameters:
customPluginsPhysicalPath

setExtensionsPath

private void setExtensionsPath(string extensionsPath)
Set ExtensionsPath

Parameters:
extensionsPath

setExtensionsPhysicalPath

private void setExtensionsPhysicalPath(string extensionsPhysicalPath)
Set ExtensionsPhysicalPath

Parameters:
extensionsPhysicalPath

storeMetadata

private struct storeMetadata(string pluginKey, any pluginMD)
Store a plugin's metadata introspection

Parameters:
pluginKey - The plugin cache key
pluginMD - The plugin's metadata

ColdBox Platform Version 2.6.4