Skip to main content
summaryrefslogtreecommitdiffstats
blob: 0547e7ad01c19578d1864b29a0c48f44cedc5d7d (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
118
/*******************************************************************************
 * 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.internal.tasklist;

/**
 * Bugzilla XML element enum. Each enum has the attribute name
 * and associated xml element tag name.
 * 
 * @author Rob Elves
 */
public class BugzillaReportElement {
	// Format: ENUM ( "pretty name", "xml key", <hidden: true/false>, <readonly: true/false>)
	// Hidden elements are not automatically displayed in ui	
	public static final BugzillaReportElement ASSIGNED_TO = new BugzillaReportElement("Assigned to:", "assigned_to", false, true);
	public static final BugzillaReportElement ATTACHID = new BugzillaReportElement("attachid", "attachid");
	public static final BugzillaReportElement ATTACHMENT = new BugzillaReportElement("attachment", "attachment");
	public static final BugzillaReportElement BLOCKED = new BugzillaReportElement("Bug blocks:", "blocked");
	public static final BugzillaReportElement BUG = new BugzillaReportElement("bug","bug", true);
	public static final BugzillaReportElement BUG_FILE_LOC = new BugzillaReportElement("URL:", "bug_file_loc", true);
	public static final BugzillaReportElement BUG_ID = new BugzillaReportElement("Bug:", "bug_id", true);
	public static final BugzillaReportElement BUG_SEVERITY = new BugzillaReportElement("Severity:", "bug_severity", false);
	public static final BugzillaReportElement BUG_STATUS = new BugzillaReportElement("Status:", "bug_status", false, true);
	public static final BugzillaReportElement BUG_WHEN = new BugzillaReportElement("bug_when", "bug_when", true, true);
	public static final BugzillaReportElement BUGZILLA = new BugzillaReportElement("bugzilla", "bugzilla", true);
	public static final BugzillaReportElement CC = new BugzillaReportElement("CC:", "cc", true, true);
	public static final BugzillaReportElement CCLIST_ACCESSIBLE = new BugzillaReportElement("cclist_accessible", "cclist_accessible", true);
	public static final BugzillaReportElement CLASSIFICATION = new BugzillaReportElement("Classification:", "classification", true);
	public static final BugzillaReportElement CLASSIFICATION_ID = new BugzillaReportElement("Classification ID:", "classification_id", true);
	public static final BugzillaReportElement COMPONENT = new BugzillaReportElement("Component:", "component", false);
	public static final BugzillaReportElement CREATION_TS = new BugzillaReportElement("Creation date:", "creation_ts", true);
	public static final BugzillaReportElement CTYPE = new BugzillaReportElement("Content Type", "ctype");
	public static final BugzillaReportElement DATA = new BugzillaReportElement("data", "data"); 
	public static final BugzillaReportElement DATE = new BugzillaReportElement("Date", "date"); 
	public static final BugzillaReportElement DELTA_TS = new BugzillaReportElement("Last Modification", "delta_ts", true); 
	public static final BugzillaReportElement DEPENDSON = new BugzillaReportElement("Bug depends on:", "dependson"); 
	public static final BugzillaReportElement DESC = new BugzillaReportElement("desc", "desc"); 
	public static final BugzillaReportElement EVERCONFIRMED = new BugzillaReportElement("everconfirmed", "everconfirmed", true);
	public static final BugzillaReportElement FILENAME = new BugzillaReportElement("filename", "filename");
	public static final BugzillaReportElement IS_OBSOLETE = new BugzillaReportElement("Obsolete", "isobsolete", true); 
	public static final BugzillaReportElement KEYWORDS = new BugzillaReportElement("Keywords:", "keywords", true);
	public static final BugzillaReportElement LONG_DESC = new BugzillaReportElement("Description:", "long_desc"); 
	public static final BugzillaReportElement LONGDESCLENGTH = new BugzillaReportElement("Number of comments", "longdesclength", true); 
	public static final BugzillaReportElement NEWCC = new BugzillaReportElement("Add CC:", "newcc", true); 
	public static final BugzillaReportElement OP_SYS = new BugzillaReportElement("OS:", "op_sys", false); 
	public static final BugzillaReportElement PRIORITY = new BugzillaReportElement("Priority:", "priority", false); 
	public static final BugzillaReportElement PRODUCT = new BugzillaReportElement("Product:", "product", false); 
	public static final BugzillaReportElement REP_PLATFORM = new BugzillaReportElement("Platform:", "rep_platform", false);
	public static final BugzillaReportElement REPORTER = new BugzillaReportElement("Reporter:", "reporter", false, true);
	public static final BugzillaReportElement REPORTER_ACCESSIBLE = new BugzillaReportElement("reporter_accessible", "reporter_accessible", true);
	public static final BugzillaReportElement RESOLUTION = new BugzillaReportElement("Resolution:", "resolution", false, true); // Exiting bug field, new cc
	public static final BugzillaReportElement SHORT_DESC = new BugzillaReportElement("Summary:", "short_desc", true);
	public static final BugzillaReportElement TARGET_MILESTONE = new BugzillaReportElement("Target milestone:", "target_milestone", false);
	public static final BugzillaReportElement THETEXT = new BugzillaReportElement("thetext", "thetext");
	public static final BugzillaReportElement TYPE = new BugzillaReportElement("type", "type");
	public static final BugzillaReportElement UNKNOWN = new BugzillaReportElement("UNKNOWN", "UNKNOWN");
	public static final BugzillaReportElement VERSION = new BugzillaReportElement("Version:", "version", false);
	public static final BugzillaReportElement VOTES = new BugzillaReportElement("Votes:", "votes", false, true);
	public static final BugzillaReportElement WHO = new BugzillaReportElement("who", "who");
	public static final BugzillaReportElement QA_CONTACT= new BugzillaReportElement("QA Contact", "qa_contact", false, false);
	public static final BugzillaReportElement ADDSELFCC = new BugzillaReportElement("Add self to CC", "addselfcc", true, false);
	// Used by search engine
	public static final BugzillaReportElement LI = new BugzillaReportElement("used by search engine", "li", true);
	public static final BugzillaReportElement ID = new BugzillaReportElement("used by search engine", "id", true);
	public static final BugzillaReportElement SHORT_SHORT_DESC = new BugzillaReportElement("used by search engine", "short_short_desc", false);
	public static final BugzillaReportElement SEQ = new BugzillaReportElement("used by search engine", "seq", false);	
	public static final BugzillaReportElement RESULT = new BugzillaReportElement("used by search engine", "result", false);
	public static final BugzillaReportElement RDF = new BugzillaReportElement("used by search engine", "rdf", false);
	public static final BugzillaReportElement INSTALLATION = new BugzillaReportElement("used by search engine", "installation", false);
	public static final BugzillaReportElement BUGS = new BugzillaReportElement("used by search engine", "bugs", false);
	
	private final boolean isHidden;
	
	private final boolean isReadOnly;
	
	private final String keyString;
	
	private final String prettyName;

	BugzillaReportElement(String prettyName, String fieldName) {		
		this(prettyName, fieldName, false, false);
	}
	
	BugzillaReportElement(String prettyName, String fieldName, boolean hidden) {		
		this(prettyName, fieldName, hidden, false);
	}
	
	BugzillaReportElement(String prettyName, String fieldName, boolean hidden, boolean readonly) {		
		this.prettyName = prettyName;
		this.keyString = fieldName;
		this.isHidden = hidden;
		this.isReadOnly = readonly;
	}

	public String getKeyString() {
		return keyString;
	}

	public boolean isHidden() {
		return isHidden;
	}	
	
	public boolean isReadOnly() {
		return isReadOnly;
	}
	
	public String toString() {
		return prettyName;
	}
}

Back to the top