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 ClassesNested classes/interfaces inherited from interface io.jenkins.plugins.casc.model.CNode
CNode.Type -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasScalar()charcharAt(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.booleanisMasked()Check whether the scalar value should be masked in the output.booleanIndicates if the field should be included when describing even if emptybooleanisRaw()booleanintlength()sensitive(boolean sensitive) Sets the sensitive flag.voidsetPrintableWhenEmpty(boolean print) subSequence(int start, int end) toString()Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.CharSequence
isEmptyMethods 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_STRINGotherwise. Encrypted sensitive data will be returned as is.
-
isMasked
public boolean isMasked()Check whether the scalar value should be masked in the output.- Returns:
trueif 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:
isSensitiveDatain interfaceCNode
-
toString
- Specified by:
toStringin interfaceCharSequence- Overrides:
toStringin classObject
-
chars
- Specified by:
charsin interfaceCharSequence
-
codePoints
- Specified by:
codePointsin interfaceCharSequence
-
length
public int length()- Specified by:
lengthin interfaceCharSequence
-
charAt
public char charAt(int index) - Specified by:
charAtin interfaceCharSequence
-
subSequence
- Specified by:
subSequencein interfaceCharSequence
-
getSource
Description copied from interface:CNodeIndicate the source (file, line number) this specific configuration node comes from. This is used to offer relevant diagnostic messages -
isPrintableWhenEmpty
public boolean isPrintableWhenEmpty()Description copied from interface:CNodeIndicates if the field should be included when describing even if empty- Specified by:
isPrintableWhenEmptyin interfaceCNode- Returns:
- false by default
-
setPrintableWhenEmpty
public void setPrintableWhenEmpty(boolean print) -
clone
-