Class Variable
java.lang.Object
com.xebialabs.deployit.plugin.api.udm.base.BaseConfigurationItem
com.xebialabs.xlrelease.domain.BaseConfiguration
com.xebialabs.xlrelease.domain.variables.Variable
- All Implemented Interfaces:
com.xebialabs.deployit.plugin.api.udm.ConfigurationItem,VisitableItem,Serializable,Cloneable,Comparable<com.xebialabs.deployit.plugin.api.udm.base.BaseConfigurationItem>
- Direct Known Subclasses:
Variable.VariableWithValue
@Metadata(virtual=true,
versioned=false)
public abstract class Variable
extends BaseConfiguration
implements Cloneable, VisitableItem
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface com.xebialabs.deployit.plugin.api.udm.ConfigurationItem
SYNTHETIC_PROPERTIES_FIELD, TYPE_FIELD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(ReleaseVisitor visitor) voidvoidvoidclone()abstract ObjectReturns empty value for the specific sub type.abstract StringgetKey()getLabel()booleanbooleanabstract ObjectgetValue()Gets underlying value of this variable, or default value for templates.abstract Stringbooleanabstract booleanabstract booleanisValueAssignableFrom(Object value) booleanTest if value is unset or empty.voidsetDescription(String description) voidsetInherited(boolean inherited) voidvoidvoidsetRequiresValue(boolean requiresValue) voidsetShowOnReleaseStart(boolean showOnReleaseStart) abstract voidsetUntypedValue(Object newValue) Sets the underlying value of this variable from given object.voidsetValueProvider(ValueProviderConfiguration valueProvider) Methods inherited from class com.xebialabs.xlrelease.domain.BaseConfiguration
getFolderId, getTitle, hasId, isSupportedOn, setFolderId, setTitleMethods 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
-
Constructor Details
-
Variable
public Variable()
-
-
Method Details
-
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
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 thegetEmptyValue()implementation.- Returns:
- true if value is null or empty.
-
setUntypedValue
Sets the underlying value of this variable from given object. If a conversion happens to be needed and fails, then anIllegalArgumentExceptionwill 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
-
setKey
-
getRequiresValue
public boolean getRequiresValue() -
setRequiresValue
public void setRequiresValue(boolean requiresValue) -
getShowOnReleaseStart
public boolean getShowOnReleaseStart() -
setShowOnReleaseStart
public void setShowOnReleaseStart(boolean showOnReleaseStart) -
getLabel
-
setLabel
-
getDescription
-
setDescription
-
checkValidity
public void checkValidity() -
checkGlobalVariableValidity
public void checkGlobalVariableValidity() -
checkFolderVariableValidity
public void checkFolderVariableValidity() -
getInternalValue
-
isPassword
public abstract boolean isPassword() -
getValueAsString
-
getEmptyValueAsString
-
isValueAssignableFrom
-
getValueProvider
-
setValueProvider
-
accept
- Specified by:
acceptin interfaceVisitableItem
-
isInherited
public boolean isInherited() -
setInherited
public void setInherited(boolean inherited) -
clone
- Throws:
CloneNotSupportedException
-