Remote Systems
v6.4.1

com.ibm.etools.systems.model.impl
Class SystemProfileManagerImpl

java.lang.Object
  extended byEObjectImpl
      extended bycom.ibm.etools.systems.model.impl.SystemProfileManagerImpl
All Implemented Interfaces:
SystemProfileManager

public class SystemProfileManagerImpl
extends EObjectImpl
implements SystemProfileManager

See Also:
Serialized Form

Field Summary
static String copyright
           
 
Constructor Summary
protected SystemProfileManagerImpl()
          Default constructor
 
Method Summary
static void clearDefault()
          Clear the default after a team sychronization say
 SystemProfile cloneSystemProfile(SystemProfile profile, String newName)
          Clone the given profile to a new one with the given name.
 SystemProfile createSystemProfile(String name, boolean makeActive)
          Create a new profile with the given name, and add to the list.
 void deleteSystemProfile(SystemProfile profile)
          Delete the given profile This will: Delete the profile in memory Delete the underlying folder Update the user preferences if this profile is currently active.
 Object eGet(EStructuralFeature eFeature, boolean resolve)
           
 boolean eIsSet(EStructuralFeature eFeature)
           
 void eSet(EStructuralFeature eFeature, Object newValue)
           
protected  EClass eStaticClass()
           
 void eUnset(EStructuralFeature eFeature)
           
 String[] getActiveSystemProfileNames()
          Return the profile names currently selected by the user as his "active" profiles
 Vector getActiveSystemProfileNamesVector()
          Return the profile names currently selected by the user as his "active" profiles
 int getActiveSystemProfilePosition(String profileName)
          Return 0-based position of the given active profile within the list of active profiles.
 SystemProfile[] getActiveSystemProfiles()
          Return the profiles currently selected by the user as his "active" profiles
 SystemProfile getDefaultPrivateSystemProfile()
          Return the default private profile created at first touch.
 SystemProfile getDefaultTeamSystemProfile()
          Return the default team profile created at first touch.
static SystemMOFHelpers getMOFHelpers()
           
protected  SystemProfile getOrCreateSystemProfile(String userProfileName)
          Instantiate a user profile given its name.
 ISystemValidator getProfileNameValidator(String profileName)
          Reusable method to return a name validator for renaming a profile.
 ISystemValidator getProfileNameValidator(SystemProfile profile)
          Reusable method to return a name validator for renaming a profile.
 EList getProfiles()
           
protected static String getRootSaveFileName(String profileName)
          Return the root save file name without the extension .xmi
protected static String getRootSaveFileName(SystemProfile profile)
          Return the root save file name without the extension .xmi
static String getSaveFileName(String profileName)
          Return the unqualified save file name with the extension .xmi
static String getSaveFileName(SystemProfile profile)
          Return the unqualified save file name with the extension .xmi
 SystemProfile getSystemProfile(String name)
          Get a profile given its name.
static SystemProfileManager getSystemProfileManager()
          Return (and create if necessary) the singleton instance of this class.
 String[] getSystemProfileNames()
          Get an array of all existing profile names.
 Vector getSystemProfileNamesVector()
          Get a vector of all existing profile names.
 SystemProfile[] getSystemProfiles()
          Get an array of all existing profiles.
protected  void invalidateCache()
          Something changed so invalide cache of profiles so it will be regenerated
 boolean isSystemProfileActive(String profileName)
          Return true if the given profile is active.
 void makeSystemProfileActive(SystemProfile profile, boolean makeActive)
          Toggle an existing profile's state between active and inactive
 void renameSystemProfile(SystemProfile profile, String newName)
          Rename the given profile.
protected  void restore()
          Restore profiles from disk
protected  SystemProfile restore(String name)
          Restore a profile of a given name from disk...
 void save()
          Save all profiles to disk
 void save(SystemProfile profile)
          Attempt to save single profile to disk.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

copyright

public static final String copyright
See Also:
Constant Field Values
Constructor Detail

SystemProfileManagerImpl

protected SystemProfileManagerImpl()
Default constructor

Method Detail

eStaticClass

protected EClass eStaticClass()


getSystemProfileManager

public static SystemProfileManager getSystemProfileManager()
Return (and create if necessary) the singleton instance of this class.


clearDefault

public static void clearDefault()
Clear the default after a team sychronization say


createSystemProfile

public SystemProfile 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.

Specified by:
createSystemProfile in interface SystemProfileManager
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(SystemProfile profile,
                                    boolean makeActive)
Toggle an existing profile's state between active and inactive

Specified by:
makeSystemProfileActive in interface SystemProfileManager

getSystemProfiles

public SystemProfile[] getSystemProfiles()
Get an array of all existing profiles.

Specified by:
getSystemProfiles in interface SystemProfileManager

getSystemProfileNames

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

Specified by:
getSystemProfileNames in interface SystemProfileManager

getSystemProfileNamesVector

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

Specified by:
getSystemProfileNamesVector in interface SystemProfileManager

invalidateCache

protected void invalidateCache()
Something changed so invalide cache of profiles so it will be regenerated


getSystemProfile

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

Specified by:
getSystemProfile in interface SystemProfileManager

renameSystemProfile

public void renameSystemProfile(SystemProfile profile,
                                String newName)
Rename the given profile. This will:

Specified by:
renameSystemProfile in interface SystemProfileManager

deleteSystemProfile

public void deleteSystemProfile(SystemProfile profile)
Delete the given profile This will:

Specified by:
deleteSystemProfile in interface SystemProfileManager

cloneSystemProfile

public SystemProfile cloneSystemProfile(SystemProfile profile,
                                        String newName)
Clone the given profile to a new one with the given name. Pretty useless right now, as there is no data to clone!

Specified by:
cloneSystemProfile in interface SystemProfileManager

isSystemProfileActive

public boolean isSystemProfileActive(String profileName)
Return true if the given profile is active.

Specified by:
isSystemProfileActive in interface SystemProfileManager
See Also:
SystemProfile.isActive()

getActiveSystemProfiles

public SystemProfile[] getActiveSystemProfiles()
Return the profiles currently selected by the user as his "active" profiles

Specified by:
getActiveSystemProfiles in interface SystemProfileManager

getActiveSystemProfileNames

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

Specified by:
getActiveSystemProfileNames in interface SystemProfileManager

getActiveSystemProfileNamesVector

public Vector getActiveSystemProfileNamesVector()
Return the profile names currently selected by the user as his "active" profiles


getActiveSystemProfilePosition

public int getActiveSystemProfilePosition(String profileName)
Return 0-based position of the given active profile within the list of active profiles.

Specified by:
getActiveSystemProfilePosition in interface SystemProfileManager

getDefaultPrivateSystemProfile

public SystemProfile getDefaultPrivateSystemProfile()
Return the default private profile created at first touch. Will return null if it has been renamed!

Specified by:
getDefaultPrivateSystemProfile in interface SystemProfileManager

getDefaultTeamSystemProfile

public SystemProfile getDefaultTeamSystemProfile()
Return the default team profile created at first touch. Will return null if it has been renamed!

Specified by:
getDefaultTeamSystemProfile in interface SystemProfileManager

getOrCreateSystemProfile

protected SystemProfile getOrCreateSystemProfile(String userProfileName)
Instantiate a user profile given its name.


save

public void save()
Save all profiles to disk

Specified by:
save in interface SystemProfileManager

save

public void save(SystemProfile profile)
          throws Exception
Attempt to save single profile to disk.

Specified by:
save in interface SystemProfileManager
Throws:
Exception

restore

protected void restore()
Restore profiles from disk


restore

protected SystemProfile restore(String name)
                         throws Exception
Restore a profile of a given name from disk...

Throws:
Exception

getSaveFileName

public static String getSaveFileName(String profileName)
Return the unqualified save file name with the extension .xmi


getSaveFileName

public static String getSaveFileName(SystemProfile profile)
Return the unqualified save file name with the extension .xmi


getRootSaveFileName

protected static String getRootSaveFileName(SystemProfile profile)
Return the root save file name without the extension .xmi


getRootSaveFileName

protected static String getRootSaveFileName(String profileName)
Return the root save file name without the extension .xmi


getMOFHelpers

public static SystemMOFHelpers getMOFHelpers()

getProfileNameValidator

public ISystemValidator getProfileNameValidator(String profileName)
Reusable method to return a name validator for renaming a profile.

Specified by:
getProfileNameValidator in interface SystemProfileManager

getProfileNameValidator

public ISystemValidator getProfileNameValidator(SystemProfile profile)
Reusable method to return a name validator for renaming a profile.

Specified by:
getProfileNameValidator in interface SystemProfileManager

getProfiles

public EList getProfiles()
Specified by:
getProfiles in interface SystemProfileManager
Returns:
The list of Profiles references

eGet

public Object eGet(EStructuralFeature eFeature,
                   boolean resolve)


eSet

public void eSet(EStructuralFeature eFeature,
                 Object newValue)


eUnset

public void eUnset(EStructuralFeature eFeature)


eIsSet

public boolean eIsSet(EStructuralFeature eFeature)


Remote Systems
v6.4.1

Copyright © 2005 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.