public class SaveOptions extends Object
Resource.save(Map).
Clients should create options by means of SaveOptions.newBuilder() and
subsequent calls to configure the result or SaveOptions.defaultOptions().
The options map may be populated via toOptionsMap() or addTo(Map).
Clients are free to extend this interface and the respective builder implementation.| Modifier and Type | Class and Description |
|---|---|
static class |
SaveOptions.Builder
Allows to create new
SaveOptions in a readable manner. |
| Modifier | Constructor and Description |
|---|---|
protected |
SaveOptions(boolean formatting,
boolean validating) |
| Modifier and Type | Method and Description |
|---|---|
void |
addTo(Map<Object,Object> saveOptions)
Configures the save options into the given map.
|
static SaveOptions |
defaultOptions()
This is equal to
builder().getOptions(). |
boolean |
equals(Object obj) |
static SaveOptions |
getOptions(Map<?,?> saveOptions)
Transparently handles the deprecated options that could be passed as
map-entries to
Resource.save(Map)
and converts them to semantically equal SaveOptions. |
int |
hashCode() |
boolean |
isFormatting() |
boolean |
isValidating() |
static SaveOptions.Builder |
newBuilder() |
Map<Object,Object> |
toOptionsMap() |
String |
toString() |
protected static final String KEY
public static SaveOptions getOptions(Map<?,?> saveOptions)
Resource.save(Map)
and converts them to semantically equal SaveOptions.saveOptions - the options-map or null if none.null.public void addTo(Map<Object,Object> saveOptions)
saveOptions - the options to be modified. May not be null.public boolean isFormatting()
public boolean isValidating()
public static SaveOptions.Builder newBuilder()
public static SaveOptions defaultOptions()
builder().getOptions().Copyright © 2015. All Rights Reserved.