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
|
/*******************************************************************************
* Copyright (c) 2003 - 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.bugzilla.core.history;
/**
* @author John Anvik
*/
public enum StatusType {
VERIFIED,
RESOLVED,
CLOSED,
REOPENED,
ASSIGNED,
NEW,
UNCONFIRMED,
NEEDINFO, /* ANT? */
WAITING , /* GCC */
SUSPENDED, /* GCC */
MODIFIED, /* Redhat */
POST, /* Redhat */
INVESTIGATE, /* Redhat */
PASSES_QA, /* Redhat */
PROD_READY, /* Redhat */
RELEASE_PENDING, /* Redhat */
ON_QA, /* Redhat */
QA_READY, /* Redhat */
FAILS_QA, /* Redhat */
SPEC, /* Redhat */
UNKNOWN;
public static StatusType convert(String change) {
if (change.equals("RESOLVED")) {
return RESOLVED;
}
if (change.equals("ASSIGNED")) {
return ASSIGNED;
}
if (change.equals("NEW")) {
return NEW;
}
if (change.equals("REOPENED")) {
return REOPENED;
}
if (change.equals("CLOSED")) {
return CLOSED;
}
if (change.equals("VERIFIED")) {
return VERIFIED;
}
if (change.equals("UNCONFIRMED")) {
return UNCONFIRMED;
}
if(change.startsWith("NEEDINFO")){
return NEEDINFO;
}
if(change.equals("WAITING")){
return WAITING;
}
if(change.equals("SUSPENDED")){
return SUSPENDED;
}
if(change.equals("MODIFIED")){
return MODIFIED;
}
if(change.equals("POST")){
return POST;
}
if(change.equals("INVESTIGATE")){
return INVESTIGATE;
}
if(change.equals("PASSES_QA")){
return PASSES_QA;
}
if(change.equals("PROD_READY")){
return PROD_READY;
}
if(change.equals("RELEASE_PENDING")){
return RELEASE_PENDING;
}
if(change.equals("ON_QA")){
return ON_QA;
}
if(change.equals("QA_READY")){
return QA_READY;
}
if(change.equals("FAILS_QA")){
return FAILS_QA;
}
if(change.equals("SPEC")){
return SPEC;
}
if (change.equals("") == false) {
System.err.println("Unknown status type: " + change);
}
return UNKNOWN;
}
}
|