Record Class SystemReadyStatus
java.lang.Object
java.lang.Record
io.wcm.tooling.commons.packmgr.httpaction.SystemReadyStatus
- Record Components:
overallResult- overall resultresults- list of individual results
public record SystemReadyStatus(String overallResult, List<SystemReadyStatus.Result> results)
extends Record
POJO to map system ready JSON response to via Jackson.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordRepresents a message within a health check result.static final recordRepresents a single health check result. -
Constructor Summary
ConstructorsConstructorDescriptionSystemReadyStatus(String overallResult, List<SystemReadyStatus.Result> results) Creates an instance of aSystemReadyStatusrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns a human-readable string with failure information if the system is not ready.final inthashCode()Returns a hash code value for this object.booleanChecks if the overall system ready status is OK.Returns the value of theoverallResultrecord component.results()Returns the value of theresultsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SystemReadyStatus
Creates an instance of aSystemReadyStatusrecord class.- Parameters:
overallResult- the value for theoverallResultrecord componentresults- the value for theresultsrecord component
-
-
Method Details
-
isSystemReadyOK
public boolean isSystemReadyOK()Checks if the overall system ready status is OK.- Returns:
- true if overall status is OK
-
getFailureInfoString
Returns a human-readable string with failure information if the system is not ready. If the system is ready, returns null.- Returns:
- failure information string or null
-
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). -
overallResult
Returns the value of theoverallResultrecord component.- Returns:
- the value of the
overallResultrecord component
-
results
Returns the value of theresultsrecord component.- Returns:
- the value of the
resultsrecord component
-