KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > tasklist > bugs > issues > IssuesList


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.modules.tasklist.bugs.issues;
21
22 import java.util.ArrayList JavaDoc;
23 import java.util.List JavaDoc;
24
25 /**
26  * List of issues
27  */

28 public class IssuesList {
29     private int freeId;
30
31     /** List of issues. <Issue> */
32     public List JavaDoc issues = new ArrayList JavaDoc();
33
34     /** List of components. <ProductComponent> */
35     public List JavaDoc components = new ArrayList JavaDoc();
36
37     /** List of issue statuses. <String> */
38     public List JavaDoc statuses = new ArrayList JavaDoc();
39
40     /** List of issue resolutions. <String> */
41     public List JavaDoc resolutions = new ArrayList JavaDoc();
42     
43     /** List of platforms. <String> */
44     public List JavaDoc platforms = new ArrayList JavaDoc();
45     
46     /** List of operating systems. <String> */
47     public List JavaDoc operatingSystems = new ArrayList JavaDoc();
48     
49     /** List of available product versions. <String> */
50     public List JavaDoc versions = new ArrayList JavaDoc();
51     
52     /** List of priorities for the issues. <String> */
53     public List JavaDoc priorities = new ArrayList JavaDoc();
54     
55     /** List of issue types (bug, enhancement etc.). <String> */
56     public List JavaDoc issueTypes = new ArrayList JavaDoc();
57     
58     /** List of persons. <Person> */
59     public List JavaDoc persons = new ArrayList JavaDoc();
60     
61     /**
62      * Creates a new instance of IssuesList
63      */

64     public IssuesList() {
65     }
66     
67     /**
68      * Returns the number of issues
69      *
70      * @return number of issues
71      */

72     public int getIssueCount() {
73         return issues.size();
74     }
75     
76     /**
77      * Returns an issue
78      *
79      * @return issue with the given index
80      */

81     public Issue getIssue(int index) {
82         return (Issue) issues.get(index);
83     }
84     
85     /**
86      * Creates an issue
87      *
88      * @return created issue
89      */

90     public Issue createIssue() {
91         Issue issue = new Issue(this, freeId++);
92         issues.add(issue);
93         return issue;
94     }
95 }
96
Popular Tags