|
Lines 21-26
Link Here
|
| 21 |
public class TaskSelection { |
21 |
public class TaskSelection { |
| 22 |
|
22 |
|
| 23 |
private final RepositoryTaskData taskData; |
23 |
private final RepositoryTaskData taskData; |
|
|
24 |
|
| 25 |
private String copyContextHandleIdentifier; |
| 24 |
|
26 |
|
| 25 |
public TaskSelection(RepositoryTaskData taskData) { |
27 |
public TaskSelection(RepositoryTaskData taskData) { |
| 26 |
if (taskData == null) { |
28 |
if (taskData == null) { |
|
Lines 30-35
Link Here
|
| 30 |
try { |
32 |
try { |
| 31 |
this.taskData = (RepositoryTaskData) TaskDataManager.ObjectCloner.deepCopy(taskData); |
33 |
this.taskData = (RepositoryTaskData) TaskDataManager.ObjectCloner.deepCopy(taskData); |
| 32 |
this.taskData.setAttributeFactory(taskData.getAttributeFactory()); |
34 |
this.taskData.setAttributeFactory(taskData.getAttributeFactory()); |
|
|
35 |
this.copyContextHandleIdentifier = null; |
| 33 |
} catch (Exception e) { |
36 |
} catch (Exception e) { |
| 34 |
StatusHandler.fail(e, "Error creating a task data copy", false); |
37 |
StatusHandler.fail(e, "Error creating a task data copy", false); |
| 35 |
throw new RuntimeException(e); |
38 |
throw new RuntimeException(e); |
|
Lines 42-47
Link Here
|
| 42 |
taskData.setSummary(task.getSummary()); |
45 |
taskData.setSummary(task.getSummary()); |
| 43 |
taskData.setAttributeValue(RepositoryTaskAttribute.PRIORITY, task.getPriority()); |
46 |
taskData.setAttributeValue(RepositoryTaskAttribute.PRIORITY, task.getPriority()); |
| 44 |
this.taskData = taskData; |
47 |
this.taskData = taskData; |
|
|
48 |
this.copyContextHandleIdentifier = null; |
| 45 |
} |
49 |
} |
| 46 |
|
50 |
|
| 47 |
public TaskSelection(String summary, String description) { |
51 |
public TaskSelection(String summary, String description) { |
|
Lines 50-61
Link Here
|
| 50 |
taskData.setSummary(summary); |
54 |
taskData.setSummary(summary); |
| 51 |
taskData.setDescription(description); |
55 |
taskData.setDescription(description); |
| 52 |
this.taskData = taskData; |
56 |
this.taskData = taskData; |
|
|
57 |
this.copyContextHandleIdentifier = null; |
| 58 |
} |
| 59 |
|
| 60 |
public TaskSelection(String copyContextHandleIdentifier) { |
| 61 |
this.taskData = null; |
| 62 |
this.copyContextHandleIdentifier = copyContextHandleIdentifier; |
| 53 |
} |
63 |
} |
| 54 |
|
64 |
|
| 55 |
public RepositoryTaskData getTaskData() { |
65 |
public RepositoryTaskData getTaskData() { |
| 56 |
return taskData; |
66 |
return taskData; |
| 57 |
} |
67 |
} |
| 58 |
|
68 |
|
|
|
69 |
public String getCopyContextHandleIdentifier() { |
| 70 |
return copyContextHandleIdentifier; |
| 71 |
} |
| 72 |
|
| 59 |
private class IdentityAttributeFactory extends AbstractAttributeFactory { |
73 |
private class IdentityAttributeFactory extends AbstractAttributeFactory { |
| 60 |
|
74 |
|
| 61 |
private static final long serialVersionUID = 1L; |
75 |
private static final long serialVersionUID = 1L; |