Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2010-08-03 18:48:54 -0400
committerslewis2010-08-03 18:48:54 -0400
commit638f016d6ed711f6d3c684fbd10fcd18f93b63a1 (patch)
tree072b2f2f193799b41c08cab75c5ad5c9c77417e9 /providers/bundles/org.eclipse.ecf.provider.xmpp
parent2d46a0ef360bf57fe5eecfdec022a6a0c243ea30 (diff)
downloadorg.eclipse.ecf-638f016d6ed711f6d3c684fbd10fcd18f93b63a1.tar.gz
org.eclipse.ecf-638f016d6ed711f6d3c684fbd10fcd18f93b63a1.tar.xz
org.eclipse.ecf-638f016d6ed711f6d3c684fbd10fcd18f93b63a1.zip
Enhancement to support IFileID.getURI(), and URI-based IFileIDs, rather than URL-based IDs only. Also added methods to IFileTransferProtocolMapper to specify use of URI (or URL) and added optional attribute to allow URIs to be used (rather than URLs). This addresses bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=268440
Diffstat (limited to 'providers/bundles/org.eclipse.ecf.provider.xmpp')
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.xmpp/META-INF/MANIFEST.MF2
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.xmpp/src/org/eclipse/ecf/provider/xmpp/identity/XMPPFileID.java14
2 files changed, 13 insertions, 3 deletions
diff --git a/providers/bundles/org.eclipse.ecf.provider.xmpp/META-INF/MANIFEST.MF b/providers/bundles/org.eclipse.ecf.provider.xmpp/META-INF/MANIFEST.MF
index a9a518dae..619e01220 100644
--- a/providers/bundles/org.eclipse.ecf.provider.xmpp/META-INF/MANIFEST.MF
+++ b/providers/bundles/org.eclipse.ecf.provider.xmpp/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.ecf.provider.xmpp;singleton:=true
-Bundle-Version: 3.1.100.qualifier
+Bundle-Version: 3.2.0.qualifier
Bundle-Activator: org.eclipse.ecf.internal.provider.xmpp.XmppPlugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/providers/bundles/org.eclipse.ecf.provider.xmpp/src/org/eclipse/ecf/provider/xmpp/identity/XMPPFileID.java b/providers/bundles/org.eclipse.ecf.provider.xmpp/src/org/eclipse/ecf/provider/xmpp/identity/XMPPFileID.java
index 11ea1a6af..088a162b4 100644
--- a/providers/bundles/org.eclipse.ecf.provider.xmpp/src/org/eclipse/ecf/provider/xmpp/identity/XMPPFileID.java
+++ b/providers/bundles/org.eclipse.ecf.provider.xmpp/src/org/eclipse/ecf/provider/xmpp/identity/XMPPFileID.java
@@ -13,6 +13,8 @@ package org.eclipse.ecf.provider.xmpp.identity;
import java.io.UnsupportedEncodingException;
import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URISyntaxException;
import java.net.URL;
import java.net.URLDecoder;
import java.net.URLEncoder;
@@ -74,8 +76,9 @@ public class XMPPFileID extends BaseID implements IFileID {
final String tok = st.nextToken();
if (tok.startsWith(propKey + "=")) { //$NON-NLS-1$
try {
- return URLDecoder.decode(tok.substring(propKey.length()
- + "=".length()), UTF_8); //$NON-NLS-1$
+ return URLDecoder
+ .decode(tok.substring(propKey.length()
+ + "=".length()), UTF_8); //$NON-NLS-1$
} catch (final UnsupportedEncodingException e) {
// should not happen
throw new MalformedURLException(NLS.bind(
@@ -188,4 +191,11 @@ public class XMPPFileID extends BaseID implements IFileID {
return url;
}
+ /**
+ * @since 3.2
+ */
+ public URI getURI() throws URISyntaxException {
+ return new URI(url.toExternalForm());
+ }
+
}

Back to the top