Class BasicTitleSettingSpecifier
java.lang.Object
net.solarnetwork.settings.support.BaseSettingSpecifier
net.solarnetwork.settings.support.BaseKeyedSettingSpecifier<String>
net.solarnetwork.settings.support.BasicTitleSettingSpecifier
- All Implemented Interfaces:
KeyedSettingSpecifier<String>,MappableSpecifier,MarkupSetting,SettingSpecifier,TitleSettingSpecifier
- Direct Known Subclasses:
BasicTextFieldSettingSpecifier
public class BasicTitleSettingSpecifier
extends BaseKeyedSettingSpecifier<String>
implements TitleSettingSpecifier
Basic implemtation of
TitleSettingSpecifier.- Version:
- 1.2
- Author:
- matt
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.solarnetwork.settings.MappableSpecifier
MappableSpecifier.Mapper -
Constructor Summary
ConstructorsConstructorDescriptionBasicTitleSettingSpecifier(String key, String defaultValue) Constructor.BasicTitleSettingSpecifier(String key, String defaultValue, boolean trans) Constructor.BasicTitleSettingSpecifier(String key, String defaultValue, boolean trans, boolean markup) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionAn optional mapping of possible values for this setting to associated titles.booleanisMarkup()Flag indicating the setting value contains markup such as HTML, Markdown, and so on.Return a setting specifier mapped to a new path, using aMappableSpecifier.Mapper.mappedWithPlaceholer(String template) Return a setting specifier mapped to a new path, using a format template.voidsetMarkup(boolean markup) Set the markup flag.voidsetValueTitles(Map<String, String> valueTitles) Methods inherited from class net.solarnetwork.settings.support.BaseKeyedSettingSpecifier
getDefaultValue, getDescriptionArguments, getKey, isTransient, mappedTo, setDefaultValue, setDescriptionArguments, setKey, setTransient, toStringMethods inherited from class net.solarnetwork.settings.support.BaseSettingSpecifier
getTitle, getType, setTitleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.solarnetwork.settings.KeyedSettingSpecifier
getDefaultValue, getDescriptionArguments, getKey, isTransientMethods inherited from interface net.solarnetwork.settings.MappableSpecifier
mappedToMethods inherited from interface net.solarnetwork.settings.SettingSpecifier
getTitle, getType
-
Constructor Details
-
BasicTitleSettingSpecifier
Constructor.- Parameters:
key- the keydefaultValue- the default value
-
BasicTitleSettingSpecifier
Constructor.- Parameters:
key- the keydefaultValue- the default valuetrans- the transient flag value
-
BasicTitleSettingSpecifier
Constructor.- Parameters:
key- the keydefaultValue- the default valuetrans- the transient flag valuemarkup- the markup flag value- Since:
- 1.2
-
-
Method Details
-
getValueTitles
Description copied from interface:TitleSettingSpecifierAn optional mapping of possible values for this setting to associated titles.This can be used to display user-friendly titles for setting values if the setting value itself is cryptic.
- Specified by:
getValueTitlesin interfaceTitleSettingSpecifier- Returns:
- the setting value titles
-
isMarkup
public boolean isMarkup()Description copied from interface:MarkupSettingFlag indicating the setting value contains markup such as HTML, Markdown, and so on.- Specified by:
isMarkupin interfaceMarkupSetting- Returns:
- true if the setting value contains markup, false for plain text
-
mappedWithPlaceholer
Description copied from interface:MappableSpecifierReturn a setting specifier mapped to a new path, using a format template.- Specified by:
mappedWithPlaceholerin interfaceMappableSpecifier- Parameters:
template- the format template- Returns:
- the new instance
-
mappedWithMapper
Description copied from interface:MappableSpecifierReturn a setting specifier mapped to a new path, using aMappableSpecifier.Mapper.- Specified by:
mappedWithMapperin interfaceMappableSpecifier- Parameters:
mapper- the mapper- Returns:
- the new instance
-
setValueTitles
-
setMarkup
public void setMarkup(boolean markup) Set the markup flag.- Parameters:
markup- true if the setting value contains markup, false for plain text- Since:
- 1.2
-