/**
   * @param name
   * @param description
   * @param id
   * @param props
   * @return
   */
  public ConnectionProfile createConnectionProfile(
      String name, String description, String id, Properties props) {
    CoreArgCheck.isNotEmpty(name, "name"); // $NON-NLS-1$
    CoreArgCheck.isNotEmpty(id, "id"); // $NON-NLS-1$
    CoreArgCheck.isNotEmpty(props, "props"); // $NON-NLS-1$

    ConnectionProfile profile = new ConnectionProfile(name, description, id);
    profile.setProperties(id, props);
    return profile;
  }
 private void disConnectSubProfiles(IConnectionProfile parent) {
   if (!parent
       .getCategory()
       .getId()
       .equals(IConnectionProfileRepositoryConstants.REPOSITORY_CATEGORY_ID)) {
     return;
   }
   IConnectionProfile[] profiles = InternalProfileManager.getInstance().getProfiles(true);
   for (int i = 0; i < profiles.length; i++) {
     ConnectionProfile profile = (ConnectionProfile) profiles[i];
     IConnectionProfileRepository repository = profile.getRepository();
     if (repository != null) {
       if (repository.getRepositoryProfile() != null
           && repository.getRepositoryProfile() == parent
           && profile.isConnected()) {
         profile.disconnect();
         // notify listeners to remove the contentExtension from the mProfileToExtension map.
         InternalProfileManager.getInstance().fireProfileDeleted(profile);
       }
     }
   }
 }