public abstract class GCUBEPluginContext extends Object
GCUBEPluginContext exposes information that is common across all services.
This includes:
Individual services may subclass it to introduce additional requirements on the contexts of their plugins. Typically, they add properties and type mappings in their constructors to make the information readily available to both service and clients.
| Modifier and Type | Class and Description |
|---|---|
class |
GCUBEPluginContext.TypeMapping
Groups the information required to to serialise and deserialise a Java class.
|
| Constructor and Description |
|---|
GCUBEPluginContext() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addProperty(DescriptiveProperty... properties)
Adds one or more descriptive properties for the plugin.
|
protected void |
addTypeMappings(GCUBEPluginContext.TypeMapping... mappings)
Adds one or more type mappings required by the plugin, if any.
|
GCUBEService |
getPlugin()
Returns the
GCUBEService that models the plugin. |
Map<String,DescriptiveProperty> |
getProperties()
Returns (a read-only copy of) the descriptive properties of the plugin.
|
List<GCUBEPluginContext.TypeMapping> |
getTypeMappings()
Returns (a read-only copy of) the type mappings required by the plugin, if any.
|
void |
initialise(GCUBEService plugin)
Creates an instance for a given plugin.
|
public void initialise(GCUBEService plugin)
plugin - the plugin.public GCUBEService getPlugin()
GCUBEService that models the plugin.public Map<String,DescriptiveProperty> getProperties()
protected void addProperty(DescriptiveProperty... properties)
properties - the property.public List<GCUBEPluginContext.TypeMapping> getTypeMappings()
protected void addTypeMappings(GCUBEPluginContext.TypeMapping... mappings)
mappings - the type mappings.Copyright © 2015. All Rights Reserved.