Package org.uberfire.preferences.shared
Interface PreferenceScopeTypes
-
- All Known Implementing Classes:
DefaultPreferenceScopeTypes
public interface PreferenceScopeTypesDefines which scopes are supported by the preference API. If no backend implementation for this class exists, a default one will be provided.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetDefaultKeyFor(String type)Returns the default key for a type.booleantypeRequiresKey(String type)Checks if a scope type requires a custom key.
-
-
-
Method Detail
-
typeRequiresKey
boolean typeRequiresKey(String type) throws InvalidPreferenceScopeException
Checks if a scope type requires a custom key.- Parameters:
type- Type to check.- Returns:
- true if the type requires a custom key or false if it has a default one.
- Throws:
InvalidPreferenceScopeException- if the type passed is invalid.
-
getDefaultKeyFor
String getDefaultKeyFor(String type) throws InvalidPreferenceScopeException
Returns the default key for a type. Throws a exception if the type requires a custom one.- Parameters:
type- Type to check.- Returns:
- Default key for the type (or null if there is not one).
- Throws:
InvalidPreferenceScopeException- if the type passed is invalid.
-
-