Package se.diabol.jenkins.pipeline.model
Record Class ViewModel
java.lang.Object
java.lang.Record
se.diabol.jenkins.pipeline.model.ViewModel
@ExportedBean(defaultVisibility=100)
public record ViewModel(List<Component> components, ViewSettings settings)
extends Record
What the view's
api/json serves: the components and the settings. It is exported once per model and
viewer and kept with the cached model; the server time is written into every response after it.-
Constructor Summary
ConstructorsConstructorDescriptionViewModel(List<Component> components, ViewSettings settings) Creates an instance of aViewModelrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecomponentsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.settings()Returns the value of thesettingsrecord component.byte[]toJson()The JSON of the model as Stapler exports it at the default depth, without a trailing newline.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ViewModel
Creates an instance of aViewModelrecord class.- Parameters:
components- the value for thecomponentsrecord componentsettings- the value for thesettingsrecord component
-
-
Method Details
-
toJson
The JSON of the model as Stapler exports it at the default depth, without a trailing newline.- Throws:
IOException
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
components
Returns the value of thecomponentsrecord component.- Returns:
- the value of the
componentsrecord component
-
settings
Returns the value of thesettingsrecord component.- Returns:
- the value of the
settingsrecord component
-