Package io.jenkins.plugins.casc.model
Class Scalar
- java.lang.Object
-
- io.jenkins.plugins.casc.model.Scalar
-
- All Implemented Interfaces:
CNode
,CharSequence
,Cloneable
public final class Scalar extends Object implements CNode, CharSequence
- Author:
- Nicolas De Loof
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Scalar.Format
-
Nested classes/interfaces inherited from interface io.jenkins.plugins.casc.model.CNode
CNode.Type
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Scalar
asScalar()
char
charAt(int index)
IntStream
chars()
CNode
clone()
IntStream
codePoints()
Scalar
encrypted(boolean encrypted)
Indicates that the data is encrypted and hence safe to be exported.Scalar.Format
getFormat()
Source
getSource()
Indicate the source (file, line number) this specific configuration node comes from.CNode.Type
getType()
String
getValue()
Gets value of the scalar for export.boolean
isMasked()
Check whether the scalar value should be masked in the output.boolean
isRaw()
boolean
isSensitiveData()
int
length()
Scalar
sensitive(boolean sensitive)
Sets the sensitive flag.CharSequence
subSequence(int start, int end)
String
toString()
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.jenkins.plugins.casc.model.CNode
asMapping, asSequence
-
-
-
-
Method Detail
-
getType
public CNode.Type getType()
-
getFormat
public Scalar.Format getFormat()
-
isRaw
public boolean isRaw()
-
getValue
public String 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
public Scalar sensitive(boolean 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
public Scalar encrypted(boolean 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
@NonNull public String toString()
- Specified by:
toString
in interfaceCharSequence
- Overrides:
toString
in classObject
-
chars
@NonNull public IntStream chars()
- Specified by:
chars
in interfaceCharSequence
-
codePoints
@NonNull public IntStream 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
@NonNull public CharSequence subSequence(int start, int end)
- Specified by:
subSequence
in interfaceCharSequence
-
getSource
public Source 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
-
-