Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrelves2006-10-31 20:33:04 -0500
committerrelves2006-10-31 20:33:04 -0500
commitdc841c630afff6eea9fa48a58143d396d272fead (patch)
tree08ea931884873a5c3cab941da3342efdd2e6e0d7 /org.eclipse.mylyn.trac.core/src
parent73c53ca524c7b66c4a719271f75428656ad910d6 (diff)
downloadorg.eclipse.mylyn.tasks-dc841c630afff6eea9fa48a58143d396d272fead.tar.gz
org.eclipse.mylyn.tasks-dc841c630afff6eea9fa48a58143d396d272fead.tar.xz
org.eclipse.mylyn.tasks-dc841c630afff6eea9fa48a58143d396d272fead.zip
NEW - bug 161443: Improve support for sites protected by http authentication
https://bugs.eclipse.org/bugs/show_bug.cgi?id=161443
Diffstat (limited to 'org.eclipse.mylyn.trac.core/src')
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracAttachmentHandler.java13
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracRepositoryConnector.java2
2 files changed, 10 insertions, 5 deletions
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracAttachmentHandler.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracAttachmentHandler.java
index 968264d32..4965ca33e 100644
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracAttachmentHandler.java
+++ b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracAttachmentHandler.java
@@ -40,19 +40,19 @@ public class TracAttachmentHandler implements IAttachmentHandler {
this.connector = connector;
}
- public void downloadAttachment(TaskRepository repository, AbstractRepositoryTask task, RepositoryAttachment attachment, File file, Proxy proxySettings) throws CoreException {
+ public void downloadAttachment(TaskRepository repository, String taskId, RepositoryAttachment attachment, File file) throws CoreException {
String filename = attachment.getAttributeValue(RepositoryTaskAttribute.ATTACHMENT_FILENAME);
if (filename == null) {
- throw new CoreException(new Status(IStatus.ERROR, TracCorePlugin.PLUGIN_ID, IStatus.OK, "Attachment download from " + task.getRepositoryUrl() + " failed, missing attachment filename.", null));
+ throw new CoreException(new Status(IStatus.ERROR, TracCorePlugin.PLUGIN_ID, IStatus.OK, "Attachment download from " + repository.getUrl() + " failed, missing attachment filename.", null));
}
try {
ITracClient client = connector.getClientManager().getRepository(repository);
- int id = Integer.parseInt(AbstractRepositoryTask.getTaskId(task.getHandleIdentifier()));
+ int id = Integer.parseInt(taskId);
byte[] data = client.getAttachmentData(id, filename);
writeData(file, data);
} catch (Exception e) {
- throw new CoreException(new Status(IStatus.ERROR, TracCorePlugin.PLUGIN_ID, 0, "Attachment download from " + task.getRepositoryUrl() + " failed, please see details.", e ));
+ throw new CoreException(new Status(IStatus.ERROR, TracCorePlugin.PLUGIN_ID, 0, "Attachment download from " +repository.getUrl() + " failed, please see details.", e ));
}
}
@@ -114,5 +114,10 @@ public class TracAttachmentHandler implements IAttachmentHandler {
public void updateAttachment(TaskRepository repository, RepositoryAttachment attachment) throws CoreException {
// ignore
}
+
+ public byte[] getAttachmentData(TaskRepository repository, String taskId) throws CoreException {
+ // TODO Auto-generated method stub
+ return null;
+ }
}
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracRepositoryConnector.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracRepositoryConnector.java
index bda71efce..3b829b317 100644
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracRepositoryConnector.java
+++ b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracRepositoryConnector.java
@@ -254,7 +254,7 @@ public class TracRepositoryConnector extends AbstractRepositoryConnector {
}
@Override
- public void updateAttributes(TaskRepository repository, Proxy proxySettings, IProgressMonitor monitor) throws CoreException {
+ public void updateAttributes(TaskRepository repository, IProgressMonitor monitor) throws CoreException {
try {
ITracClient client = getClientManager().getRepository(repository);
client.updateAttributes(monitor, true);

Back to the top