Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal')
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracAttachmentHandler.java6
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracAttributeFactory.java1
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracRepositoryConnector.java3
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracTaskDataHandler.java8
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracTicket.java2
5 files changed, 18 insertions, 2 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 c2fb82091..6d977da28 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
@@ -36,6 +36,7 @@ public class TracAttachmentHandler extends AbstractAttachmentHandler {
this.connector = connector;
}
+ @Override
public InputStream getAttachmentAsStream(TaskRepository repository, RepositoryAttachment attachment,
IProgressMonitor monitor) throws CoreException {
String filename = attachment.getAttributeValue(RepositoryTaskAttribute.ATTACHMENT_FILENAME);
@@ -54,6 +55,7 @@ public class TracAttachmentHandler extends AbstractAttachmentHandler {
}
}
+ @Override
public void uploadAttachment(TaskRepository repository, AbstractTask task, ITaskAttachment attachment,
String comment, IProgressMonitor monitor) throws CoreException {
if (!TracRepositoryConnector.hasAttachmentSupport(repository, task)) {
@@ -80,6 +82,7 @@ public class TracAttachmentHandler extends AbstractAttachmentHandler {
}
}
+ @Override
public boolean canDownloadAttachment(TaskRepository repository, AbstractTask task) {
if (repository == null) {
return false;
@@ -87,6 +90,7 @@ public class TracAttachmentHandler extends AbstractAttachmentHandler {
return TracRepositoryConnector.hasAttachmentSupport(repository, task);
}
+ @Override
public boolean canUploadAttachment(TaskRepository repository, AbstractTask task) {
if (repository == null) {
return false;
@@ -94,10 +98,12 @@ public class TracAttachmentHandler extends AbstractAttachmentHandler {
return TracRepositoryConnector.hasAttachmentSupport(repository, task);
}
+ @Override
public boolean canDeprecate(TaskRepository repository, RepositoryAttachment attachment) {
return false;
}
+ @Override
public void updateAttachment(TaskRepository repository, RepositoryAttachment attachment) throws CoreException {
throw new UnsupportedOperationException();
}
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracAttributeFactory.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracAttributeFactory.java
index 957a76096..cbf232f70 100644
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracAttributeFactory.java
+++ b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracAttributeFactory.java
@@ -156,6 +156,7 @@ public class TracAttributeFactory extends AbstractAttributeFactory {
return RepositoryTaskAttribute.COMMENT_NEW.equals(id) || RepositoryTaskAttribute.REMOVE_CC.equals(id) || RepositoryTaskAttribute.NEW_CC.equals(id) || RepositoryTaskAttribute.ADD_SELF_CC.equals(id);
}
+ @Override
public Date getDateForAttributeType(String attributeKey, String dateString) {
if (dateString == null || dateString.length() == 0) {
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 d08c48e34..59e59d274 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
@@ -85,6 +85,7 @@ public class TracRepositoryConnector extends AbstractRepositoryConnector {
return index == -1 ? null : url.substring(0, index);
}
+ @Override
public String getTaskIdFromTaskUrl(String url) {
if (url == null) {
return null;
@@ -218,12 +219,14 @@ public class TracRepositoryConnector extends AbstractRepositoryConnector {
return task;
}
+ @Override
public AbstractTask createTask(String repositoryUrl, String id, String summary) {
TracTask tracTask = new TracTask(repositoryUrl, id, summary);
tracTask.setCreationDate(new Date());
return tracTask;
}
+ @Override
public void updateTaskFromTaskData(TaskRepository repository, AbstractTask repositoryTask,
RepositoryTaskData taskData) {
if (taskData != null) {
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracTaskDataHandler.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracTaskDataHandler.java
index 848f28761..b59caaf14 100644
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracTaskDataHandler.java
+++ b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracTaskDataHandler.java
@@ -54,6 +54,7 @@ public class TracTaskDataHandler extends AbstractTaskDataHandler {
this.connector = connector;
}
+ @Override
public RepositoryTaskData getTaskData(TaskRepository repository, String taskId, IProgressMonitor monitor)
throws CoreException {
return downloadTaskData(repository, TracRepositoryConnector.getTicketId(taskId));
@@ -79,11 +80,13 @@ public class TracTaskDataHandler extends AbstractTaskDataHandler {
}
}
+ @Override
public AbstractAttributeFactory getAttributeFactory(String repositoryUrl, String repositoryKind, String taskKind) {
// we don't care about the repository information right now
return attributeFactory;
}
+ @Override
public AbstractAttributeFactory getAttributeFactory(RepositoryTaskData taskData) {
return getAttributeFactory(taskData.getRepositoryUrl(), taskData.getRepositoryKind(), taskData.getTaskKind());
}
@@ -323,11 +326,12 @@ public class TracTaskDataHandler extends AbstractTaskDataHandler {
return createAttribute(factory, data, attribute, values, false);
}
+ @Override
public String postTaskData(TaskRepository repository, RepositoryTaskData taskData, IProgressMonitor monitor)
throws CoreException {
try {
TracTicket ticket = TracRepositoryConnector.getTracTicket(repository, taskData);
- ITracClient server = ((TracRepositoryConnector) connector).getClientManager().getRepository(repository);
+ ITracClient server = connector.getClientManager().getRepository(repository);
if (taskData.isNew()) {
int id = server.createTicket(ticket);
return id + "";
@@ -344,6 +348,7 @@ public class TracTaskDataHandler extends AbstractTaskDataHandler {
}
}
+ @Override
public boolean initializeTaskData(TaskRepository repository, RepositoryTaskData data, IProgressMonitor monitor)
throws CoreException {
try {
@@ -356,6 +361,7 @@ public class TracTaskDataHandler extends AbstractTaskDataHandler {
}
}
+ @Override
public Set<String> getSubTaskIds(RepositoryTaskData taskData) {
// TODO Auto-generated method stub
return Collections.emptySet();
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracTicket.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracTicket.java
index 6f72a3f80..77b229162 100644
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracTicket.java
+++ b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracTicket.java
@@ -163,7 +163,7 @@ public class TracTicket {
return false;
}
putBuiltinValue(key, value);
- } else if (value instanceof String) {
+ } else if (value != null) {
putCustomValue(keyName, value);
} else {
throw new InvalidTicketException("Expected string value for custom key '" + keyName + "', got '" + value

Back to the top