Class BasicGroupSettingSpecifier
java.lang.Object
net.solarnetwork.settings.support.BaseSettingSpecifier
net.solarnetwork.settings.support.BasicGroupSettingSpecifier
- All Implemented Interfaces:
GroupSettingSpecifier,MappableSpecifier,SettingSpecifier
public class BasicGroupSettingSpecifier
extends BaseSettingSpecifier
implements GroupSettingSpecifier
Basic implementation of
GroupSettingSpecifier.- Version:
- 1.0
- Author:
- matt
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.solarnetwork.settings.MappableSpecifier
MappableSpecifier.Mapper -
Constructor Summary
ConstructorsConstructorDescriptionBasicGroupSettingSpecifier(String groupKey, List<SettingSpecifier> settings) Construct with the group settings.BasicGroupSettingSpecifier(String groupKey, List<SettingSpecifier> settings, boolean dynamic) Construct with settings and dynamic flag.BasicGroupSettingSpecifier(String groupKey, List<SettingSpecifier> settings, boolean dynamic, String footerText) Construct with values.BasicGroupSettingSpecifier(List<SettingSpecifier> settings) Construct without a key. -
Method Summary
Modifier and TypeMethodDescriptionLocalizable text to display at the end of the group's content.Get the settings in this group.getKey()Get the key for this setting.booleanGet dynamic flag.Return a setting specifier mapped to a new path.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.toString()Methods 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.SettingSpecifier
getTitle, getType
-
Constructor Details
-
BasicGroupSettingSpecifier
Construct without a key. Thedynamicproperty will be set to false.- Parameters:
settings- The group settings.
-
BasicGroupSettingSpecifier
Construct with the group settings. Thedynamicproperty will be set to false.- Parameters:
groupKey- The key for the entire group.settings- The group settings.
-
BasicGroupSettingSpecifier
public BasicGroupSettingSpecifier(String groupKey, List<SettingSpecifier> settings, boolean dynamic) Construct with settings and dynamic flag.- Parameters:
groupKey- The key for the entire group.settings- The group settings.dynamic- The dynamic flag.
-
BasicGroupSettingSpecifier
public BasicGroupSettingSpecifier(String groupKey, List<SettingSpecifier> settings, boolean dynamic, String footerText) Construct with values.- Parameters:
groupKey- The key for the entire group.settings- The group settings.dynamic- The dynamic flag.footerText- The footer text.
-
-
Method Details
-
getGroupSettings
Description copied from interface:GroupSettingSpecifierGet the settings in this group.- Specified by:
getGroupSettingsin interfaceGroupSettingSpecifier- Returns:
- the list of group settings
-
isDynamic
public boolean isDynamic()Description copied from interface:GroupSettingSpecifierGet dynamic flag. A dynamic group is one that a user can manage any number of copies of the group settings, adding and removing as necessary.- Specified by:
isDynamicin interfaceGroupSettingSpecifier- Returns:
- The dynamic flag.
-
getKey
Description copied from interface:GroupSettingSpecifierGet the key for this setting.- Specified by:
getKeyin interfaceGroupSettingSpecifier- Returns:
- the key to associate with this setting
-
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
-
mappedTo
Description copied from interface:MappableSpecifierReturn a setting specifier mapped to a new path.This is to allow delegating setting specifiers to re-map the key.
- Specified by:
mappedToin interfaceMappableSpecifier- Parameters:
prefix- the new prefix to add to the key- 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
-
toString