All Implemented Interfaces:
ConfigurationItem, VisitableItem, Serializable, Cloneable, Comparable<BaseConfigurationItem>
Direct Known Subclasses:
Variable.VariableWithValue

@Metadata(virtual=true, versioned=false) public abstract class Variable extends BaseConfiguration implements Cloneable, VisitableItem
See Also:
  • Field Details

  • Constructor Details

    • Variable

      public Variable()
  • Method Details

    • getValue

      public abstract Object getValue()
      Gets underlying value of this variable, or default value for templates. The specific type of value depends on the type of variable.
      Returns:
      the underlying value of this variable, or default value for templates.
    • getEmptyValue

      public abstract Object getEmptyValue()
      Returns empty value for the specific sub type. Empty value is used when replacing unset optional variables.
      Returns:
      empty value for the specific sub type.
    • isValueEmpty

      public boolean isValueEmpty()
      Test if value is unset or empty. Rely on the getEmptyValue() implementation.
      Returns:
      true if value is null or empty.
    • setUntypedValue

      public abstract void setUntypedValue(Object newValue) throws IllegalArgumentException
      Sets the underlying value of this variable from given object. If a conversion happens to be needed and fails, then an IllegalArgumentException will be thrown.
      Parameters:
      newValue - the value to set: either of the type needed by this variable type, or one of convertible types.
      Throws:
      IllegalArgumentException - if conversion of the value fails.
    • getKey

      public String getKey()
    • setKey

      public void setKey(String key)
    • getRequiresValue

      public boolean getRequiresValue()
    • setRequiresValue

      public void setRequiresValue(boolean requiresValue)
    • getShowOnReleaseStart

      public boolean getShowOnReleaseStart()
    • setShowOnReleaseStart

      public void setShowOnReleaseStart(boolean showOnReleaseStart)
    • getLabel

      public String getLabel()
    • setLabel

      public void setLabel(String label)
    • getDescription

      public String getDescription()
    • setDescription

      public void setDescription(String description)
    • checkValidity

      public void checkValidity()
    • checkGlobalVariableValidity

      public void checkGlobalVariableValidity()
    • checkFolderVariableValidity

      public void checkFolderVariableValidity()
    • getInternalValue

      public Object getInternalValue()
    • isPassword

      public abstract boolean isPassword()
    • getValueAsString

      public abstract String getValueAsString()
    • getEmptyValueAsString

      public abstract String getEmptyValueAsString()
    • isValueAssignableFrom

      public abstract boolean isValueAssignableFrom(Object value)
    • escapeQuotes

      protected String escapeQuotes(String value)
    • getValueProvider

      public ValueProviderConfiguration getValueProvider()
    • setValueProvider

      public void setValueProvider(ValueProviderConfiguration valueProvider)
    • accept

      public void accept(ReleaseVisitor visitor)
      Specified by:
      accept in interface VisitableItem
    • isInherited

      public boolean isInherited()
    • setInherited

      public void setInherited(boolean inherited)
    • clone

      public Variable clone() throws CloneNotSupportedException
      Overrides:
      clone in class Object
      Throws:
      CloneNotSupportedException