Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrelves2007-06-19 03:38:26 -0400
committerrelves2007-06-19 03:38:26 -0400
commit202562286d4eca3105093e8e94ccfefeb9f731c8 (patch)
tree67c7df637babd5c8f11096a3d49ddd8a57a6f183 /org.eclipse.mylyn.tasks.core
parent7d4dce6306c1201b8ec33912af0c1bc5b27e8ea6 (diff)
downloadorg.eclipse.mylyn.tasks-202562286d4eca3105093e8e94ccfefeb9f731c8.tar.gz
org.eclipse.mylyn.tasks-202562286d4eca3105093e8e94ccfefeb9f731c8.tar.xz
org.eclipse.mylyn.tasks-202562286d4eca3105093e8e94ccfefeb9f731c8.zip
ASSIGNED - bug 176513: [api] add support for requesting multiple task data in single request
https://bugs.eclipse.org/bugs/show_bug.cgi?id=176513
Diffstat (limited to 'org.eclipse.mylyn.tasks.core')
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/LocalRepositoryConnector.java4
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractRepositoryConnector.java4
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTaskDataHandler.java63
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskDataHandler.java50
4 files changed, 67 insertions, 54 deletions
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/LocalRepositoryConnector.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/LocalRepositoryConnector.java
index 1790c6a89..a8b47146b 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/LocalRepositoryConnector.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/LocalRepositoryConnector.java
@@ -22,7 +22,7 @@ import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery;
import org.eclipse.mylyn.tasks.core.AbstractTask;
import org.eclipse.mylyn.tasks.core.IAttachmentHandler;
import org.eclipse.mylyn.tasks.core.ITaskCollector;
-import org.eclipse.mylyn.tasks.core.ITaskDataHandler;
+import org.eclipse.mylyn.tasks.core.AbstractTaskDataHandler;
import org.eclipse.mylyn.tasks.core.RepositoryTaskData;
import org.eclipse.mylyn.tasks.core.TaskRepository;
@@ -85,7 +85,7 @@ public class LocalRepositoryConnector extends AbstractRepositoryConnector {
}
@Override
- public ITaskDataHandler getTaskDataHandler() {
+ public AbstractTaskDataHandler getTaskDataHandler() {
// not currently needed
return null;
}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractRepositoryConnector.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractRepositoryConnector.java
index fbe4a2d01..d414ea67e 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractRepositoryConnector.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractRepositoryConnector.java
@@ -67,7 +67,7 @@ public abstract class AbstractRepositoryConnector {
/**
* @return null if not supported
*/
- public abstract ITaskDataHandler getTaskDataHandler();
+ public abstract AbstractTaskDataHandler getTaskDataHandler();
public abstract String getRepositoryUrlFromTaskUrl(String taskFullUrl);
@@ -186,7 +186,7 @@ public abstract class AbstractRepositoryConnector {
/**
* Updates the properties of <code>repositoryTask</code>. Invoked when on task synchronization if
* {@link #getTaskDataHandler()} returns <code>null</code> or
- * {@link ITaskDataHandler#getTaskData(TaskRepository, String)} returns <code>null</code>.
+ * {@link AbstractTaskDataHandler#getTaskData(TaskRepository, String)} returns <code>null</code>.
*
* <p>
* Connectors that provide {@link RepositoryTaskData} objects for all tasks do not need to implement this method.
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTaskDataHandler.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTaskDataHandler.java
new file mode 100644
index 000000000..dbc38d65d
--- /dev/null
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTaskDataHandler.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2004 - 2006 University Of British Columbia and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * University Of British Columbia - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.mylyn.tasks.core;
+
+import java.util.Set;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+
+/**
+ * @author Mik Kersten
+ * @author Rob Elves
+ */
+public abstract class AbstractTaskDataHandler {
+
+ public abstract RepositoryTaskData getTaskData(TaskRepository repository, String taskId, IProgressMonitor monitor)
+ throws CoreException;
+
+ /**
+ * Override if connector supports retrieval of multiple task data in one query
+ */
+ public Set<RepositoryTaskData> getTaskData(TaskRepository repository, Set<String> taskIds, IProgressMonitor monitor)
+ throws CoreException {
+ // not supported
+ return null;
+ }
+
+ /**
+ * Return a reference to the newly created report in the case of new task submission, null otherwise
+ */
+ public abstract String postTaskData(TaskRepository repository, RepositoryTaskData taskData, IProgressMonitor monitor)
+ throws CoreException;
+
+ /**
+ * @param repositoryUrl
+ * @param repositoryKind
+ * @param taskKind
+ * AbstractTask.DEFAULT_KIND or connector specific task kind string
+ * @return
+ */
+ public abstract AbstractAttributeFactory getAttributeFactory(String repositoryUrl, String repositoryKind,
+ String taskKind);
+
+ /**
+ * Initialize a new task data object with default attributes and values
+ */
+ public abstract boolean initializeTaskData(TaskRepository repository, RepositoryTaskData data,
+ IProgressMonitor monitor) throws CoreException;
+
+ public abstract AbstractAttributeFactory getAttributeFactory(RepositoryTaskData taskData);
+
+ public abstract Set<String> getSubTaskIds(RepositoryTaskData taskData);
+
+}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskDataHandler.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskDataHandler.java
deleted file mode 100644
index 98709cce4..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskDataHandler.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 - 2006 University Of British Columbia and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * University Of British Columbia - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.core;
-
-import java.util.Set;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * @author Mik Kersten
- * @author Rob Elves
- */
-public interface ITaskDataHandler {
-
- public RepositoryTaskData getTaskData(TaskRepository repository, String taskId, IProgressMonitor monitor) throws CoreException;
-
- /**
- * Return a reference to the newly created report in the case of new task submission,
- * null otherwise
- */
- public String postTaskData(TaskRepository repository, RepositoryTaskData taskData, IProgressMonitor monitor) throws CoreException;
-
- /**
- * @param repositoryUrl
- * @param repositoryKind
- * @param taskKind AbstractTask.DEFAULT_KIND or connector specific task kind string
- * @return
- */
- public AbstractAttributeFactory getAttributeFactory(String repositoryUrl, String repositoryKind, String taskKind);
-
- /**
- * Initialize a new task data object with default attributes and values
- */
- public boolean initializeTaskData(TaskRepository repository, RepositoryTaskData data, IProgressMonitor monitor) throws CoreException;
-
- public AbstractAttributeFactory getAttributeFactory(RepositoryTaskData taskData);
-
- public Set<String> getSubTaskIds(RepositoryTaskData taskData);
-
-}

Back to the top