org.exoplatform.commons.api.settings
Interface SettingService


public interface SettingService

This Service allow to store and remove a value associated with a key in JCR


Method Summary
 SettingValue<?> get(Context context, Scope scope, String key)
          get values associated with the composite key (context,scope,key) in the database
 void remove(Context context)
          remove all the value asscociated with the specified context in the database
 void remove(Context context, Scope scope)
          remove all the value associated with the specified context and specified scope in the database.
 void remove(Context context, Scope scope, String key)
          remove the SettingValue associated with the specified composite key
 void set(Context context, Scope scope, String key, SettingValue<?> value)
          set the specified value with the key which is composed by context, scope, key.
 

Method Detail

set

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

Parameters:
context - context with which the specified value is to be associated
scope - scope with which the specified value is to be associated
key - key with which the specified value is to be associated
value - value to be associated with the specified key.

remove

void remove(Context context,
            Scope scope,
            String key)
remove the SettingValue associated with the specified composite key

Parameters:
context - context with which the specified value is to be associated
scope - scope with which the specified value is to be associated
key - key with which the specified value is to be associated

remove

void remove(Context context,
            Scope scope)
remove all the value associated with the specified context and specified scope in the database.

Parameters:
context - context with which the specified value is to be associated. The context type must be USER and context.id must be not null.
scope - scope with which the specified value is to be associated. The scope.id must be not null.

remove

void remove(Context context)
remove all the value asscociated with the specified context in the database

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

get

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

Parameters:
context - context with which the specified value is to be associated. The context type must be USER and context.id must be not null.
scope - scope with which the specified value is to be associated. The scope.id must be not null.
key - key with which the specified value is to be associated


Copyright © 2003-2013 eXo Platform SAS. All Rights Reserved.