diff options
author | relves | 2006-11-01 01:33:04 +0000 |
---|---|---|
committer | relves | 2006-11-01 01:33:04 +0000 |
commit | dc841c630afff6eea9fa48a58143d396d272fead (patch) | |
tree | 08ea931884873a5c3cab941da3342efdd2e6e0d7 /org.eclipse.mylyn.trac.core/src | |
parent | 73c53ca524c7b66c4a719271f75428656ad910d6 (diff) | |
download | org.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')
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); |