RSE
Release 1.0

org.eclipse.rse.core.model
Interface ISystemProfileManager


public interface ISystemProfileManager

A class that manages a list of SystemProfile objects.


Method Summary
 ISystemProfile cloneSystemProfile(ISystemProfile profile, String newName)
          Clone the given profile
 ISystemProfile createSystemProfile(String name, boolean makeActive)
          Create a new profile with the given name, and add to the list.
 void deleteSystemProfile(ISystemProfile profile, boolean persist)
          Delete the given profile
 String[] getActiveSystemProfileNames()
           
 int getActiveSystemProfilePosition(String profileName)
          Get the index of a profile given its name.
 ISystemProfile[] getActiveSystemProfiles()
           
 ISystemProfile getDefaultPrivateSystemProfile()
           
 ISystemProfile getDefaultTeamSystemProfile()
           
 List getProfiles()
           
 ISystemProfile getSystemProfile(String name)
          Get a profile given its name.
 String[] getSystemProfileNames()
           
 Vector getSystemProfileNamesVector()
           
 ISystemProfile[] getSystemProfiles()
           
 boolean isSystemProfileActive(String profileName)
          Get an indication of whether a profile is active or not.
 void makeSystemProfileActive(ISystemProfile profile, boolean makeActive)
          Toggle an existing profile's state between active and inactive
 void renameSystemProfile(ISystemProfile profile, String newName)
          Rename the given profile.
 

Method Detail

createSystemProfile

public ISystemProfile createSystemProfile(String name,
                                          boolean makeActive)
Create a new profile with the given name, and add to the list. The name must be unique within the existing list.

The underlying folder is created in the file system.

Parameters:
name - What to name this profile
makeActive - true if this profile is to be added to the active profile list.
Returns:
new profile, or null if name not unique.

makeSystemProfileActive

public void makeSystemProfileActive(ISystemProfile profile,
                                    boolean makeActive)
Toggle an existing profile's state between active and inactive

Parameters:
profile - the profile to (in)activate
makeActive - the state to make this profile

getSystemProfiles

public ISystemProfile[] getSystemProfiles()
Returns:
an array of all existing profiles.

getSystemProfileNames

public String[] getSystemProfileNames()
Returns:
an array of all existing profile names.

getSystemProfileNamesVector

public Vector getSystemProfileNamesVector()
Returns:
a vector of all existing profile names.

getSystemProfile

public ISystemProfile getSystemProfile(String name)
Get a profile given its name.

Parameters:
name - the name of the profile
Returns:
the profile

getActiveSystemProfiles

public ISystemProfile[] getActiveSystemProfiles()
Returns:
the profiles identified via preferences as the active profiles...

getActiveSystemProfileNames

public String[] getActiveSystemProfileNames()
Returns:
the profile names currently selected by the user as his "active" profiles

getActiveSystemProfilePosition

public int getActiveSystemProfilePosition(String profileName)
Get the index of a profile given its name.

Parameters:
profileName - the name of the profile to look for.
Returns:
0-based position of the given active profile within the list of active profiles.

getDefaultPrivateSystemProfile

public ISystemProfile getDefaultPrivateSystemProfile()
Returns:
the default private profile created at first touch. Will return null if it has been renamed.

getDefaultTeamSystemProfile

public ISystemProfile getDefaultTeamSystemProfile()
Returns:
the default team profile created at first touch. Will return null if it has been renamed.

renameSystemProfile

public void renameSystemProfile(ISystemProfile profile,
                                String newName)
Rename the given profile.

Parameters:
profile - the profile to rename
newName - the new profile name

deleteSystemProfile

public void deleteSystemProfile(ISystemProfile profile,
                                boolean persist)
Delete the given profile

Parameters:
profile - the name of the profile to delete.
persist - true if the deletion is meant to be persisted as well, false if the deletion is just in the model.

cloneSystemProfile

public ISystemProfile cloneSystemProfile(ISystemProfile profile,
                                         String newName)
Clone the given profile

Parameters:
profile - the profile to clone
newName - the name of the new profile
Returns:
the new profile

isSystemProfileActive

public boolean isSystemProfileActive(String profileName)
Get an indication of whether a profile is active or not.

Parameters:
profileName - the name of the profile to test
Returns:
true if the given profile is active
See Also:
ISystemProfile.isActive()

getProfiles

public List getProfiles()
Returns:
The list of Profiles references

RSE
Release 1.0

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