Package io.jenkins.plugins.casc.model
Class Scalar
java.lang.Object
io.jenkins.plugins.casc.model.Scalar
- All Implemented Interfaces:
CNode
,CharSequence
,Cloneable
- Author:
- Nicolas De Loof
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.jenkins.plugins.casc.model.CNode
CNode.Type
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionasScalar()
char
charAt
(int index) chars()
clone()
encrypted
(boolean encrypted) Indicates that the data is encrypted and hence safe to be exported.Indicate the source (file, line number) this specific configuration node comes from.getType()
getValue()
Gets value of the scalar for export.boolean
isMasked()
Check whether the scalar value should be masked in the output.boolean
isRaw()
boolean
int
length()
sensitive
(boolean sensitive) Sets the sensitive flag.subSequence
(int start, int end) toString()
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.CharSequence
isEmpty
Methods inherited from interface io.jenkins.plugins.casc.model.CNode
asMapping, asSequence
-
Constructor Details
-
Scalar
-
Scalar
-
Scalar
-
Scalar
-
Scalar
-
-
Method Details
-
getType
-
getFormat
-
isRaw
public boolean isRaw() -
asScalar
-
getValue
Gets value of the scalar for export.- Returns:
- Value of the scalar if not
isMasked()
,SECRET_VALUE_STRING
otherwise. Encrypted sensitive data will be returned as is.
-
isMasked
public boolean isMasked()Check whether the scalar value should be masked in the output.- Returns:
true
if the value is masked- Since:
- 1.25
-
sensitive
Sets the sensitive flag. It indicates that the scalar represents a sensitive argument (secret or other restricted data).- Parameters:
sensitive
- value to set- Returns:
- Object instance
- Since:
- 1.25
-
encrypted
Indicates that the data is encrypted and hence safe to be exported.- Parameters:
encrypted
- Value to set- Returns:
- Object instance
- Since:
- 1.25
-
isSensitiveData
public boolean isSensitiveData()- Specified by:
isSensitiveData
in interfaceCNode
-
toString
- Specified by:
toString
in interfaceCharSequence
- Overrides:
toString
in classObject
-
chars
- Specified by:
chars
in interfaceCharSequence
-
codePoints
- Specified by:
codePoints
in interfaceCharSequence
-
length
public int length()- Specified by:
length
in interfaceCharSequence
-
charAt
public char charAt(int index) - Specified by:
charAt
in interfaceCharSequence
-
subSequence
- Specified by:
subSequence
in interfaceCharSequence
-
getSource
Description copied from interface:CNode
Indicate the source (file, line number) this specific configuration node comes from. This is used to offer relevant diagnostic messages -
clone
-