Class PluginTaskConfiguration

java.lang.Object
com.xebialabs.deployit.plugin.api.udm.base.BaseConfigurationItem
com.xebialabs.xlrelease.domain.PluginTaskConfiguration
All Implemented Interfaces:
com.xebialabs.deployit.plugin.api.udm.ConfigurationItem, Serializable, Comparable<com.xebialabs.deployit.plugin.api.udm.base.BaseConfigurationItem>

@Metadata(versioned=false, description="Base type for the configuration of a task type contributed by an OSGi plugin bundle", virtual=true) public class PluginTaskConfiguration extends com.xebialabs.deployit.plugin.api.udm.base.BaseConfigurationItem
Base class for the configuration of a task type contributed by an OSGi plugin bundle.

A plugin author subclasses this in their bundle's type-definitions.xml to declare the input and output properties of their task type, and provides one TaskExecutorExtension bean whose getTaskType() returns that declared type name.

This is deliberately not a Task subclass. The host owns the task (PluginTask, which holds a configuration by containment); the author owns only the configuration. That keeps author-declared properties out of the namespace Task occupies, so declaring a property called owner or status is harmless rather than a collision with host state.

It is the same arrangement xlrelease.PythonScript has with CustomScriptTask - including the naming lesson: PythonScript's own Javadoc notes it "should be called PythonScriptDefinition". This one says what it is.

See Also:
  • Field Details

    • PLUGIN_TASK_PROPERTY

      public static final String PLUGIN_TASK_PROPERTY
      See Also:
    • PLUGIN_TASK_CONFIGURATION_ID

      public static final String PLUGIN_TASK_CONFIGURATION_ID
      Id suffix of the contained configuration, mirroring PythonScript.PYTHON_SCRIPT_ID. Deliberately "TaskConfiguration" rather than the barer "Configuration": CI ids are user-visible and long-lived, and Configuration is already a loaded word in this product (the xlrelease.Configuration type tree, the Configuration screens), so the barer name would read as one of those in a persisted id.
      See Also:
    • UPDATEABLE_PROPERTIES

      public static final List<String> UPDATEABLE_PROPERTIES
      Properties that must come from the new type's own declaration when a task is converted to another type, the analogue of PythonScript.UPDATEABLE_PROPERTIES. Adds continuationState, which is opaque implementation-private state.
  • Constructor Details

    • PluginTaskConfiguration

      public PluginTaskConfiguration()
  • Method Details

    • getPropertiesWithVariables

      public Collection<com.xebialabs.deployit.plugin.api.reflect.PropertyDescriptor> getPropertiesWithVariables()
      The properties into which release variables must be interpolated before execution - the declared input properties whose kind can carry a ${variable} reference.

      Not inherited from any base: PythonScript declares its own equivalent, and PluginTask.freezeVariablesInCustomFields(java.util.Map<java.lang.String, com.xebialabs.xlrelease.variable.ValueWithInterpolation>, java.util.Map<java.lang.String, java.lang.String>, com.xebialabs.xlrelease.domain.Changes, boolean) walks this collection. Without it a ${variable} in a plugin task's input field would silently never resolve.

    • getInputProperties

      public Collection<com.xebialabs.deployit.plugin.api.reflect.PropertyDescriptor> getInputProperties()
      The input properties declared on this configuration's type.
    • getOutputProperties

      public Collection<com.xebialabs.deployit.plugin.api.reflect.PropertyDescriptor> getOutputProperties()
      The output properties declared on this configuration's type.
    • getTransitionalProperties

      public Collection<com.xebialabs.deployit.plugin.api.reflect.PropertyDescriptor> getTransitionalProperties()
      The transitional (category="script") properties declared on this configuration's type: internal state carried across a suspend/resume, never presented to release authors and never touched by task edits.
    • getPluginTask

      public PluginTask getPluginTask()
    • setPluginTask

      public void setPluginTask(PluginTask pluginTask)
    • isSupportedInWorkflow

      public boolean isSupportedInWorkflow()
    • setSupportedInWorkflow

      public void setSupportedInWorkflow(boolean supportedInWorkflow)
    • getContinuationState

      public String getContinuationState()
    • setContinuationState

      public void setContinuationState(String continuationState)
    • getVariableInterpolationIgnoredProperties

      public Set<String> getVariableInterpolationIgnoredProperties()
    • setVariableInterpolationIgnoredProperties

      public void setVariableInterpolationIgnoredProperties(Set<String> variableInterpolationIgnoredProperties)
    • isScriptIgnoreVariableInterpolation

      public boolean isScriptIgnoreVariableInterpolation()
    • setScriptIgnoreVariableInterpolation

      public void setScriptIgnoreVariableInterpolation(boolean scriptIgnoreVariableInterpolation)
    • getTaskColor

      public String getTaskColor()
    • getIconClass

      public String getIconClass()
    • getIconLocation

      public String getIconLocation()