public abstract class AbstractDescribableScriptPlugin extends java.lang.Object implements Describable
ScriptPluginProvider
's metadata:
title = Title of the Plugin description = Description of the plugin
config.X.PROPERTY_TYPE = Type name of the property, fromProperty.Type
config.X.name = Name of the property (key string) config.X.title = Title of the property config.X.description = description of the property config.X.required = true/false, if the property is required. config.X.default = default string of the property config.X.values = comma-separated values list for Select or FreeSelect properties config.X.scope = scope of the property, fromPropertyScope
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CONFIG_DEFAULT |
static java.lang.String |
CONFIG_DESCRIPTION |
static java.lang.String |
CONFIG_LABELS |
static java.lang.String |
CONFIG_NAME |
static java.lang.String |
CONFIG_PROP_PREFIX |
static java.lang.String |
CONFIG_RENDERING_OPTIONS |
static java.lang.String |
CONFIG_REQUIRED |
static java.lang.String |
CONFIG_SCOPE |
static java.lang.String |
CONFIG_TITLE |
static java.lang.String |
CONFIG_TYPE |
static java.lang.String |
CONFIG_VALUES |
static java.lang.String |
DESCRIPTION_PROP |
static java.lang.String |
SETTING_MERGE_ENVIRONMENT |
static java.lang.String |
TITLE_PROP |
Constructor and Description |
---|
AbstractDescribableScriptPlugin(ScriptPluginProvider provider,
Framework framework) |
Modifier and Type | Method and Description |
---|---|
protected static void |
createDescription(ScriptPluginProvider provider,
boolean allowCustomProperties,
boolean useConventionalPropertiesMapping,
DescriptionBuilder builder) |
protected static void |
createDescription(ScriptPluginProvider provider,
boolean allowCustomProperties,
DescriptionBuilder builder) |
java.util.Map<java.lang.String,java.lang.String> |
createPluginData() |
Description |
getDescription() |
Framework |
getFramework() |
ScriptPluginProvider |
getProvider() |
abstract boolean |
isAllowCustomProperties() |
boolean |
isUseConventionalPropertiesMapping() |
protected java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> |
loadConfigData(ExecutionContext context,
java.util.Map<java.lang.String,java.lang.Object> instanceData,
java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> localDataContext,
Description description,
java.lang.String serviceName)
Loads the plugin configuration values stored in project or framework properties, also
|
protected void |
loadContentConversionPropertyValues(java.util.Map<java.lang.String,java.lang.String> data,
ExecutionContext context,
java.util.List<Property> pluginProperties)
Looks for properties with content conversion, and converts the values
|
protected java.util.Map<java.lang.String,java.lang.Object> |
loadInstanceDataFromNodeAttributes(INodeEntry node,
Description description)
Map node attributes as instance configuration values based on property descriptions.
|
protected static java.util.Map<java.lang.String,java.lang.String> |
toStringStringMap(java.util.Map input) |
public static final java.lang.String TITLE_PROP
public static final java.lang.String DESCRIPTION_PROP
public static final java.lang.String CONFIG_PROP_PREFIX
public static final java.lang.String CONFIG_TITLE
public static final java.lang.String CONFIG_DESCRIPTION
public static final java.lang.String CONFIG_NAME
public static final java.lang.String CONFIG_TYPE
public static final java.lang.String CONFIG_REQUIRED
public static final java.lang.String CONFIG_DEFAULT
public static final java.lang.String CONFIG_VALUES
public static final java.lang.String CONFIG_LABELS
public static final java.lang.String CONFIG_SCOPE
public static final java.lang.String CONFIG_RENDERING_OPTIONS
public static final java.lang.String SETTING_MERGE_ENVIRONMENT
public AbstractDescribableScriptPlugin(ScriptPluginProvider provider, Framework framework)
public java.util.Map<java.lang.String,java.lang.String> createPluginData()
protected static void createDescription(ScriptPluginProvider provider, boolean allowCustomProperties, DescriptionBuilder builder) throws ConfigurationException
ConfigurationException
protected static void createDescription(ScriptPluginProvider provider, boolean allowCustomProperties, boolean useConventionalPropertiesMapping, DescriptionBuilder builder) throws ConfigurationException
ConfigurationException
protected java.util.Map<java.lang.String,java.lang.Object> loadInstanceDataFromNodeAttributes(INodeEntry node, Description description)
StringRenderingConstants.INSTANCE_SCOPE_NODE_ATTRIBUTE_KEY
then use the value of that option as the node attribute name to use.node
- nodedescription
- plugin descriptionprotected java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> loadConfigData(ExecutionContext context, java.util.Map<java.lang.String,java.lang.Object> instanceData, java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> localDataContext, Description description, java.lang.String serviceName) throws ConfigurationException
context
- execution contextlocalDataContext
- current context datadescription
- plugin descriptioninstanceData
- instance dataserviceName
- service nameConfigurationException
- configuration errorprotected void loadContentConversionPropertyValues(java.util.Map<java.lang.String,java.lang.String> data, ExecutionContext context, java.util.List<Property> pluginProperties) throws ConfigurationException
data
- map of values for config propertiescontext
- execution contextpluginProperties
- definition of plugin propertiesConfigurationException
protected static java.util.Map<java.lang.String,java.lang.String> toStringStringMap(java.util.Map input)
public Description getDescription()
getDescription
in interface Describable
public abstract boolean isAllowCustomProperties()
public boolean isUseConventionalPropertiesMapping()
public ScriptPluginProvider getProvider()
public Framework getFramework()