blob: 6c94337ccdffdf2826249a1f4a782d2c20fb1b9f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
|
/*******************************************************************************
* 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.mylar.tasks.core;
import java.io.Serializable;
/**
* @author Rob Elves
* @author Mik Kersten
*/
public class RepositoryAttachment extends AttributeContainer implements Serializable {
private static final long serialVersionUID = 2663237137799050826L;
private boolean isPatch = false;
private boolean isObsolete = false;
private String creator = "";
private String repositoryUrl;
private String repositoryKind;
private String taskId;
public RepositoryAttachment(AbstractAttributeFactory attributeFactory) {
super(attributeFactory);
}
public boolean isObsolete() {
return isObsolete;
}
public void setObsolete(boolean isObsolete) {
this.isObsolete = isObsolete;
}
/**
* Get the time that this attachment was posted
*
* @return The attachment's creation timestamp
*/
public String getDateCreated() {
return getAttributeValue(RepositoryTaskAttribute.ATTACHMENT_DATE);
}
public String getCreator() {
return creator;
}
public void setCreator(String creator) {
this.creator = creator;
}
public String getDescription() {
return getAttributeValue(RepositoryTaskAttribute.DESCRIPTION);
}
public String getId() {
return getAttributeValue(RepositoryTaskAttribute.ATTACHMENT_ID);
}
public String getUrl() {
return getAttributeValue(RepositoryTaskAttribute.ATTACHMENT_URL);
}
public String getContentType() {
// I've seen both "ctype" and "type" occur for this, investigate
if (getAttribute(RepositoryTaskAttribute.ATTACHMENT_TYPE) != null) {
return getAttributeValue(RepositoryTaskAttribute.ATTACHMENT_TYPE);
} else {
return getAttributeValue(RepositoryTaskAttribute.ATTACHMENT_CTYPE);
}
}
public boolean isPatch() {
return isPatch;
}
public void setPatch(boolean b) {
isPatch = b;
}
public String getRepositoryUrl() {
return repositoryUrl;
}
public void setRepositoryUrl(String repositoryUrl) {
this.repositoryUrl = repositoryUrl;
}
public String getRepositoryKind() {
return repositoryKind;
}
public void setRepositoryKind(String repositoryKind) {
this.repositoryKind = repositoryKind;
}
public String getTaskId() {
return taskId;
}
public void setTaskId(String taskId) {
this.taskId = taskId;
}
}
|