public final class SettingSet
extends java.lang.Object
SettingsManager.getSuiteSettings
, while system settings can be retrieved via
SettingsManager.getSystemSettings
.
SettingSets are structured into logically related groups. Each group consists of
a bunch of single settings, represented by instances of Setting
.
Modifier | Constructor and Description |
---|---|
protected |
SettingSet()
Non-public constructor to prevent developers from trying to create a
SettingSet instance.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
checkForError()
Checks if a given SettingsSet contains a mutually exclusive combination of
setting values.
|
java.lang.String[] |
checkForWarnings()
Checks if a given SettingsSet contains a potentially dangerous combination
of setting values.
|
java.util.List<SettingGroup> |
getGroups()
Retrieves a list of all SettingGroups.
|
SettingGroup |
getSettingGroup(java.lang.String title)
Retrieves a single
SettingGroup identifed by the specified title. |
void |
save()
Saves suite's (or system's) SettingsSet.
|
protected SettingSet()
public java.util.List<SettingGroup> getGroups()
public SettingGroup getSettingGroup(java.lang.String title)
SettingGroup
identifed by the specified title.title
- the title of the SettingGroup
to be retrievedSettingGroup
or null if it does not existpublic java.lang.String checkForError()
null
.
Only first error will be reported.
SettingSet containing mutually exclusive combinations can not be saved.null
if there are no errors.public java.lang.String[] checkForWarnings()
null
.null
if there are no warnings.public void save() throws java.lang.IllegalStateException
checkForError
. A SettingSet won't be saved if there
are errors.
Also a SettingsSet should be checked for warnings.
If settings saved successfully and there has been changes to the
SettingSet, then notification method
SettingsListener.notifySettingsChenged
is called for all registered listeners. A call to save()
after
no changes have been performed has no effect and should not cause a
notification.java.lang.IllegalStateException
- if settings contain errors.Copyright (c) 2013, Oracle and/or its affiliates. All Rights Reserved. Use of this specification is subject to license terms.