org.exoplatform.commons.api.settings
Interface SettingService


public interface SettingService

Stores and removes a value associated with a key in JCR.


Method Summary
 SettingValue<?> get(Context context, Scope scope, String key)
          Gets values associated with a specified composite key (context, scope, key) in the database.
 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 set(Context context, Scope scope, String key, SettingValue<?> value)
          Sets a value with the key that is composed by context, scope, key.
 

Method Detail

set

void set(Context context,
         Scope scope,
         String key,
         SettingValue<?> value)
Sets a value with the key that is composed by context, scope, key. The value will be saved in the database.

Parameters:
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.

remove

void remove(Context context,
            Scope scope,
            String key)
Removes a value associated with a specified composite key.

Parameters:
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.

remove

void remove(Context context,
            Scope scope)
Removes all values associated with a specified context and scope from the database.

Parameters:
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".

remove

void remove(Context context)
Removes all values associated with a specified context from the database.

Parameters:
context - The context with which the specified value is associated. The context type must be USER and context, and Id must not be "null".

get

SettingValue<?> get(Context context,
                    Scope scope,
                    String key)
Gets values associated with a specified composite key (context, scope, key) in the database.

Parameters:
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.


Copyright © 2003–2014 eXo Platform SAS. All rights reserved.