Interface BasePreference<T>
-
- Type Parameters:
T- The preference bean type implementing the interface.
- All Superinterfaces:
Preference
- All Known Subinterfaces:
BasePreferenceBean<T>,BasePreferencePortable<T>
- All Known Implementing Classes:
PortablePreferenceMock,PortablePreferenceMockBeanGeneratedImpl,PortablePreferenceMockPortableGeneratedImpl
public interface BasePreference<T> extends Preference
Interface that all preference beans should implement. It allows load and save operations when injecting it through CDI. The methods in this class are only really implemented by a generated preference bean, that will be the one injected by CDI.
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default TdefaultValue(T defaultValue)Returns the default value of this preference object.default voidload()Loads the preference content recursively through its properties.default voidload(org.uberfire.mvp.ParameterizedCommand<Throwable> errorCallback)Loads the preference content recursively through its properties.default voidload(org.uberfire.mvp.ParameterizedCommand<T> successCallback, org.uberfire.mvp.ParameterizedCommand<Throwable> errorCallback)Loads the preference content recursively through its properties.default voidload(PreferenceScopeResolutionStrategyInfo customScopeResolutionStrategy)Loads the preference content recursively through its properties.default voidload(PreferenceScopeResolutionStrategyInfo customScopeResolutionStrategy, org.uberfire.mvp.ParameterizedCommand<Throwable> errorCallback)Loads the preference content recursively through its properties.default voidload(PreferenceScopeResolutionStrategyInfo customScopeResolutionStrategy, org.uberfire.mvp.ParameterizedCommand<T> successCallback, org.uberfire.mvp.ParameterizedCommand<Throwable> errorCallback)Loads the preference content recursively through its properties.default voidsave()Saves the preference content recursively through its properties.default voidsave(org.uberfire.mvp.Command successCallback, org.uberfire.mvp.ParameterizedCommand<Throwable> errorCallback)Saves the preference content recursively through its properties.default voidsave(org.uberfire.mvp.ParameterizedCommand<Throwable> errorCallback)Saves the preference content recursively through its properties.default voidsave(PreferenceScopeResolutionStrategyInfo customScopeResolutionStrategy)Saves the preference content recursively through its properties.default voidsave(PreferenceScopeResolutionStrategyInfo customScopeResolutionStrategy, org.uberfire.mvp.Command successCallback, org.uberfire.mvp.ParameterizedCommand<Throwable> errorCallback)Saves the preference content recursively through its properties.default voidsave(PreferenceScopeResolutionStrategyInfo customScopeResolutionStrategy, org.uberfire.mvp.ParameterizedCommand<Throwable> errorCallback)Saves the preference content recursively through its properties.default voidsave(PreferenceScope customScope)Saves the preference content recursively through its properties.default voidsave(PreferenceScope customScope, org.uberfire.mvp.Command successCallback, org.uberfire.mvp.ParameterizedCommand<Throwable> errorCallback)Saves the preference content recursively through its properties.default voidsave(PreferenceScope customScope, org.uberfire.mvp.ParameterizedCommand<Throwable> errorCallback)Saves the preference content recursively through its properties.
-
-
-
Method Detail
-
load
default void load()
Loads the preference content recursively through its properties.
-
load
default void load(org.uberfire.mvp.ParameterizedCommand<Throwable> errorCallback)
Loads the preference content recursively through its properties.- Parameters:
errorCallback- Error callback that returns the exception that occurred (if any).
-
load
default void load(org.uberfire.mvp.ParameterizedCommand<T> successCallback, org.uberfire.mvp.ParameterizedCommand<Throwable> errorCallback)
Loads the preference content recursively through its properties.- Parameters:
successCallback- Success callback that returns the loaded preference.errorCallback- Error callback that returns the exception that occurred (if any).
-
load
default void load(PreferenceScopeResolutionStrategyInfo customScopeResolutionStrategy)
Loads the preference content recursively through its properties.- Parameters:
customScopeResolutionStrategy- Custom preference scope resolution strategy to be used.
-
load
default void load(PreferenceScopeResolutionStrategyInfo customScopeResolutionStrategy, org.uberfire.mvp.ParameterizedCommand<Throwable> errorCallback)
Loads the preference content recursively through its properties.- Parameters:
customScopeResolutionStrategy- Custom preference scope resolution strategy to be used.errorCallback- Error callback that returns the exception that occurred (if any).
-
load
default void load(PreferenceScopeResolutionStrategyInfo customScopeResolutionStrategy, org.uberfire.mvp.ParameterizedCommand<T> successCallback, org.uberfire.mvp.ParameterizedCommand<Throwable> errorCallback)
Loads the preference content recursively through its properties.- Parameters:
customScopeResolutionStrategy- Custom preference scope resolution strategy to be used.successCallback- Success callback that returns the loaded preference.errorCallback- Error callback that returns the exception that occurred (if any).
-
save
default void save()
Saves the preference content recursively through its properties.
-
save
default void save(org.uberfire.mvp.ParameterizedCommand<Throwable> errorCallback)
Saves the preference content recursively through its properties.- Parameters:
errorCallback- Error callback that returns the exception that occurred (if any).
-
save
default void save(org.uberfire.mvp.Command successCallback, org.uberfire.mvp.ParameterizedCommand<Throwable> errorCallback)Saves the preference content recursively through its properties.- Parameters:
successCallback- Success callback that indicates that the preference was saved.errorCallback- Error callback that returns the exception that occurred (if any).
-
save
default void save(PreferenceScopeResolutionStrategyInfo customScopeResolutionStrategy)
Saves the preference content recursively through its properties.- Parameters:
customScopeResolutionStrategy- Custom preference scope resolution strategy to be used.
-
save
default void save(PreferenceScopeResolutionStrategyInfo customScopeResolutionStrategy, org.uberfire.mvp.ParameterizedCommand<Throwable> errorCallback)
Saves the preference content recursively through its properties.- Parameters:
customScopeResolutionStrategy- Custom preference scope resolution strategy to be used.errorCallback- Error callback that returns the exception that occurred (if any).
-
save
default void save(PreferenceScopeResolutionStrategyInfo customScopeResolutionStrategy, org.uberfire.mvp.Command successCallback, org.uberfire.mvp.ParameterizedCommand<Throwable> errorCallback)
Saves the preference content recursively through its properties.- Parameters:
customScopeResolutionStrategy- Custom preference scope resolution strategy to be used.successCallback- Success callback that indicates that the preference was saved.errorCallback- Error callback that returns the exception that occurred (if any).
-
save
default void save(PreferenceScope customScope)
Saves the preference content recursively through its properties.- Parameters:
customScope- Custom preference scope to be used.
-
save
default void save(PreferenceScope customScope, org.uberfire.mvp.ParameterizedCommand<Throwable> errorCallback)
Saves the preference content recursively through its properties.- Parameters:
customScope- Custom preference scope to be used.errorCallback- Error callback that returns the exception that occurred (if any).
-
save
default void save(PreferenceScope customScope, org.uberfire.mvp.Command successCallback, org.uberfire.mvp.ParameterizedCommand<Throwable> errorCallback)
Saves the preference content recursively through its properties.- Parameters:
customScope- Custom preference scope to be used.successCallback- Success callback that indicates that the preference was saved.errorCallback- Error callback that returns the exception that occurred (if any).
-
defaultValue
default T defaultValue(T defaultValue)
Returns the default value of this preference object. All users will start with this value unless they change it.- Parameters:
defaultValue- Preference to be filled and returned. It contains all child preferences already instantiated.- Returns:
- The defaultValue received as parameter, just with its value updated. Null if there is not a default value.
-
-