/**
   * Returns a URL used to publish a resource in the repository.
   *
   * @param uri
   * @param resource The resource to publish.
   * @return A URL used to publish the given resource in the repository.
   * @throws IOException If we can't create the SHA-1;
   */
  private Map<String, String> createBasePublishParams(final File file) throws IOException {
    final Map<String, String> params = new HashMap<String, String>();

    addParam(params, "title", file.getName());
    addParam(params, "size", String.valueOf(file.length()));
    addParam(params, "instanceId", String.valueOf(Prefs.getId()));
    addParam(params, "timeZone", SystemUtils.USER_TIMEZONE);
    addParam(params, "country", SystemUtils.USER_COUNTRY);
    addParam(params, "language", SystemUtils.USER_LANGUAGE);

    return params;
  }
 /**
  * Returns a URL used to delete a resource from the repository.
  *
  * @return A URL used to delete the given resource from the repository.
  * @throws IOException If we can't create the SHA-1.
  */
 private Map<String, String> createDeleteParams() throws IOException {
   final Map<String, String> paramMap = new HashMap<String, String>();
   paramMap.put("instanceId", String.valueOf(Prefs.getId()));
   return paramMap;
 }