public abstract class AbstractPluginProvider extends java.lang.Object implements PluginProvider
Constructor and Description |
---|
AbstractPluginProvider()
INTERNAL USE ONLY
|
Modifier and Type | Method and Description |
---|---|
protected void |
abortOnRequest()
Aborts the current execution if an abort signal was received.
|
protected void |
abortOnRequest(java.lang.String pMessage)
Aborts the current execution if an abort signal was received.
|
void |
cleanup()
Can be overridden by the concrete subclass to perform a necessary cleanup of resources (e.g.
|
abstract PluginResult |
execute()
Must be implemented by the concrete subclass to perform the execution of the plugin operation.
|
protected java.lang.Boolean |
getBooleanCurrentInstancePropertyValue(java.lang.String pKey)
Returns the value of a target property as a Boolean for the given property name within the
current target group.
|
protected java.lang.Boolean |
getBooleanCurrentInstancePropertyValueOrDefault(java.lang.String pKey,
java.lang.Boolean pDefault)
Returns the value of a target property as a Boolean for the given property name within the
current target group.
|
protected java.lang.Boolean |
getBooleanInput(java.lang.String pInputName)
Returns the value of the given input as a Boolean.
|
protected java.lang.Boolean |
getBooleanInputOrDefault(java.lang.String pInputName,
java.lang.Boolean pDefault)
Returns the value of the given input as a Boolean.
|
protected java.lang.Boolean |
getBooleanInstancePropertyValue(java.lang.String pInstanceCode,
java.lang.String pKey)
Returns the value of a target property as a Boolean for the given target group code and
property name.
|
protected java.lang.Boolean |
getBooleanInstancePropertyValueOrDefault(java.lang.String pInstanceCode,
java.lang.String pKey,
java.lang.Boolean pDefault)
Returns the value of a target property as a Boolean for the given target group code and
property name.
|
protected java.lang.Boolean |
getBooleanProjectPropertyValue(java.lang.String pKey)
Returns the value of a project property as a Boolean for the given name.
|
protected java.lang.Boolean |
getBooleanProjectPropertyValueOrDefault(java.lang.String pKey,
java.lang.Boolean pDefault)
Returns the value of a project property as a Boolean for the given name.
|
protected java.lang.Double |
getDoubleCurrentInstancePropertyValue(java.lang.String pKey)
Returns the value of a target property as a Double for the given property name within the
current target group.
|
protected java.lang.Double |
getDoubleCurrentInstancePropertyValueOrDefault(java.lang.String pKey,
java.lang.Double pDefault)
Returns the value of a target property as a Double for the given property name within the
current target group.
|
protected java.lang.Double |
getDoubleInput(java.lang.String pInputName)
Returns the value of the given input as a Double.
|
protected java.lang.Double |
getDoubleInputOrDefault(java.lang.String pInputName,
java.lang.Double pDefault)
Returns the value of the given input as a Double.
|
protected java.lang.Double |
getDoubleInstancePropertyValue(java.lang.String pInstanceCode,
java.lang.String pKey)
Returns the value of a target property as a Double for the given target group code and property
name.
|
protected java.lang.Double |
getDoubleInstancePropertyValueOrDefault(java.lang.String pInstanceCode,
java.lang.String pKey,
java.lang.Double pDefault)
Returns the value of a target property as a Double for the given target group code and property
name.
|
protected java.lang.Double |
getDoubleProjectPropertyValue(java.lang.String pKey)
Returns the value of a project property as a Double for the given name.
|
protected java.lang.Double |
getDoubleProjectPropertyValueOrDefault(java.lang.String pKey,
java.lang.Double pDefault)
Returns the value of a project property as a Double for the given name.
|
protected java.lang.Integer |
getIntegerCurrentInstancePropertyValue(java.lang.String pKey)
Returns the value of a target property as an Integer for the given property name within the
current target group.
|
protected java.lang.Integer |
getIntegerCurrentInstancePropertyValueOrDefault(java.lang.String pKey,
java.lang.Integer pDefault)
Returns the value of a target property as an Integer for the given property name within the
current target group.
|
protected java.lang.Integer |
getIntegerInput(java.lang.String pInputName)
Returns the value of the given input as an Integer.
|
protected java.lang.Integer |
getIntegerInputOrDefault(java.lang.String pInputName,
java.lang.Integer pDefault)
Returns the value of the given input as an Integer.
|
protected java.lang.Integer |
getIntegerInstancePropertyValue(java.lang.String pInstanceCode,
java.lang.String pKey)
Returns the value of a target property as an Integer for the given target group code and
property name.
|
protected java.lang.Integer |
getIntegerInstancePropertyValueOrDefault(java.lang.String pInstanceCode,
java.lang.String pKey,
java.lang.Integer pDefault)
Returns the value of a target property as an Integer for the given target group code and
property name.
|
protected java.lang.Integer |
getIntegerProjectPropertyValue(java.lang.String pKey)
Returns the value of a project property as an Integer for the given name.
|
protected java.lang.Integer |
getIntegerProjectPropertyValueOrDefault(java.lang.String pKey,
java.lang.Integer pDefault)
Returns the value of a project property as an Integer for the given name.
|
protected java.lang.Long |
getLongCurrentInstancePropertyValue(java.lang.String pKey)
Returns the value of a target property as a Long for the given property name within the current
target group.
|
protected java.lang.Long |
getLongCurrentInstancePropertyValueOrDefault(java.lang.String pKey,
java.lang.Long pDefault)
Returns the value of a target property as a Long for the given property name within the current
target group.
|
protected java.lang.Long |
getLongInput(java.lang.String pInputName)
Returns the value of the given input as a Long.
|
protected java.lang.Long |
getLongInputOrDefault(java.lang.String pInputName,
java.lang.Long pDefault)
Returns the value of the given input as a Long.
|
protected java.lang.Long |
getLongInstancePropertyValue(java.lang.String pInstanceCode,
java.lang.String pKey)
Returns the value of a target property as a Long for the given target group code and property
name.
|
protected java.lang.Long |
getLongInstancePropertyValueOrDefault(java.lang.String pInstanceCode,
java.lang.String pKey,
java.lang.Long pDefault)
Returns the value of a target property as a Long for the given target group code and property
name.
|
protected java.lang.Long |
getLongProjectPropertyValue(java.lang.String pKey)
Returns the value of a project property as a Long for the given name.
|
protected java.lang.Long |
getLongProjectPropertyValueOrDefault(java.lang.String pKey,
java.lang.Long pDefault)
Returns the value of a project property as a Long for the given name.
|
protected java.lang.String |
getStringCurrentInstancePropertyValue(java.lang.String pKey)
Returns the value of a target property as a String for the given property name within the
current target group.
|
protected java.lang.String |
getStringCurrentInstancePropertyValueOrDefault(java.lang.String pKey,
java.lang.String pDefault)
Returns the value of a target property as a String for the given property name within the
current target group.
|
protected java.lang.String |
getStringInput(java.lang.String pInputName)
Returns the value of the given input as a String.
|
protected java.lang.String |
getStringInputOrDefault(java.lang.String pInputName,
java.lang.String pDefault)
Returns the value of the given input as a String.
|
protected java.lang.String |
getStringInstancePropertyValue(java.lang.String pInstanceCode,
java.lang.String pKey)
Returns the value of a target property as an Object for the given target group code and
property name.
|
protected java.lang.String |
getStringInstancePropertyValueOrDefault(java.lang.String pInstanceCode,
java.lang.String pKey,
java.lang.String pDefault)
Returns the value of a target property as a String for the given target group code and property
name.
|
protected java.lang.String |
getStringProjectPropertyValue(java.lang.String pKey)
Returns the value of a project property as a String for the given name.
|
protected java.lang.String |
getStringProjectPropertyValueOrDefault(java.lang.String pKey,
java.lang.String pDefault)
Returns the value of a project property as a String for the given name.
|
WorkflowExecutionContext |
getWorkflowExecutionContext()
Returns the WorkflowExecutionContext for the current plugin operation execution.
|
protected boolean |
isExecutionAborting()
Returns whether an abort signal was received for the current plugin execution.
|
protected void |
setOutput(java.lang.String pName,
java.lang.Object pValue,
DataTypeEnum pDataType)
Sets an output into WorkflowExecutionContext, which will be returned within a PluginResult from
the execute() method.
|
void |
setWorkflowExecutionContext(WorkflowExecutionContext pExecutionContext)
FOR INTERNAL USE AND TEST SETUP ONLY
|
abstract void |
validate()
Must be implemented by the concrete subclass to perform any validation (prior to execution).
|
protected void |
validateContext(java.util.Collection<java.lang.String> pRequiredProperties,
java.util.Collection<java.lang.String> pRequiredInputs)
Validates that the given properties and inputs have non-null values within the
WorkflowExecution context for the current execution instance.
|
protected void |
validateContext(java.util.Collection<java.lang.String> pRequiredProperties,
java.util.Collection<java.lang.String> pRequiredInputs,
java.lang.String pValidateTargetGroup)
Validates that the given properties and inputs have non-null values within the
WorkflowExecution context for the given execution instance.
|
protected void |
validateRequiredInputs(java.util.Collection<java.lang.String> pRequiredInputs)
Validates that the given inputs have non-null values within the WorkflowExecution context for
the current execution instance.
|
protected void |
validateRequiredPropertiesForCurrentInstance(java.util.Collection<java.lang.String> pRequiredProperties)
Validates that the given properties have non-null values within the WorkflowExecution context
for the current execution instance.
|
protected void |
validateRequiredPropertiesForInstance(java.util.Collection<java.lang.String> pRequiredProperties,
java.lang.String pValidateTargetGroup)
Validates that the given properties have non-null values within the WorkflowExecution context
for the given execution instance.
|
public void setWorkflowExecutionContext(WorkflowExecutionContext pExecutionContext)
setWorkflowExecutionContext
in interface PluginProvider
pExecutionContext
- the workflow execution contextpublic WorkflowExecutionContext getWorkflowExecutionContext()
public abstract PluginResult execute() throws FlexCheckedException
execute
in interface PluginProvider
FlexCheckedException
- if the plugin operation failspublic abstract void validate() throws FlexCheckedException
validate
in interface PluginProvider
FlexCheckedException
- if the WorkflowExecutionContext provides configuration which is
not valid for this plugin operation executionpublic void cleanup()
cleanup
in interface PluginProvider
protected void validateContext(java.util.Collection<java.lang.String> pRequiredProperties, java.util.Collection<java.lang.String> pRequiredInputs) throws FlexCheckedException
pRequiredProperties
- a collection of required propertiespRequiredInputs
- a collection of required inputsFlexCheckedException
- if any or all of the properties/inputs are invalidprotected void validateContext(java.util.Collection<java.lang.String> pRequiredProperties, java.util.Collection<java.lang.String> pRequiredInputs, java.lang.String pValidateTargetGroup) throws FlexCheckedException
pRequiredProperties
- a collection of required propertiespRequiredInputs
- a collection of required inputspValidateTargetGroup
- the target group used to locate propertiesFlexCheckedException
- if any or all of the properties/inputs are invalidprotected void validateRequiredInputs(java.util.Collection<java.lang.String> pRequiredInputs) throws FlexCheckedException
pRequiredInputs
- a collection of required inputsFlexCheckedException
- if any or all of the inputs are invalidprotected void validateRequiredPropertiesForInstance(java.util.Collection<java.lang.String> pRequiredProperties, java.lang.String pValidateTargetGroup) throws FlexCheckedException
pRequiredProperties
- a collection of required propertiespValidateTargetGroup
- the target group used to locate propertiesFlexCheckedException
- if any or all of the properties are invalidprotected void validateRequiredPropertiesForCurrentInstance(java.util.Collection<java.lang.String> pRequiredProperties) throws FlexCheckedException
pRequiredProperties
- a collection of required propertiesFlexCheckedException
- if any or all of the properties are invalidprotected void setOutput(java.lang.String pName, java.lang.Object pValue, DataTypeEnum pDataType)
pName
- the name of the output to setpValue
- the value of the output (must be of type pDataType)pDataType
- the data type of the propertyprotected java.lang.Boolean getBooleanInput(java.lang.String pInputName)
pInputName
- the name of the input to retrieveprotected java.lang.Boolean getBooleanInputOrDefault(java.lang.String pInputName, java.lang.Boolean pDefault)
pInputName
- the name of the input to retrieveprotected java.lang.Double getDoubleInput(java.lang.String pInputName)
pInputName
- the name of the input to retrieveprotected java.lang.Double getDoubleInputOrDefault(java.lang.String pInputName, java.lang.Double pDefault)
pInputName
- the name of the input to retrieveprotected java.lang.String getStringInput(java.lang.String pInputName)
pInputName
- the name of the input to retrieveprotected java.lang.String getStringInputOrDefault(java.lang.String pInputName, java.lang.String pDefault)
pInputName
- the name of the input to retrieveprotected java.lang.Integer getIntegerInput(java.lang.String pInputName)
pInputName
- the name of the input to retrieveprotected java.lang.Integer getIntegerInputOrDefault(java.lang.String pInputName, java.lang.Integer pDefault)
pInputName
- the name of the input to retrieveprotected java.lang.Long getLongInput(java.lang.String pInputName)
pInputName
- the name of the input to retrieveprotected java.lang.Long getLongInputOrDefault(java.lang.String pInputName, java.lang.Long pDefault)
pInputName
- the name of the input to retrieveprotected java.lang.String getStringProjectPropertyValue(java.lang.String pKey)
pKey
- the name of the project propertyprotected java.lang.String getStringProjectPropertyValueOrDefault(java.lang.String pKey, java.lang.String pDefault)
pKey
- the name of the project propertyprotected java.lang.String getStringInstancePropertyValue(java.lang.String pInstanceCode, java.lang.String pKey)
pKey
- the name of the target propertyprotected java.lang.String getStringInstancePropertyValueOrDefault(java.lang.String pInstanceCode, java.lang.String pKey, java.lang.String pDefault)
pKey
- the name of the target propertyprotected java.lang.String getStringCurrentInstancePropertyValue(java.lang.String pKey)
pKey
- the name of the target propertyprotected java.lang.String getStringCurrentInstancePropertyValueOrDefault(java.lang.String pKey, java.lang.String pDefault)
pKey
- the name of the target propertyprotected java.lang.Double getDoubleProjectPropertyValue(java.lang.String pKey)
pKey
- the name of the project propertyprotected java.lang.Double getDoubleProjectPropertyValueOrDefault(java.lang.String pKey, java.lang.Double pDefault)
pKey
- the name of the project propertyprotected java.lang.Double getDoubleInstancePropertyValue(java.lang.String pInstanceCode, java.lang.String pKey)
pKey
- the name of the target propertyprotected java.lang.Double getDoubleInstancePropertyValueOrDefault(java.lang.String pInstanceCode, java.lang.String pKey, java.lang.Double pDefault)
pKey
- the name of the target propertyprotected java.lang.Double getDoubleCurrentInstancePropertyValue(java.lang.String pKey)
pKey
- the name of the target propertyprotected java.lang.Double getDoubleCurrentInstancePropertyValueOrDefault(java.lang.String pKey, java.lang.Double pDefault)
pKey
- the name of the target propertyprotected java.lang.Integer getIntegerProjectPropertyValue(java.lang.String pKey)
pKey
- the name of the project propertyprotected java.lang.Integer getIntegerProjectPropertyValueOrDefault(java.lang.String pKey, java.lang.Integer pDefault)
pKey
- the name of the project propertyprotected java.lang.Integer getIntegerInstancePropertyValue(java.lang.String pInstanceCode, java.lang.String pKey)
pKey
- the name of the target propertyprotected java.lang.Integer getIntegerInstancePropertyValueOrDefault(java.lang.String pInstanceCode, java.lang.String pKey, java.lang.Integer pDefault)
pKey
- the name of the target propertyprotected java.lang.Integer getIntegerCurrentInstancePropertyValue(java.lang.String pKey)
pKey
- the name of the target propertyprotected java.lang.Integer getIntegerCurrentInstancePropertyValueOrDefault(java.lang.String pKey, java.lang.Integer pDefault)
pKey
- the name of the target propertyprotected java.lang.Boolean getBooleanProjectPropertyValue(java.lang.String pKey)
pKey
- the name of the project propertyprotected java.lang.Boolean getBooleanProjectPropertyValueOrDefault(java.lang.String pKey, java.lang.Boolean pDefault)
pKey
- the name of the project propertyprotected java.lang.Boolean getBooleanInstancePropertyValue(java.lang.String pInstanceCode, java.lang.String pKey)
pKey
- the name of the target propertyprotected java.lang.Boolean getBooleanInstancePropertyValueOrDefault(java.lang.String pInstanceCode, java.lang.String pKey, java.lang.Boolean pDefault)
pKey
- the name of the target propertyprotected java.lang.Boolean getBooleanCurrentInstancePropertyValue(java.lang.String pKey)
pKey
- the name of the target propertyprotected java.lang.Boolean getBooleanCurrentInstancePropertyValueOrDefault(java.lang.String pKey, java.lang.Boolean pDefault)
pKey
- the name of the target propertyprotected java.lang.Long getLongProjectPropertyValue(java.lang.String pKey)
pKey
- the name of the project propertyprotected java.lang.Long getLongProjectPropertyValueOrDefault(java.lang.String pKey, java.lang.Long pDefault)
pKey
- the name of the project propertyprotected java.lang.Long getLongInstancePropertyValue(java.lang.String pInstanceCode, java.lang.String pKey)
pKey
- the name of the target propertyprotected java.lang.Long getLongInstancePropertyValueOrDefault(java.lang.String pInstanceCode, java.lang.String pKey, java.lang.Long pDefault)
pKey
- the name of the target propertyprotected java.lang.Long getLongCurrentInstancePropertyValue(java.lang.String pKey)
pKey
- the name of the target propertyprotected java.lang.Long getLongCurrentInstancePropertyValueOrDefault(java.lang.String pKey, java.lang.Long pDefault)
pKey
- the name of the target propertyprotected boolean isExecutionAborting()
protected void abortOnRequest() throws FlexAbortPluginException
FlexAbortPluginException
- if an abort signal was receivedprotected void abortOnRequest(java.lang.String pMessage) throws FlexAbortPluginException
pMessage
- the message to log with the exception which is thrownFlexAbortPluginException
- if an abort signal was received