org.apache.felix.prefs.impl
Class PreferencesServiceImpl

java.lang.Object
  extended by org.apache.felix.prefs.impl.PreferencesServiceImpl
All Implemented Interfaces:
PreferencesService

public class PreferencesServiceImpl
extends Object
implements PreferencesService

This is an implementation of the OSGI Preferences Service, Version 1.1.


Field Summary
protected  Long bundleId
          The service id for the bundle this service belongs to.
protected  BackingStoreManager storeManager
          The backing store manager.
protected  PreferencesImpl systemTree
          This is the system preferences tree.
protected  Map trees
          This is the map containing the user preferences trees.
 
Constructor Summary
PreferencesServiceImpl(Long id, BackingStoreManager storeManager)
           
 
Method Summary
protected  List getAllPreferences()
           
 Preferences getSystemPreferences()
          Returns the root system node for the calling bundle.
 Preferences getUserPreferences(String name)
          Returns the root node for the specified user and the calling bundle.
 String[] getUsers()
          Returns the names of users for which node trees exist.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

systemTree

protected PreferencesImpl systemTree
This is the system preferences tree.


trees

protected final Map trees
This is the map containing the user preferences trees.


bundleId

protected final Long bundleId
The service id for the bundle this service belongs to.


storeManager

protected final BackingStoreManager storeManager
The backing store manager.

Constructor Detail

PreferencesServiceImpl

public PreferencesServiceImpl(Long id,
                              BackingStoreManager storeManager)
Method Detail

getSystemPreferences

public Preferences getSystemPreferences()
Description copied from interface: PreferencesService
Returns the root system node for the calling bundle.

Specified by:
getSystemPreferences in interface PreferencesService
Returns:
The root system node for the calling bundle.
See Also:
PreferencesService.getSystemPreferences()

getUserPreferences

public Preferences getUserPreferences(String name)
Description copied from interface: PreferencesService
Returns the root node for the specified user and the calling bundle.

Specified by:
getUserPreferences in interface PreferencesService
Parameters:
name - The user for which to return the preference root node.
Returns:
The root node for the specified user and the calling bundle.
See Also:
PreferencesService.getUserPreferences(java.lang.String)

getUsers

public String[] getUsers()
Description copied from interface: PreferencesService
Returns the names of users for which node trees exist.

Specified by:
getUsers in interface PreferencesService
Returns:
The names of users for which node trees exist.
See Also:
PreferencesService.getUsers()

getAllPreferences

protected List getAllPreferences()


Copyright © 2011 Apache Software Foundation. All Rights Reserved.