Package cx.syndeo.script
Interface Variable
public interface Variable
The
Variable interface defines the contract for objects that represent
a variable within a scripting context. It provides methods
to manage the state and properties of a variable, such as whether its value
should be remembered, if it's sensitive, and its current value.-
Method Summary
Modifier and TypeMethodDescriptiongetValue()Retrieves the current value of the variable.Checks if the variable's value should be remembered across sessions.Checks if the variable's value is considered sensitive (e.g., a password or private key).voidsetRemembered(Boolean remembered) Sets whether the variable's value should be remembered across sessions.voidsetSensitive(Boolean sensitive) Sets whether the variable's value is considered sensitive.voidSets the value of the variable.
-
Method Details
-
isRemembered
Boolean isRemembered()Checks if the variable's value should be remembered across sessions.- Returns:
trueif the variable's value is remembered,falseotherwise.
-
setRemembered
Sets whether the variable's value should be remembered across sessions.- Parameters:
remembered-trueto remember the value,falseotherwise.
-
getValue
Object getValue()Retrieves the current value of the variable.- Returns:
- The current value of the variable as an
Object.
-
setValue
Sets the value of the variable.- Parameters:
value- The new value to set for the variable.
-
isSensitive
Boolean isSensitive()Checks if the variable's value is considered sensitive (e.g., a password or private key). Sensitive values require special handling, such as not being logged or displayed.- Returns:
trueif the variable's value is sensitive,falseotherwise.
-
setSensitive
Sets whether the variable's value is considered sensitive.- Parameters:
sensitive-trueif the value is sensitive,falseotherwise.
-