public interface SettingService
Modifier and Type | Method and Description |
---|---|
default long |
countContextsByType(String contextType)
Returns the total count of contexts by type
|
SettingValue<?> |
get(Context context,
Scope scope,
String key)
Gets values associated with a specified composite key (context, scope, key) in
the database.
|
default List<String> |
getContextNamesByType(String contextType,
int offset,
int limit)
Returns context names by type
|
List<Context> |
getContextsByTypeAndScopeAndSettingName(String contextType,
String scopeType,
String scopeName,
String settingName,
int offset,
int limit)
Gets a list of names of contexts of a chosen type that have a setting
associated to a dedicated scope
|
Set<String> |
getEmptyContextsByTypeAndScopeAndSettingName(String contextType,
String scopeType,
String scopeName,
String settingName,
int offset,
int limit)
Gets a list of names of contexts of a chosen type that doesn't have
settings associated to a dedicated scope
|
Map<Scope,Map<String,SettingValue<String>>> |
getSettingsByContext(Context context)
Get settings related to a scope and a context
|
void |
remove(Context context)
Removes all values associated with a specified context from the database.
|
void |
remove(Context context,
Scope scope)
Removes all values associated with a specified context and
scope from the database.
|
void |
remove(Context context,
Scope scope,
String key)
Removes a value associated with a specified composite key.
|
void |
save(Context context)
Saves a
Context on database |
void |
set(Context context,
Scope scope,
String key,
SettingValue<?> value)
Sets a value with the key that is composed by context, scope,
key.
|
void set(Context context, Scope scope, String key, SettingValue<?> value)
context
- The context with which the specified value is associated.scope
- The scope with which the specified value is associated.key
- The key with which the specified value is associated.value
- The value associated with the specified key.void remove(Context context, Scope scope, String key)
context
- The context with which the specified value is associated.scope
- The scope with which the specified value is associated.key
- The key with which the specified value is associated.void remove(Context context, Scope scope)
context
- The context with which the specified value is associated.
The context type must be USER and context, and Id must not be "null".scope
- The scope with which the specified value is associated. The
scope.id must not be "null".void remove(Context context)
context
- The context with which the specified value is associated.
The context type must be USER and context, and Id must not be "null".SettingValue<?> get(Context context, Scope scope, String key)
context
- The context with which the specified value is associated.
The context type must be USER and context and Id must not be "null".scope
- The scope with which the specified value is associated. The
scope.id must not be "null".key
- The key with which the specified value is associated.default long countContextsByType(String contextType)
contextType
- context type name ('USER' OR 'GLOBAL')default List<String> getContextNamesByType(String contextType, int offset, int limit)
contextType
- context type name ('USER' OR 'GLOBAL')offset
- query offsetlimit
- query max resultsMap<Scope,Map<String,SettingValue<String>>> getSettingsByContext(Context context)
context
- Context
used to search settingsMap
of settings with key = setting name and as value =
corresponding SettingValue
List<Context> getContextsByTypeAndScopeAndSettingName(String contextType, String scopeType, String scopeName, String settingName, int offset, int limit)
Set<String> getEmptyContextsByTypeAndScopeAndSettingName(String contextType, String scopeType, String scopeName, String settingName, int offset, int limit)
Copyright © 2003–2019 eXo Platform SAS. All rights reserved.