Package org.codice.ddf.preferences.impl
Class PreferencesImpl
java.lang.Object
org.codice.ddf.preferences.impl.PreferencesImpl
- All Implemented Interfaces:
org.codice.ddf.preferences.Preferences
This stores each preference as a JSON string regardless of the underlying type. This allows every
preference to be treated the same way.
This implementation pulls in instances of DefaultPreferencesSupplier that are used to populate the preferences if it does not already exist in the catalog. This allows new preferences and its default value to defined by new modules.
This implementation pulls in instances of PostRetrievalPlugin that are applied to the preferences everytime they are queried.
-
Constructor Summary
ConstructorsConstructorDescriptionPreferencesImpl(ddf.catalog.CatalogFramework catalogFramework, ddf.catalog.filter.FilterBuilder filterBuilder, org.codice.ddf.platform.util.uuidgenerator.UuidGenerator uuidGenerator, List<org.codice.ddf.preferences.PostRetrievalPlugin> postRetrievalPlugins, List<org.codice.ddf.preferences.DefaultPreferencesSupplier> defaultPreferencesSuppliers, List<ddf.catalog.data.InjectableAttribute> injectableAttributes) -
Method Summary
-
Constructor Details
-
PreferencesImpl
public PreferencesImpl(ddf.catalog.CatalogFramework catalogFramework, ddf.catalog.filter.FilterBuilder filterBuilder, org.codice.ddf.platform.util.uuidgenerator.UuidGenerator uuidGenerator, List<org.codice.ddf.preferences.PostRetrievalPlugin> postRetrievalPlugins, List<org.codice.ddf.preferences.DefaultPreferencesSupplier> defaultPreferencesSuppliers, List<ddf.catalog.data.InjectableAttribute> injectableAttributes)
-
-
Method Details
-
add
public void add(Map<String, Object> preferences, String userId) throws org.codice.ddf.preferences.PreferencesException- Specified by:
addin interfaceorg.codice.ddf.preferences.Preferences- Throws:
org.codice.ddf.preferences.PreferencesException
-
get
- Specified by:
getin interfaceorg.codice.ddf.preferences.Preferences- Throws:
org.codice.ddf.preferences.PreferencesException
-