com.opera.core.systems.scope.services.ums
Class Prefs

java.lang.Object
  extended by com.opera.core.systems.scope.AbstractService
      extended by com.opera.core.systems.scope.services.ums.Prefs
All Implemented Interfaces:
IPrefs

public class Prefs
extends AbstractService
implements IPrefs


Field Summary
 
Fields inherited from class com.opera.core.systems.scope.AbstractService
services
 
Constructor Summary
Prefs(ScopeServices services, String version)
           
 
Method Summary
 String getPref(String section, String key, PrefsProtos.GetPrefArg.Mode mode)
          Gets a preference from the operaprefs.ini from a specific section.
 void init()
           
 List<PrefsProtos.Pref> listPrefs(Boolean sort, String section)
          Lists the preferences in a specific section from operaprefs.ini.
 void setPrefs(String section, String key, String value)
          Sets a preference in operaprefs.ini in a specific section.
 
Methods inherited from class com.opera.core.systems.scope.AbstractService
buildPayload, executeCommand, executeCommand, getVersion, isVersionInRange, sleep, xpathIterator, xpathPointer, xpathQuery
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Prefs

public Prefs(ScopeServices services,
             String version)
Method Detail

init

public void init()
Specified by:
init in interface IPrefs

getPref

public String getPref(String section,
                      String key,
                      PrefsProtos.GetPrefArg.Mode mode)
Description copied from interface: IPrefs
Gets a preference from the operaprefs.ini from a specific section. Optionally it can get the default setting of the preference.

Specified by:
getPref in interface IPrefs
Parameters:
section - section to get the preference from
key - key in the section
mode - get the current or default setting of the preference
Returns:
returns the preference in a string

listPrefs

public List<PrefsProtos.Pref> listPrefs(Boolean sort,
                                        String section)
Description copied from interface: IPrefs
Lists the preferences in a specific section from operaprefs.ini.

Specified by:
listPrefs in interface IPrefs
Parameters:
sort - if true returned list is sorted
section - list prefs in this section
Returns:
a list of preferences in a particular section

setPrefs

public void setPrefs(String section,
                     String key,
                     String value)
Description copied from interface: IPrefs
Sets a preference in operaprefs.ini in a specific section.

Specified by:
setPrefs in interface IPrefs
Parameters:
section - the section name
key - the key in the section
value - value to set this preference to


Copyright © 2012. All Rights Reserved.