Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrelves2006-09-15 16:32:40 -0400
committerrelves2006-09-15 16:32:40 -0400
commite18c75178950c307fa10d35f4cc10371f28d3682 (patch)
tree895a757b0a9502349619e046430fea3de3d3cf72
parent11afd842fa87007e1a2d1885310f97e57db2a4ac (diff)
downloadorg.eclipse.mylyn.tasks-e18c75178950c307fa10d35f4cc10371f28d3682.tar.gz
org.eclipse.mylyn.tasks-e18c75178950c307fa10d35f4cc10371f28d3682.tar.xz
org.eclipse.mylyn.tasks-e18c75178950c307fa10d35f4cc10371f28d3682.zip
Progress on: 153788: Add API for operations on repository attachments
https://bugs.eclipse.org/bugs/show_bug.cgi?id=153788
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttachmentHandler.java8
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/IAttachmentHandler.java5
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracAttachmentHandler.java8
3 files changed, 21 insertions, 0 deletions
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttachmentHandler.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttachmentHandler.java
index 0f5aceb60..6a6b9a18c 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttachmentHandler.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttachmentHandler.java
@@ -271,4 +271,12 @@ public class BugzillaAttachmentHandler implements IAttachmentHandler {
public boolean canUploadAttachment(TaskRepository repository, AbstractRepositoryTask task) {
return true;
}
+
+ public boolean canDeprecate(TaskRepository repository, RepositoryAttachment attachment) {
+ return false;
+ }
+
+ public void updateAttachment(TaskRepository repository, RepositoryAttachment attachment) throws CoreException {
+ // implement
+ }
}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/IAttachmentHandler.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/IAttachmentHandler.java
index c07e15267..d3e45c63a 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/IAttachmentHandler.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/IAttachmentHandler.java
@@ -32,4 +32,9 @@ public interface IAttachmentHandler {
public boolean canDownloadAttachment(TaskRepository repository, AbstractRepositoryTask task);
+ public boolean canDeprecate(TaskRepository repository, RepositoryAttachment attachment);
+
+ /** To deprecate, change the attribute on the RepositoryAttachment and pass to this method */
+ public void updateAttachment(TaskRepository repository, RepositoryAttachment attachment) throws CoreException;
+
}
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 895d2c5db..3584a92ac 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
@@ -106,5 +106,13 @@ public class TracAttachmentHandler implements IAttachmentHandler {
public boolean canUploadAttachment(TaskRepository repository, AbstractRepositoryTask task) {
return connector.hasAttachmentSupport(repository, task);
}
+
+ public boolean canDeprecate(TaskRepository repository, RepositoryAttachment attachment) {
+ return false;
+ }
+
+ public void updateAttachment(TaskRepository repository, RepositoryAttachment attachment) throws CoreException {
+ // ignore
+ }
}

Back to the top