Package net.solarnetwork.domain
Class BasicLocalizedServiceInfo
- All Implemented Interfaces:
Comparable<String>,Identity<String>,LocalizedServiceInfo
- Direct Known Subclasses:
BasicConfigurableLocalizedServiceInfo
public class BasicLocalizedServiceInfo
extends BasicIdentity<String>
implements LocalizedServiceInfo
Basic immutable implementation of
LocalizedServiceInfo.- Since:
- 1.43
- Version:
- 1.0
- Author:
- matt
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.solarnetwork.domain.LocalizedServiceInfo
LocalizedServiceInfo.LocalizedNameComparator -
Field Summary
Fields inherited from interface net.solarnetwork.domain.LocalizedServiceInfo
SORT_BY_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the locale used for this information.Get a localized description of the service.Get a map of other localized information.Get a localized name for the service.Methods inherited from class net.solarnetwork.domain.BasicIdentity
clone, compareTo, equals, getId, hashCodeMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Comparable
compareTo
-
Constructor Details
-
BasicLocalizedServiceInfo
public BasicLocalizedServiceInfo(String id, Locale locale, String name, String description, Map<String, String> infoMessages) Constructor.- Parameters:
id- the unique service identifierlocale- the localename- the localized namedescription- the localized descriptioninfoMessages- the localized info messages
-
-
Method Details
-
getLocale
Description copied from interface:LocalizedServiceInfoGet the locale used for this information.- Specified by:
getLocalein interfaceLocalizedServiceInfo- Returns:
- the locale
-
getLocalizedName
Description copied from interface:LocalizedServiceInfoGet a localized name for the service.- Specified by:
getLocalizedNamein interfaceLocalizedServiceInfo- Returns:
- the service name
-
getLocalizedDescription
Description copied from interface:LocalizedServiceInfoGet a localized description of the service.- Specified by:
getLocalizedDescriptionin interfaceLocalizedServiceInfo- Returns:
- the service description
-
getLocalizedInfoMessages
Description copied from interface:LocalizedServiceInfoGet a map of other localized information.The keys in the returned map are service-dependent and defined in advance so they are well-known. The values represent localized messages associated with those well-known keys.
- Specified by:
getLocalizedInfoMessagesin interfaceLocalizedServiceInfo- Returns:
- a map of messages, never null
-