Package org.openhab.core.types
Interface StateDescriptionFragmentProvider
@NonNullByDefault
public interface StateDescriptionFragmentProvider
Provide a
StateDescriptionFragment for the current StateDescription. Use the
StateDescriptionFragmentBuilder to create a StateDescriptionFragment with only the parts known.- Author:
- Henning Treu - Initial contribution
-
Method Summary
Modifier and TypeMethodDescriptiongetRank()Return the service rank.@Nullable StateDescriptionFragmentgetStateDescriptionFragment(String itemName, @Nullable Locale locale) Returns aStateDescriptionFragmentwith only the parts known by thisStateDescriptionFragmentProvider.
-
Method Details
-
getStateDescriptionFragment
@Nullable StateDescriptionFragment getStateDescriptionFragment(String itemName, @Nullable Locale locale) Returns aStateDescriptionFragmentwith only the parts known by thisStateDescriptionFragmentProvider.- Parameters:
itemName- item name (must not be null)locale- locale (can be null)- Returns:
- a
StateDescriptionFragmentwith only the parts known by thisStateDescriptionFragmentProvider.
-
getRank
Integer getRank()Return the service rank. Usually an implementation should piggy-back on theservice.rankingOSGi component property. The default is 0 - the higher, the more like it is going to win.- Returns:
- an integer value
-