KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > exceptions > data > Record


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 /*
21  * Record.java
22  *
23  * Created on November 7, 2006, 7:13 PM
24  *
25  */

26
27 package org.netbeans.modules.exceptions.data;
28 import java.io.Serializable JavaDoc;
29 import java.util.LinkedList JavaDoc;
30 import java.util.logging.Level JavaDoc;
31 import java.util.logging.LogRecord JavaDoc;
32
33 /**
34  *This class serves for sending a record from a user to server
35  *
36  * @author jindra
37  */

38
39
40 public class Record implements Serializable JavaDoc{
41     public static final int ITEMS_COUNT = 5;
42     
43     private String JavaDoc[] userData;//component, subComponent, assignedTo, summary, comment
44
private StackTraceElement JavaDoc[] stackTrace;
45     private String JavaDoc oSystem;
46     private String JavaDoc version;
47     private String JavaDoc vMachine;
48     private String JavaDoc userName;
49     // private String password;
50
private LinkedList JavaDoc<LogRecord JavaDoc> logger;
51     private String JavaDoc severity;
52     private String JavaDoc className;//ExceptionClassName
53
private String JavaDoc message;
54     //jeste by to chtelo annotations!
55

56     /** Creates a new instance of Record */
57     public Record() {
58     }
59     
60     public String JavaDoc[] getUserData() {
61         return userData;
62     }
63     
64     public void setUserData(String JavaDoc[] _userData){
65         userData=_userData;
66     }
67     
68     public StackTraceElement JavaDoc[] getThrowable() {
69         return stackTrace;
70     }
71     
72     public void setThrowable(StackTraceElement JavaDoc[] _stackTrace){
73         stackTrace = _stackTrace;
74     }
75     
76     public String JavaDoc getClassName() {
77         return className;
78     }
79     
80     public void setClassName(String JavaDoc _className){
81         className = _className;
82     }
83     
84     public String JavaDoc getOs() {
85         return oSystem;
86     }
87     
88     public void setOs(String JavaDoc _oSystem) {
89         this.oSystem = _oSystem;
90     }
91     
92     public String JavaDoc getVersion() {
93         return version;
94     }
95     
96     public void setVersion(String JavaDoc version) {
97         this.version = version;
98     }
99     
100     public String JavaDoc getVm() {
101         return vMachine;
102     }
103     
104     public void setVm(String JavaDoc _vMachine) {
105         this.vMachine = _vMachine;
106     }
107     
108     public String JavaDoc getUserName() {
109         return userName;
110     }
111     
112     public void setUserName(String JavaDoc userName) {
113         this.userName = userName;
114     }
115     
116     public LinkedList JavaDoc<LogRecord JavaDoc> getLogger() {
117         return logger;
118     }
119     
120     public void setLogger(LinkedList JavaDoc<LogRecord JavaDoc> logger) {
121         this.logger = logger;
122     }
123     
124     public Level JavaDoc getSeverity(){
125         return Level.parse(severity);
126     }
127     
128     public void setSeverity(Level JavaDoc _Severity){
129         severity = _Severity.toString();
130     }
131     
132     public String JavaDoc getMessage(){
133         if (message!= null) return message;
134         else return new String JavaDoc();
135     }
136     
137     public void setMessage(String JavaDoc _message){
138         message = _message;
139     }
140     
141     
142 }
143
Popular Tags