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 RSEPreferencesManager

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

public class RSEPreferencesManager
extends Object

Preferences Manager utility class.


Method Summary
static void addActiveProfile ( String newName)
          Add a name to the active profile list.
static void clearUserId ( String key)
          Clears the user ID for the given key.
static void deleteActiveProfile ( String oldName)
          Delete one of the active profile names in the list of names stored in the registry.
static int getActiveProfilePosition ( String profileName)
           
static  String[] getActiveProfiles ()
           
static boolean getCreateLocalConnection ()
          Get the Preference setting whether the local connection should be created by default or not.
static  String getDefaultPrivateSystemProfileName ()
           
static  String getDefaultTeamProfileName ()
           
static  String getDefaultUserId ( IRSESystemType systemType)
          Gets the default user id for a given system type.
static boolean getDenyPasswordSave ( IRSESystemType systemType, String hostAddress)
          Retrieves the preference for a particular system type and host address that determines if passwords can be saved.
static boolean getIsSystemTypeEnabled ( IRSESystemType systemType)
          Gets the enabled state for a particular system type.
static  String getSystemTypeValues ()
          Gets the system type values table for editing.
static  String getUserId ( String key)
          Retrieves a user id given a key.
static void initDefaults ()
           
static void renameActiveProfile ( String oldName, String newName)
          Renames one of the active profile names in the list of names stored in the registry.
static void setDefaultUserId ( IRSESystemType systemType, String userId)
          Sets the default userId for the given system type.
static int setDenyPasswordSave ( IRSESystemType systemType, String hostAddress, boolean deny)
          Sets the preference for a particular system type and host address that causes passwords not to be savable.
static void setIsSystemTypeEnabled ( IRSESystemType systemType, boolean isEnabled)
          Sets if a system type is enabled.
static void setSystemTypeValues ( String systemTypeValues)
          Sets the default user id and enabled state for all system types.
static void setUserId ( String key, String userId)
          Sets the user Id for this key.
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getUserId

public static 
String getUserId(
String key)
Retrieves a user id given a key.

Parameters:
key - the key from which to get the particular user id.
Returns:
user ID for the given key or null if the key was not found.
See Also:
setUserId(String, String)

clearUserId

public static void clearUserId(
String key)
Clears the user ID for the given key.

Parameters:
key - the key for the user id.
See Also:
setUserId(String, String)

setUserId

public static void setUserId(
String key,
                             
String userId)
Sets the user Id for this key. The key typically designates a scope for this userid so that a hierarchy of user ids can be maintained for inheritance. For example, hosts have greater scope than subsystems. A key would typically be ., or ., or ...

Parameters:
key - the key used to find the userId
userId - the userId to retrieve by this key.

getDefaultUserId

public static 
String getDefaultUserId(
IRSESystemType systemType)
Gets the default user id for a given system type.

Parameters:
systemType - the systemtype for which to retrieve the default user id
Returns:
The default user id

setDefaultUserId

public static void setDefaultUserId(
IRSESystemType systemType,
                                    
String userId)
Sets the default userId for the given system type.

Parameters:
systemType - the system type for which to set the default
userId - the default user id for this system type. This may be null to "unset" the default.

getSystemTypeValues

public static 
String getSystemTypeValues()
Gets the system type values table for editing. This is a synthesized preference that is handled as a single value. Rows are separated by semi-colons. Each row is of the format =+;

Returns:
the table of system types formatted as a single string

setSystemTypeValues

public static void setSystemTypeValues(
String systemTypeValues)
Sets the default user id and enabled state for all system types.

Parameters:
systemTypeValues - a tabled encoded as a string that contains entries for each system type. See getSystemTypeValues() for the table format.

setIsSystemTypeEnabled

public static void setIsSystemTypeEnabled(
IRSESystemType systemType,
                                          boolean isEnabled)
Sets if a system type is enabled.

Parameters:
systemType - the system type to be enabled on this machine.
isEnabled - the enabled state

getIsSystemTypeEnabled

public static boolean getIsSystemTypeEnabled(
IRSESystemType systemType)
Gets the enabled state for a particular system type.

Parameters:
systemType - the system type
Returns:
the enabled state of that type

getActiveProfiles

public static 
String[] getActiveProfiles()
Returns:
the names of the profiles the user has elected to make active.

addActiveProfile

public static void addActiveProfile(
String newName)
Add a name to the active profile list. A name already in the list is not added again. The list remains sorted in the natural order.

Parameters:
newName - a new active profile name

deleteActiveProfile

public static void deleteActiveProfile(
String oldName)
Delete one of the active profile names in the list of names stored in the registry.

Parameters:
oldName - the name of the profile to remove from the active profiles list.

getActiveProfilePosition

public static int getActiveProfilePosition(
String profileName)
Parameters:
profileName - the name of the profile to search for in the list of active profiles.
Returns:
the zero-based position of a give profile name in the active list

renameActiveProfile

public static void renameActiveProfile(
String oldName,
                                       
String newName)
Renames one of the active profile names in the list of names stored in the registry. This is usually employed after renaming a profile to ensure that the active names list stays in synch with the actual profile names. The active state of the profiles cannot be kept in the profiles themselves since that can vary from workspace to workspace for profiles that are shared in a team.

Parameters:
oldName - the old name of the profile
newName - the new name of the profile

initDefaults

public static void initDefaults()

getDefaultPrivateSystemProfileName

public static 
String getDefaultPrivateSystemProfileName()
Returns:
The name of the default private system profile. This is typically the short name of the host machine or the name of the user account.

getDefaultTeamProfileName

public static 
String getDefaultTeamProfileName()
Returns:
the name of the default team system profile.

getCreateLocalConnection

public static boolean getCreateLocalConnection()
Get the Preference setting whether the local connection should be created by default or not.

Returns:
the boolean value indicating whether or not to create a local connection on a fresh workspace.
Since:
org.eclipse.rse.core 3.0

setDenyPasswordSave

public static int setDenyPasswordSave(
IRSESystemType systemType,
                                      
String hostAddress,
                                      boolean deny)
Sets the preference for a particular system type and host address that causes passwords not to be savable. The default for this attribute is false - that is, passwords are savable for all system types and hosts.

Parameters:
systemType - The system type of this preference.
hostAddress - The host address of this preference
deny - true if save of passwords is to be denied. false is save is to be allowed. If true then all passwords that have been saved for this system type and host address are removed. All passwords saved for the default system type and host address are also removed.
Returns:
the number of passwords removed if deny was set to true
Since:
org.eclipse.rse.core 3.0

getDenyPasswordSave

public static boolean getDenyPasswordSave(
IRSESystemType systemType,
                                          
String hostAddress)
Retrieves the preference for a particular system type and host address that determines if passwords can be saved. The default for this attribute is false, that is, save is not denied, thus passwords are savable.

Parameters:
systemType -
hostAddress -
Returns:
true if saving of passwords is denied. false if saving is allowed.
Since:
org.eclipse.rse.core 3.0

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