Package ro.sync.ecss.extensions.api
Interface OptionsStorage
-
@API(type=NOT_EXTENDABLE, src=PUBLIC) public interface OptionsStorage
This interface should be used if Author extension level options need to be stored and retrieved.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addOptionListener(OptionListener listener)
Adds anOptionListener
to the current set of options.java.lang.String
getOption(java.lang.String key, java.lang.String defaultValue)
Provides the value of the option associated with the specified key.void
removeOptionListener(OptionListener listener)
Removes an option listener from the current set of option listeners.void
setOption(java.lang.String key, java.lang.String value)
Modifies the value of an option.void
setOptionsDoctypePrefix(java.lang.String optionsDoctypePrefix)
Sets the options doctype prefix which is used to prefix options like a namespace.
-
-
-
Method Detail
-
setOptionsDoctypePrefix
void setOptionsDoctypePrefix(java.lang.String optionsDoctypePrefix)
Sets the options doctype prefix which is used to prefix options like a namespace.- Parameters:
optionsDoctypePrefix
- The document type prefix used to build the options keys. This should not benull
.
-
addOptionListener
void addOptionListener(OptionListener listener)
Adds anOptionListener
to the current set of options. The listener is notified when the value of its associated option changes.- Parameters:
listener
- TheOptionListener
to be added.
-
removeOptionListener
void removeOptionListener(OptionListener listener)
Removes an option listener from the current set of option listeners.- Parameters:
listener
- TheOptionListener
to be removed.
-
getOption
java.lang.String getOption(java.lang.String key, java.lang.String defaultValue)
Provides the value of the option associated with the specified key.- Parameters:
key
- The key that uniquely identifies an option.defaultValue
- The default value for the specified option.- Returns:
- The value of the specified option or the default value if the option has not been set yet.
-
setOption
void setOption(java.lang.String key, java.lang.String value)
Modifies the value of an option. If the supplied value isnull
The option will be removed from storage.- Parameters:
key
- The key of the option whose value is to be modified.value
- The new value of the option. Ifnull
the option will be removed from the storage.
-
-