Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkersten2007-06-13 08:00:39 +0000
committermkersten2007-06-13 08:00:39 +0000
commit883219bedc7c4bd2ae6ceede524c9cb3abdd4e00 (patch)
treed0a0f6bb45193a3314d824367b6b6f81014d288d /org.eclipse.mylyn.bugzilla.core
parentf2fb9bb4cd1e7b9906b9cccc96ba519f116c975a (diff)
downloadorg.eclipse.mylyn.tasks-883219bedc7c4bd2ae6ceede524c9cb3abdd4e00.tar.gz
org.eclipse.mylyn.tasks-883219bedc7c4bd2ae6ceede524c9cb3abdd4e00.tar.xz
org.eclipse.mylyn.tasks-883219bedc7c4bd2ae6ceede524c9cb3abdd4e00.zip
NEW - bug 124321: [api] merge local tasks with repository tasks
https://bugs.eclipse.org/bugs/show_bug.cgi?id=124321
Diffstat (limited to 'org.eclipse.mylyn.bugzilla.core')
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttachmentHandler.java8
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java4
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaRepositoryConnector.java42
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTask.java4
4 files changed, 29 insertions, 29 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 58301253c..0c1b1eb25 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
@@ -18,7 +18,7 @@ import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.Status;
import org.eclipse.mylyn.tasks.core.AbstractAttachmentHandler;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryTask;
+import org.eclipse.mylyn.tasks.core.AbstractTask;
import org.eclipse.mylyn.tasks.core.ITaskAttachment;
import org.eclipse.mylyn.tasks.core.RepositoryAttachment;
import org.eclipse.mylyn.tasks.core.RepositoryStatus;
@@ -46,7 +46,7 @@ public class BugzillaAttachmentHandler extends AbstractAttachmentHandler {
}
}
- public void uploadAttachment(TaskRepository repository, AbstractRepositoryTask task, ITaskAttachment attachment,
+ public void uploadAttachment(TaskRepository repository, AbstractTask task, ITaskAttachment attachment,
String comment, IProgressMonitor monitor) throws CoreException {
try {
String bugId = task.getTaskId();
@@ -58,11 +58,11 @@ public class BugzillaAttachmentHandler extends AbstractAttachmentHandler {
}
}
- public boolean canDownloadAttachment(TaskRepository repository, AbstractRepositoryTask task) {
+ public boolean canDownloadAttachment(TaskRepository repository, AbstractTask task) {
return true;
}
- public boolean canUploadAttachment(TaskRepository repository, AbstractRepositoryTask task) {
+ public boolean canUploadAttachment(TaskRepository repository, AbstractTask task) {
return true;
}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java
index 5f12f8989..e175e1d1d 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java
@@ -53,7 +53,7 @@ import org.eclipse.mylyn.core.MylarStatusHandler;
import org.eclipse.mylyn.internal.bugzilla.core.history.BugzillaTaskHistoryParser;
import org.eclipse.mylyn.internal.bugzilla.core.history.TaskHistory;
import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryTask;
+import org.eclipse.mylyn.tasks.core.AbstractTask;
import org.eclipse.mylyn.tasks.core.ITaskAttachment;
import org.eclipse.mylyn.tasks.core.QueryHitCollector;
import org.eclipse.mylyn.tasks.core.RepositoryOperation;
@@ -1064,7 +1064,7 @@ public class BugzillaClient {
formData[x] = new NameValuePair("id", taskId);
RepositoryTaskData taskData = new RepositoryTaskData(new BugzillaAttributeFactory(),
BugzillaCorePlugin.REPOSITORY_KIND, repositoryUrl.toString(), taskId,
- AbstractRepositoryTask.DEFAULT_TASK_KIND);
+ AbstractTask.DEFAULT_TASK_KIND);
setupExistingBugAttributes(repositoryUrl.toString(), taskData);
taskDataMap.put(taskId, taskData);
}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaRepositoryConnector.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaRepositoryConnector.java
index c7facb426..c39b212d9 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaRepositoryConnector.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaRepositoryConnector.java
@@ -32,19 +32,19 @@ import org.eclipse.core.runtime.Status;
import org.eclipse.mylyn.core.MylarStatusHandler;
import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryTask;
+import org.eclipse.mylyn.tasks.core.AbstractTask;
import org.eclipse.mylyn.tasks.core.IAttachmentHandler;
-import org.eclipse.mylyn.tasks.core.ITask;
+import org.eclipse.mylyn.tasks.core.AbstractTask;
import org.eclipse.mylyn.tasks.core.ITaskDataHandler;
import org.eclipse.mylyn.tasks.core.ITaskFactory;
import org.eclipse.mylyn.tasks.core.QueryHitCollector;
import org.eclipse.mylyn.tasks.core.RepositoryTaskAttribute;
import org.eclipse.mylyn.tasks.core.RepositoryTaskData;
import org.eclipse.mylyn.tasks.core.TaskComment;
-import org.eclipse.mylyn.tasks.core.TaskList;
+import org.eclipse.mylyn.tasks.core.getAllCategories;
import org.eclipse.mylyn.tasks.core.TaskRepository;
import org.eclipse.mylyn.tasks.core.UnrecognizedReponseException;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryTask.PriorityLevel;
+import org.eclipse.mylyn.tasks.core.AbstractTask.PriorityLevel;
/**
* @author Mik Kersten
@@ -71,7 +71,7 @@ public class BugzillaRepositoryConnector extends AbstractRepositoryConnector {
private BugzillaClientManager clientManager;
@Override
- public void init(TaskList taskList) {
+ public void init(getAllCategories taskList) {
super.init(taskList);
this.taskDataHandler = new BugzillaTaskDataHandler(this);
this.attachmentHandler = new BugzillaAttachmentHandler(this);
@@ -98,13 +98,13 @@ public class BugzillaRepositoryConnector extends AbstractRepositoryConnector {
return BugzillaCorePlugin.REPOSITORY_KIND;
}
- public AbstractRepositoryTask createTask(String repositoryUrl, String id, String summary) {
+ public AbstractTask createTask(String repositoryUrl, String id, String summary) {
BugzillaTask task = new BugzillaTask(repositoryUrl, id, summary);
task.setCreationDate(new Date());
return task;
}
- public void updateTaskFromTaskData(TaskRepository repository, AbstractRepositoryTask repositoryTask,
+ public void updateTaskFromTaskData(TaskRepository repository, AbstractTask repositoryTask,
RepositoryTaskData taskData) {
BugzillaTask bugzillaTask = (BugzillaTask) repositoryTask;
if (taskData != null) {
@@ -224,10 +224,10 @@ public class BugzillaRepositoryConnector extends AbstractRepositoryConnector {
@Override
- public Set<AbstractRepositoryTask> getChangedSinceLastSync(TaskRepository repository,
- Set<AbstractRepositoryTask> tasks, IProgressMonitor monitor) throws CoreException {
+ public Set<AbstractTask> getChangedSinceLastSync(TaskRepository repository,
+ Set<AbstractTask> tasks, IProgressMonitor monitor) throws CoreException {
try {
- Set<AbstractRepositoryTask> changedTasks = new HashSet<AbstractRepositoryTask>();
+ Set<AbstractTask> changedTasks = new HashSet<AbstractTask>();
if (repository.getSyncTimeStamp() == null) {
return tasks;
@@ -246,10 +246,10 @@ public class BugzillaRepositoryConnector extends AbstractRepositoryConnector {
urlQueryString = urlQueryBase + BUG_ID;
int queryCounter = -1;
- Iterator<AbstractRepositoryTask> itr = tasks.iterator();
+ Iterator<AbstractTask> itr = tasks.iterator();
while (itr.hasNext()) {
queryCounter++;
- AbstractRepositoryTask task = itr.next();
+ AbstractTask task = itr.next();
String newurlQueryString = URLEncoder.encode(task.getTaskId() + ",", repository.getCharacterEncoding());
if ((urlQueryString.length() + newurlQueryString.length() + IBugzillaConstants.CONTENT_TYPE_RDF
.length()) > IBugzillaConstants.MAX_URL_LENGTH) {
@@ -272,11 +272,11 @@ public class BugzillaRepositoryConnector extends AbstractRepositoryConnector {
}
}
- private void queryForChanged(final TaskRepository repository, Set<AbstractRepositoryTask> changedTasks,
+ private void queryForChanged(final TaskRepository repository, Set<AbstractTask> changedTasks,
String urlQueryString) throws UnsupportedEncodingException, CoreException {
QueryHitCollector collector = new QueryHitCollector(taskList, new ITaskFactory() {
- public AbstractRepositoryTask createTask(RepositoryTaskData taskData, boolean synchData, boolean forced, IProgressMonitor monitor) {
+ public AbstractTask createTask(RepositoryTaskData taskData, boolean synchData, boolean forced, IProgressMonitor monitor) {
// do not construct actual task objects here as query shouldn't result in new tasks
return taskList.getTask(taskData.getRepositoryUrl(), taskData.getId());
}
@@ -286,12 +286,12 @@ public class BugzillaRepositoryConnector extends AbstractRepositoryConnector {
performQuery(query, repository, new NullProgressMonitor(), collector, false);
- for (ITask taskHit : collector.getTaskHits()) {
+ for (AbstractTask taskHit : collector.getTaskHits()) {
// String handle =
- // AbstractRepositoryTask.getHandle(repository.getUrl(),
+ // AbstractTask.getHandle(repository.getUrl(),
// hit.getId());
- if (taskHit != null && taskHit instanceof AbstractRepositoryTask) {
- AbstractRepositoryTask repositoryTask = (AbstractRepositoryTask) taskHit;
+ if (taskHit != null && taskHit instanceof AbstractTask) {
+ AbstractTask repositoryTask = (AbstractTask) taskHit;
// Hack to avoid re-syncing last task from previous
// synchronization
// This can be removed once we are getting a query timestamp
@@ -348,8 +348,8 @@ public class BugzillaRepositoryConnector extends AbstractRepositoryConnector {
if (!forced) {
// Only retrieve data for hits we don't already have
- for (ITask existingTask : query.getChildren()) {
- AbstractRepositoryTask repositoryTask = (AbstractRepositoryTask) existingTask;
+ for (AbstractTask existingTask : query.getChildren()) {
+ AbstractTask repositoryTask = (AbstractTask) existingTask;
if (ids.contains(repositoryTask.getTaskId())) {
resultCollector.accept(repositoryTask);
ids.remove(repositoryTask.getTaskId());
@@ -407,7 +407,7 @@ public class BugzillaRepositoryConnector extends AbstractRepositoryConnector {
}
@Override
- public void updateTaskFromRepository(TaskRepository repository, AbstractRepositoryTask repositoryTask,
+ public void updateTaskFromRepository(TaskRepository repository, AbstractTask repositoryTask,
IProgressMonitor monitor) {
// ignore
}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTask.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTask.java
index 33bf987aa..1d2c8bcab 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTask.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTask.java
@@ -13,13 +13,13 @@
*/
package org.eclipse.mylyn.internal.bugzilla.core;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryTask;
+import org.eclipse.mylyn.tasks.core.AbstractTask;
/**
* @author Mik Kersten
* @author Rob Elves
*/
-public class BugzillaTask extends AbstractRepositoryTask {
+public class BugzillaTask extends AbstractTask {
private String severity;

Back to the top