| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.datatools.connectivity.ProfileManager
public class ProfileManager
ProfileManger is a singleton class serverd as a helper class for connection profiles access. It also caches connection profiles and only persists to storage when changes made and at Eclipse shutdown.
| Constructor Summary | |
|---|---|
| ProfileManager() | |
| Method Summary | |
|---|---|
|  void | addProfile(IConnectionProfile profile)Add a connection profile object to the profiles cache. | 
|  void | addProfile(IConnectionProfile profile,
           boolean replaceExisting)Add a connection profile object to the profiles cache. | 
|  void | addProfileListener(IProfileListener listener)Register a listener for proifle operation | 
|  IConnectionProfile | copyProfile(IConnectionProfile profile,
            java.lang.String newName)Duplicate a connection profile but won't add it into ProfileManager or IConnectionProfileRepository | 
|  IConnectionProfile | createProfile(java.lang.String name,
              java.lang.String description,
              java.lang.String providerID,
              java.util.Properties baseProperties)Create connection profile | 
|  IConnectionProfile | createProfile(java.lang.String name,
              java.lang.String description,
              java.lang.String providerID,
              java.util.Properties baseProperties,
              java.lang.String parentProfile)Create connection profile | 
|  IConnectionProfile | createProfile(java.lang.String name,
              java.lang.String description,
              java.lang.String providerID,
              java.util.Properties baseProperties,
              java.lang.String parentProfile,
              boolean autoConnect)Create connection profile | 
|  IConnectionProfile | createTransientProfile(java.lang.String providerID,
                       java.util.Properties baseProperties) | 
|  void | deleteProfile(IConnectionProfile profile)Delete a connection profile object from the profiles cache | 
|  boolean | deleteTransientProfile(IConnectionProfile profile)Disconnect and remove the specified transient profile. | 
|  java.lang.String | duplicateProfile(IConnectionProfile profile)Duplicate a connection profile | 
|  java.lang.Object | getAdapter(java.lang.Class adapter) | 
|  ICategory | getCategory(java.lang.String catID)Get category by name | 
| static ProfileManager | getInstance() | 
|  IConnectionProfile | getProfileByFullPath(java.lang.String path)Return the profile for a given path (typically REPOSITORY::PROFILE or PROFILE) | 
|  IConnectionProfile | getProfileByInstanceID(java.lang.String id)Get connection profile by instance ID | 
|  IConnectionProfile | getProfileByName(java.lang.String name)Get connection profile by name | 
|  IConnectionProfile[] | getProfileByProviderID(java.lang.String ID)Get connection profiles by connection profile(cp) provider ID associated with each cp | 
|  java.lang.String | getProfilePath(IConnectionProfile profile)Return the path for a given profile (typically REPOSITORY::PROFILE or PROFILE) | 
|  IConnectionProfile[] | getProfiles()Get all connection profiles persisted in workspace | 
|  IConnectionProfile[] | getProfiles(boolean searchRepositories)Get all connection profiles persisted in workspace | 
|  IConnectionProfile[] | getProfilesByCategory(java.lang.String catID)Get connection profiles by category | 
|  ICategory[] | getRootCategories()Get root categories whose parent category is null | 
|  boolean | isTransientProfile(IConnectionProfile profile)Indicates whether the specified connection profile is of a transient type. | 
|  void | modifyProfile(IConnectionProfile profile)Modify an existing connection profile | 
|  void | modifyProfile(IConnectionProfile profile,
              java.lang.String newName,
              java.lang.String newDesc)Modify an existing connection profile, plus it's name and description We don't expose a setName and setDescription in IConnectionProfile, so instead we expose this api for that same purpose. | 
|  void | modifyProfile(IConnectionProfile profile,
              java.lang.String newName,
              java.lang.String newDesc,
              java.lang.Boolean autoConnect)Modify an existing connection profile, plus it's name and description We don't expose a setName and setDescription in IConnectionProfile, so instead we expose this api for that same purpose. | 
|  void | removeProfileListener(IProfileListener listener)Remove the listener for profile operation | 
|  java.lang.String[] | tokenize(java.lang.String input,
         java.lang.String delim) | 
|  java.lang.String | unTokenize(java.lang.String[] tokens) | 
| Methods inherited from class java.lang.Object | 
|---|
| equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public ProfileManager()
| Method Detail | 
|---|
public static ProfileManager getInstance()
public IConnectionProfile[] getProfiles()
public IConnectionProfile[] getProfiles(boolean searchRepositories)
searchRepositories - 
public ICategory getCategory(java.lang.String catID)
catID - 
public ICategory[] getRootCategories()
public IConnectionProfile[] getProfilesByCategory(java.lang.String catID)
catID - 
public IConnectionProfile getProfileByName(java.lang.String name)
name - 
public IConnectionProfile getProfileByInstanceID(java.lang.String id)
id - 
public IConnectionProfile[] getProfileByProviderID(java.lang.String ID)
ID - 
public java.lang.String getProfilePath(IConnectionProfile profile)
profile - 
public IConnectionProfile getProfileByFullPath(java.lang.String path)
path - 
public IConnectionProfile createTransientProfile(java.lang.String providerID,
                                                 java.util.Properties baseProperties)
                                          throws ConnectionProfileException
ConnectionProfileExceptionpublic boolean deleteTransientProfile(IConnectionProfile profile)
profile - a transient connection profile instance created 
             by #createTransientProfile(String, String, String, Properties)
public boolean isTransientProfile(IConnectionProfile profile)
profile - a connection profile instance
public IConnectionProfile createProfile(java.lang.String name,
                                        java.lang.String description,
                                        java.lang.String providerID,
                                        java.util.Properties baseProperties)
                                 throws ConnectionProfileException
name - description - providerID - baseProperties - 
ConnectionProfileException
public IConnectionProfile createProfile(java.lang.String name,
                                        java.lang.String description,
                                        java.lang.String providerID,
                                        java.util.Properties baseProperties,
                                        java.lang.String parentProfile)
                                 throws ConnectionProfileException
name - description - providerID - baseProperties - parentProfile - 
ConnectionProfileException
public IConnectionProfile createProfile(java.lang.String name,
                                        java.lang.String description,
                                        java.lang.String providerID,
                                        java.util.Properties baseProperties,
                                        java.lang.String parentProfile,
                                        boolean autoConnect)
                                 throws ConnectionProfileException
name - description - providerID - baseProperties - parentProfile - autoConnect - 
ConnectionProfileException
public java.lang.String duplicateProfile(IConnectionProfile profile)
                                  throws ConnectionProfileException
profile - 
ConnectionProfileException
public IConnectionProfile copyProfile(IConnectionProfile profile,
                                      java.lang.String newName)
                               throws ConnectionProfileException
profile - newName - 
ConnectionProfileException
public void addProfile(IConnectionProfile profile)
                throws ConnectionProfileException
profile - 
ConnectionProfileException
public void addProfile(IConnectionProfile profile,
                       boolean replaceExisting)
                throws ConnectionProfileException
profile - replaceExisting - 
ConnectionProfileException
public void deleteProfile(IConnectionProfile profile)
                   throws ConnectionProfileException
profile - 
ConnectionProfileException
public void modifyProfile(IConnectionProfile profile)
                   throws ConnectionProfileException
profile - 
ConnectionProfileException
public void modifyProfile(IConnectionProfile profile,
                          java.lang.String newName,
                          java.lang.String newDesc)
                   throws ConnectionProfileException
profile - 
ConnectionProfileException
public void modifyProfile(IConnectionProfile profile,
                          java.lang.String newName,
                          java.lang.String newDesc,
                          java.lang.Boolean autoConnect)
                   throws ConnectionProfileException
profile - 
ConnectionProfileExceptionpublic void addProfileListener(IProfileListener listener)
listener - public void removeProfileListener(IProfileListener listener)
listener - public java.lang.Object getAdapter(java.lang.Class adapter)
getAdapter in interface org.eclipse.core.runtime.IAdaptable
public java.lang.String[] tokenize(java.lang.String input,
                                   java.lang.String delim)
public java.lang.String unTokenize(java.lang.String[] tokens)
| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||