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
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

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

  




 

 

RSE
Release 3.0

org.eclipse.rse.core
Class PasswordPersistenceManager

java.lang.Object
  extended by 
org.eclipse.rse.core.PasswordPersistenceManager

public class PasswordPersistenceManager
extends Object

PasswordPersistenceManager manages the saving and retrieving of user ID / passwords to the Eclipse keyring for registered system types.


Field Summary
static  IRSESystemType DEFAULT_SYSTEM_TYPE
           
static  String DEFAULT_USER_NAME
           
static int RC_ALREADY_EXISTS
           
static int RC_DENIED
           
static int RC_ERROR
           
static int RC_OK
           
 
Method Summary
 int add ( SystemSignonInformation info, boolean overwrite)
          Add a password to the password database.
 int add ( SystemSignonInformation info, boolean overwrite, boolean updateDefault)
          Add a password to the password database.
  SystemSignonInformation find ( IRSESystemType systemtype, String hostname, String userid)
          Find the password for the specified systemtype, hostname and userid.
  SystemSignonInformation find ( IRSESystemType systemtype, String hname, String userid, boolean checkDefault)
          Find the persisted password for the specified systemtype, hostname and userid.
static  PasswordPersistenceManager getInstance ()
          Retrieve the singleton instance of the PasswordPersistenceManger
  IRSESystemType[] getRegisteredSystemTypes ()
          Retrieve the list of registered system types
  List getSavedUserIDs ()
          Retrieve a list of the stored user IDs.
 boolean isUserIDCaseSensitive ( IRSESystemType systemType)
          Helper method for determining if system type uses case sensitive user IDs
 boolean passwordExists ( IRSESystemType systemtype, String hostname, String userid)
          Check if a password entry exists for the specified system type, hostname and userid.
 boolean passwordExists ( IRSESystemType systemtype, String hname, String userid, boolean checkDefault)
          Check if a password entry exists for the specified system type, hostname and userid.
 int remove ( IRSESystemType systemType, String hostName)
          Removes all passwords for a host name for a given system type.
 void remove ( IRSESystemType systemType, String hostName, String userid)
          Removes all entries from the keyring that match the hostname, userid, and system type.
 void remove ( SystemSignonInformation info)
          Remove the entry from the keyring that matches the systemtype, hostname and user ID from the SystemSignonInfo parameter.
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RC_OK

public static final int RC_OK
See Also:
Constant Field Values

RC_ALREADY_EXISTS

public static final int RC_ALREADY_EXISTS
See Also:
Constant Field Values

RC_DENIED

public static final int RC_DENIED
Since:
org.eclipse.rse.core 3.0
See Also:
Constant Field Values

RC_ERROR

public static final int RC_ERROR
See Also:
Constant Field Values

DEFAULT_SYSTEM_TYPE

public static final 
IRSESystemType DEFAULT_SYSTEM_TYPE

DEFAULT_USER_NAME

public static final 
String DEFAULT_USER_NAME
See Also:
Constant Field Values
Method Detail

getInstance

public static final 
PasswordPersistenceManager getInstance()
Retrieve the singleton instance of the PasswordPersistenceManger


remove

public void remove(
SystemSignonInformation info)
Remove the entry from the keyring that matches the systemtype, hostname and user ID from the SystemSignonInfo parameter.


remove

public int remove(
IRSESystemType systemType,
                  
String hostName)
Removes all passwords for a host name for a given system type. Use the default system type explicitly to remove those entries.

Parameters:
systemType - The system type of the host
hostName - The IP address of the host in canonical format
Returns:
the number of passwords removed from the keyring
Since:
org.eclipse.rse.core 3.0

remove

public void remove(
IRSESystemType systemType,
                   
String hostName,
                   
String userid)
Removes all entries from the keyring that match the hostname, userid, and system type. Use the default system type explicitly to remove those entries.

Parameters:
systemType - the systemType
hostName - the connection name
userid - the user id

passwordExists

public boolean passwordExists(
IRSESystemType systemtype,
                              
String hostname,
                              
String userid)
Check if a password entry exists for the specified system type, hostname and userid.


passwordExists

public boolean passwordExists(
IRSESystemType systemtype,
                              
String hname,
                              
String userid,
                              boolean checkDefault)
Check if a password entry exists for the specified system type, hostname and userid.

Parameters:
systemtype - The system type to check for.
hname - The hostname to check for.
userid - The user ID to check for.
checkDefault - Whether or not to check for a default system type if the specified system type is not found.

add

public int add(
SystemSignonInformation info,
               boolean overwrite)
Add a password to the password database. This will not update the entry for the default system type

Parameters:
info - The signon information to store
overwrite - Whether to overwrite any existing entry
Returns:
RC_OK if the password was successfully stored RC_ALREADY_EXISTS if the password already exists and overwrite was false

add

public int add(
SystemSignonInformation info,
               boolean overwrite,
               boolean updateDefault)
Add a password to the password database.

Parameters:
info - The signon information to store
overwrite - If true then overwrite the existing entry for this systemtype, hostname, and userid.
updateDefault - if true then set the entry for the default systemtype, hostname, and user ID, according to the overwrite setting.
Returns:
RC_OK if the password was successfully stored. RC_ALREADY_EXISTS if the password already exists and overwrite was false RC_DENIED if passwords may not be saved for this system type and host

find

public 
SystemSignonInformation find(
IRSESystemType systemtype,
                                    
String hostname,
                                    
String userid)
Find the password for the specified systemtype, hostname and userid. If one is not found then the default system type is used. The system type in the signon information returned may not be the same as the system type specfied in the argument.


find

public 
SystemSignonInformation find(
IRSESystemType systemtype,
                                    
String hname,
                                    
String userid,
                                    boolean checkDefault)
Find the persisted password for the specified systemtype, hostname and userid.

Parameters:
systemtype - The system type to check for.
hname - The hostname to check for.
userid - The user ID to check for.
checkDefault - Whether or not to check for a default system type if the specified system type is not found.

isUserIDCaseSensitive

public boolean isUserIDCaseSensitive(
IRSESystemType systemType)
Helper method for determining if system type uses case sensitive user IDs


getRegisteredSystemTypes

public 
IRSESystemType[] getRegisteredSystemTypes()
Retrieve the list of registered system types


getSavedUserIDs

public 
List getSavedUserIDs()
Retrieve a list of the stored user IDs.

Returns:
List A list of the stored user IDs as SystemSignonInformation instances without the saved passwords.

RSE
Release 3.0

Copyright (c) IBM Corporation and others 2000, 2008. All Rights Reserved.

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