Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2009-09-25 16:43:47 -0400
committerspingel2009-09-25 16:43:47 -0400
commit363f6612af780fac636c6275c1dc1689b2f0becd (patch)
treef52787260edcd17b47876c02b7253314fa2f91a8 /org.eclipse.mylyn.tasks.core
parent8a47b416492b040d39eda962d659c5229e9d2b63 (diff)
downloadorg.eclipse.mylyn.tasks-363f6612af780fac636c6275c1dc1689b2f0becd.tar.gz
org.eclipse.mylyn.tasks-363f6612af780fac636c6275c1dc1689b2f0becd.tar.xz
org.eclipse.mylyn.tasks-363f6612af780fac636c6275c1dc1689b2f0becd.zip
NEW - bug 290599: [api] support partial updating of repository configuration
https://bugs.eclipse.org/bugs/show_bug.cgi?id=290599
Diffstat (limited to 'org.eclipse.mylyn.tasks.core')
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/ITaskJobFactory.java2
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractRepositoryConnector.java28
2 files changed, 24 insertions, 6 deletions
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/ITaskJobFactory.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/ITaskJobFactory.java
index e2fb1e4d5..2c2f06a13 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/ITaskJobFactory.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/ITaskJobFactory.java
@@ -41,7 +41,7 @@ public interface ITaskJobFactory {
ITask task, TaskData taskData, Set<TaskAttribute> changedAttributes);
public abstract TaskJob createUpdateRepositoryConfigurationJob(AbstractRepositoryConnector connector,
- TaskRepository taskRepository);
+ TaskRepository taskRepository, ITask task);
public abstract SubmitJob createSubmitTaskAttachmentJob(AbstractRepositoryConnector connector,
TaskRepository taskRepository, ITask task, AbstractTaskAttachmentSource source, String comment,
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 12cd05865..ee79ff823 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
@@ -29,9 +29,7 @@ import org.eclipse.mylyn.tasks.core.sync.ISynchronizationSession;
/**
* Encapsulates common operations that can be performed on a task repository. Extend to connect with a Java API or WS
- * API for accessing the repository.
- *
- * Only methods that take a progress monitor can do network I/O.
+ * API for accessing the repository. Only methods that take a progress monitor can do network I/O.
*
* @author Mik Kersten
* @author Rob Elves
@@ -226,7 +224,6 @@ public abstract class AbstractRepositoryConnector {
/**
* Runs <code>query</code> on <code>repository</code>, results are passed to <code>collector</code>. If a repository
* does not return the full task data for a result, {@link TaskData#isPartial()} will return true.
- *
* <p>
* Implementors must complete executing <code>query</code> before returning from this method.
*
@@ -286,14 +283,35 @@ public abstract class AbstractRepositoryConnector {
}
/**
- * Reset and update the repository attributes from the server (e.g. products, components)
+ * Updates the local repository configuration cache (e.g. products and components). Connectors are encouraged to
+ * implement {@link #updateRepositoryConfiguration(TaskRepository, ITask, IProgressMonitor)} in addition this
+ * method.
*
+ * @param repository
+ * the repository to update configuration for
* @since 3.0
+ * @see #isRepositoryConfigurationStale(TaskRepository, IProgressMonitor)
*/
public abstract void updateRepositoryConfiguration(TaskRepository taskRepository, IProgressMonitor monitor)
throws CoreException;
/**
+ * Updates the local repository configuration cache (e.g. products and components). The default implementation
+ * invokes {@link #updateRepositoryConfiguration(TaskRepository, IProgressMonitor)}.
+ *
+ * @param repository
+ * the repository to update configuration for
+ * @param task
+ * if not null, limit the update to the details relevant to task
+ * @see #updateRepositoryConfiguration(TaskRepository, IProgressMonitor)
+ * @since 3.3
+ */
+ public void updateRepositoryConfiguration(TaskRepository taskRepository, ITask task, IProgressMonitor monitor)
+ throws CoreException {
+ updateRepositoryConfiguration(taskRepository, monitor);
+ }
+
+ /**
* @since 3.0
*/
public abstract void updateTaskFromTaskData(TaskRepository taskRepository, ITask task, TaskData taskData);

Back to the top