Skip to content

Conversation

@csbiy
Copy link
Contributor

@csbiy csbiy commented Jan 25, 2026

While working with StatusInfo, I noticed that OUT_OF_SERVICE and RESTRICTED status types don't have the same convenience methods as other statuses like UP, DOWN, and OFFLINE.

This PR adds the missing methods to complete the API:

Factory methods:

  • ofOutOfService() / ofRestricted() - convenience methods without details
  • ofOutOfService(Map<String, Object> details) / ofRestricted(Map<String, Object> details) - methods with details

Helper methods:

  • isOutOfService() / isRestricted() - boolean checkers

This makes the API more consistent and easier to use. All tests pass.

…TED status

Adds convenience methods to StatusInfo for OUT_OF_SERVICE and RESTRICTED
statuses to match the existing pattern used by UP, DOWN, and OFFLINE:

- ofOutOfService() and ofRestricted() factory methods without details
- ofOutOfService(Map) and ofRestricted(Map) factory methods with details
- isOutOfService() and isRestricted() boolean helper methods

This completes the API consistency across all status types defined in
StatusInfo and makes the class easier to use.

Tests added to verify the new factory methods and helper methods work
correctly and follow the same pattern as existing status types.
@csbiy csbiy requested a review from a team as a code owner January 25, 2026 05:55
Copy link
Contributor

@SteKoe SteKoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @csbiy,

thanks for your contribution. It looks nice!

@SteKoe SteKoe merged commit a25eaaf into codecentric:master Jan 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants