KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > tasklist > bugs > BugEngines


1 package org.netbeans.modules.tasklist.bugs;
2
3 import org.netbeans.modules.tasklist.bugs.issuezilla.IZBugEngine;
4 import org.netbeans.modules.tasklist.bugs.bugzilla.BZBugEngine;
5 import org.netbeans.modules.tasklist.bugs.javanet.JavaNetEngine;
6 import org.netbeans.modules.tasklist.bugs.scarab.ScarabEngine;
7
8 /**
9  * TODO document
10  *
11  * @author Petr Kuzel
12  */

13 public final class BugEngines {
14
15     static String JavaDoc IZ = "Issuezilla";
16
17     static String JavaDoc BZ = "Bugzilla";
18
19     // it has fixed URL, same Sf.net etc
20
static String JavaDoc JAVA_NET = "Java.net";
21     
22     static String JavaDoc SCARAB = "Scarab";
23
24     static String JavaDoc[] list() {
25         return new String JavaDoc[] {IZ, BZ, JAVA_NET, SCARAB};
26     }
27
28     static BugEngine get(String JavaDoc id) {
29         if (IZ.equals(id)) {
30             return new IZBugEngine();
31         } else if (BZ.equals(id)) {
32             return new BZBugEngine();
33         } else if (JAVA_NET.equals(id)) {
34             return new JavaNetEngine();
35         } else if (SCARAB.equals(id)) {
36             return new ScarabEngine();
37         } else {
38             assert false : "Invalid id " + id;
39             return null;
40         }
41     }
42
43 }
44
Popular Tags