Class ThingStatusInfoBuilder
java.lang.Object
org.openhab.core.thing.binding.builder.ThingStatusInfoBuilder
ThingStatusInfoBuilder is responsible for creating ThingStatusInfos.- Author:
- Stefan Bußweiler - Initial contribution, Dennis Nobel - Added null checks
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds and returns the status info.static ThingStatusInfoBuildercreate(ThingStatus status) Creates a status info builder for the given status.static ThingStatusInfoBuildercreate(ThingStatus status, ThingStatusDetail statusDetail) Creates a status info builder for the given status and detail.withDescription(@Nullable String description) Appends a description to the status to build.withStatusDetail(ThingStatusDetail statusDetail) Appends a status detail to the status to build.
-
Method Details
-
create
Creates a status info builder for the given status and detail.- Parameters:
status- the status (must not be null)statusDetail- the detail of the status (must not be null)- Returns:
- status info builder
-
create
Creates a status info builder for the given status.- Parameters:
status- the status (must not be null)- Returns:
- status info builder
-
withDescription
Appends a description to the status to build.- Parameters:
description- the description- Returns:
- status info builder
-
withStatusDetail
Appends a status detail to the status to build.- Parameters:
statusDetail- the status detail (must not be null)- Returns:
- status info builder
-
build
Builds and returns the status info.- Returns:
- status info
-