public class JsonPreferencesPersistor extends AbstractMapBasedPreferencesPersistor
application, DEFAULT_EXTENSION, KEY_PREFERENCES_PERSISTOR_LOCATION, metadata
Constructor and Description |
---|
JsonPreferencesPersistor(GriffonApplication application,
Metadata metadata) |
Modifier and Type | Method and Description |
---|---|
protected org.json.JSONObject |
doRead(InputStream inputStream) |
protected Collection |
expand(org.json.JSONArray array) |
Preferences |
read(PreferencesManager preferencesManager) |
protected void |
readInto(org.json.JSONObject json,
PreferencesNode node) |
protected String |
resolveExtension() |
protected void |
write(Map<String,Object> map,
OutputStream outputStream) |
convertToWritableValue, defaultConvertToWritableValue, read, readInto, write, writeTo
inputStream, outputStream, resolveFile, resolvePreferencesFileName
@Inject public JsonPreferencesPersistor(@Nonnull GriffonApplication application, @Nonnull Metadata metadata)
@Nonnull protected String resolveExtension()
resolveExtension
in class AbstractPreferencesPersistor
@Nonnull public Preferences read(@Nonnull PreferencesManager preferencesManager) throws IOException
read
in interface PreferencesPersistor
read
in class AbstractMapBasedPreferencesPersistor
IOException
protected void readInto(@Nonnull org.json.JSONObject json, @Nonnull PreferencesNode node)
@Nonnull protected Collection expand(@Nonnull org.json.JSONArray array)
@Nonnull protected org.json.JSONObject doRead(@Nonnull InputStream inputStream) throws IOException
IOException
protected void write(@Nonnull Map<String,Object> map, @Nonnull OutputStream outputStream) throws IOException
write
in class AbstractMapBasedPreferencesPersistor
IOException