@ApplicationScoped public class DefaultPreferenceScopeTypes extends Object implements PreferenceScopeTypes
PreferenceScopeTypes
. To override it, just provide a default
CDI bean that implements PreferenceScopeTypes
.Modifier and Type | Class and Description |
---|---|
protected static interface |
DefaultPreferenceScopeTypes.DefaultKey |
Modifier | Constructor and Description |
---|---|
protected |
DefaultPreferenceScopeTypes() |
|
DefaultPreferenceScopeTypes(UsernameProvider usernameProvider) |
Modifier and Type | Method and Description |
---|---|
String |
getDefaultKeyFor(String type)
Returns the default key for a type.
|
protected boolean |
isEmpty(String str) |
boolean |
typeRequiresKey(String type)
Checks if a scope type requires a custom key.
|
protected void |
validateType(String type) |
protected DefaultPreferenceScopeTypes()
@Inject public DefaultPreferenceScopeTypes(UsernameProvider usernameProvider)
public boolean typeRequiresKey(String type) throws InvalidPreferenceScopeException
PreferenceScopeTypes
typeRequiresKey
in interface PreferenceScopeTypes
type
- Type to check.InvalidPreferenceScopeException
- if the type passed is invalid.public String getDefaultKeyFor(String type) throws InvalidPreferenceScopeException
PreferenceScopeTypes
getDefaultKeyFor
in interface PreferenceScopeTypes
type
- Type to check.InvalidPreferenceScopeException
- if the type passed is invalid.protected void validateType(String type) throws InvalidPreferenceScopeException
InvalidPreferenceScopeException
protected boolean isEmpty(String str)
Copyright © 2012–2020 JBoss by Red Hat. All rights reserved.