Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




Eclipse Platform
Release 3.5
Class SecurePreferencesFactory

  extended by

public final class SecurePreferencesFactory
extends Object

Use this class to access secure preferences. Secure preferences allow storage of data in an encrypted form.

This class is not intended to be instantiated or extended by clients.

This class is not intended to be subclassed by clients.
This class is not intended to be instantiated by clients.

Constructor Summary
SecurePreferencesFactory ()
Method Summary
static  ISecurePreferences getDefault ()
          Returns default secure preferences.
static  ISecurePreferences open ( URL location, Map options)
          Returns a secure properties corresponding to the URL locations supplied.
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public SecurePreferencesFactory()
Method Detail


public static 
ISecurePreferences getDefault()
Returns default secure preferences.

The framework will attempt to open secure preferences in a user-specific location. As a result, the information stored can be shared among all programs run by the user. The location is determined as follows:

  1. "-equinox.keyring" command line arguments
  2. Java's "user.home" environment variable. On Windows system it usually corresponds to the %USERPROFILE% environment variable or determined as the parent of user's desktop folder. On Unix Java usually determines it from user's entry in the password file (commonly this corresponds to $HOME environment variable);
  3. if it fails, preferences will use configuration location of the current Eclipse instance.

default instance of secure preferences, null if application was unable to create secure preferences using default location


public static 
ISecurePreferences open(
URL location,
Map options)
Returns a secure properties corresponding to the URL locations supplied. If URL is null, a default location is used.

Note that while this method accepts URLs to account for future expandability of this API, at present the method only accepts "file" URLs that point to a directory. An IOException might be thrown if unsupported URL is passed to this method.

Similarly to the rest of the Equinox, URLs passed as an argument must not be encoded, meaning that spaces should stay as spaces, not as "%x20".

location - URL pointing to the location of secure storage. At present only file URLs are supported. Pass null to use default location
options - use to pass hints to the secure preferences implementation. Pass null if no options are needed. See IProviderHints
a secure preferences
IOException - if unsupported URLs types are passed in, or if location is not accessible

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.

  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire