From 4b2e39fe7a63a22787ed6deed460df0717e5f817 Mon Sep 17 00:00:00 2001 From: relves Date: Tue, 6 Jun 2006 16:42:55 +0000 Subject: Progress on: 144998: create common offline report storage https://bugs.eclipse.org/bugs/show_bug.cgi?id=144998 --- .../tasklist/AbstractRepositoryTask.java | 29 +++++++++++----------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/provisional/tasklist/AbstractRepositoryTask.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/provisional/tasklist/AbstractRepositoryTask.java index 763ce8a49..5a6ca771f 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/provisional/tasklist/AbstractRepositoryTask.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/provisional/tasklist/AbstractRepositoryTask.java @@ -27,9 +27,11 @@ public abstract class AbstractRepositoryTask extends Task { /** The last time this task's bug report was downloaded from the server. */ protected Date lastSynchronized; - protected RepositoryTaskData taskData; + + protected transient RepositoryTaskData taskData; + protected boolean currentlySynchronizing; - + /** * Value is true if the bug report has saved changes that * need synchronizing with the repository. @@ -39,24 +41,25 @@ public abstract class AbstractRepositoryTask extends Task { public enum RepositoryTaskSyncState { OUTGOING, SYNCHRONIZED, INCOMING, CONFLICT } - + protected RepositoryTaskSyncState syncState = RepositoryTaskSyncState.SYNCHRONIZED; public static final String HANDLE_DELIM = "-"; - + public AbstractRepositoryTask(String handle, String label, boolean newTask) { super(handle, label, newTask); } public abstract String getRepositoryKind(); - + /** - * @return true if the task can be queried and manipulated without connecting to the server + * @return true if the task can be queried and manipulated without + * connecting to the server */ public abstract boolean isPersistentInWorkspace(); - + public abstract boolean isDownloaded(); - + public Date getLastSynchronized() { return lastSynchronized; } @@ -72,7 +75,7 @@ public abstract class AbstractRepositoryTask extends Task { public RepositoryTaskSyncState getSyncState() { return syncState; } - + /** * @return The number of seconds ago that this task's bug report was * downloaded from the server. @@ -142,7 +145,8 @@ public abstract class AbstractRepositoryTask extends Task { } /** - * @param taskId must be an integer + * @param taskId + * must be an integer */ public static String getHandle(String repositoryUrl, String taskId) { if (repositoryUrl == null) { @@ -165,18 +169,15 @@ public abstract class AbstractRepositoryTask extends Task { this.isDirty = isDirty; } - public RepositoryTaskData getTaskData() { return taskData; } - public void setTaskData(RepositoryTaskData taskData) { this.taskData = taskData; // TODO: remove? if (taskData != null) { - setDescription(HtmlStreamTokenizer.unescape(AbstractRepositoryTask - .getTaskIdAsInt(getHandleIdentifier()) + setDescription(HtmlStreamTokenizer.unescape(AbstractRepositoryTask.getTaskIdAsInt(getHandleIdentifier()) + ": " + taskData.getSummary())); } } -- cgit v1.2.3