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") 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 Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Id suffix of the contained configuration, mirroring PythonScript.PYTHON_SCRIPT_ID.
    static final String
     

    Fields inherited from interface com.xebialabs.deployit.plugin.api.udm.ConfigurationItem

    SYNTHETIC_PROPERTIES_FIELD, TYPE_FIELD
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    Collection<com.xebialabs.deployit.plugin.api.reflect.PropertyDescriptor>
    The input properties declared on this configuration's type.
    Collection<com.xebialabs.deployit.plugin.api.reflect.PropertyDescriptor>
    The output properties declared on this configuration's type.
     
    Collection<com.xebialabs.deployit.plugin.api.reflect.PropertyDescriptor>
    The properties into which release variables must be interpolated before execution - the declared input properties whose kind can carry a ${variable} reference.
    boolean
     
    void
    setContinuationState(String continuationState)
     
    void
     
    void
    setSupportedInWorkflow(boolean supportedInWorkflow)
     

    Methods inherited from class com.xebialabs.deployit.plugin.api.udm.base.BaseConfigurationItem

    compareTo, equals, get$ciAttributes, get$directoryReference, get$externalProperties, get$internalId, get$referenceId, get$securedCi, get$securedDirectoryReference, get$token, get$validationMessages, getId, getName, getProperty, getType, hashCode, hasProperty, set$ciAttributes, set$directoryReference, set$externalProperties, set$internalId, set$referenceId, set$securedCi, set$securedDirectoryReference, set$token, set$validationMessages, setId, setProperty, setType, toString

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • 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:
  • 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.
    • 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)