@ParametersAreNonnullByDefault public interface ImmutableConfig
BackendFactories and StoreFactory.| Modifier and Type | Method and Description |
|---|---|
String |
getMapping()
Returns the defined mapping.
|
String |
getName()
Returns the name of the
BackendFactory associated with this configuration. |
default <T> Optional<T> |
getOption(String key)
Returns the value of the
key. |
Map<String,?> |
getOptions()
Returns all defined options.
|
default Map<String,?> |
getOptions(Predicate<String> keyFilter)
Returns a sub-map of all defined options filtered with the given
keyFilter. |
Set<Store> |
getStores()
Returns a set of all defined
Store. |
String |
getVariant()
Returns the variant of the
BackendFactory binding. |
default boolean |
hasOption(String key)
Returns
true if the key is defined. |
default boolean |
isReadOnly()
Returns
true if the "read-only" mode is defined. |
void |
save(Path directory)
Saves this configuration in the
directory. |
Map<String,?> |
toMap()
Returns a immutable map view of this configuration.
|
void save(Path directory) throws IOException
directory.directory - the directory where to store the configurationIOException - if an I/O error occurs during the saving@Nonnull Map<String,?> toMap()
Resource.load(Map),
Resource.save(Map)@Nonnull String getName()
BackendFactory associated with this configuration.BackendFactory.name()@Nonnull String getVariant()
BackendFactory binding.@Nonnull String getMapping()
InvalidConfigException - if the mapping is not defineddefault boolean hasOption(String key)
true if the key is defined.key - the key to check the declarationtrue if the key is defineddefault <T> Optional<T> getOption(String key)
key.key - the key of the valueOptional containing the value, or Optional.empty() if the key is not defined@Nonnull default Map<String,?> getOptions(Predicate<String> keyFilter)
keyFilter.keyFilter - the predicate to filter the optionskeyFilter@Nonnull Map<String,?> getOptions()
@Nonnull Set<Store> getStores()
Store.default boolean isReadOnly()
true if the "read-only" mode is defined.true if the "read-only" mode is definedCopyright © 2013–2019 Atlanmod. All rights reserved.