Project

General

Profile

1 2096 jones
/**
2
 *  '$RCSfile$'
3
 *  Copyright: 2004 Regents of the University of California and the
4
 *             National Center for Ecological Analysis and Synthesis
5
 *
6
 *   '$Author$'
7
 *     '$Date$'
8
 * '$Revision$'
9
 *
10
 * This program is free software; you can redistribute it and/or modify
11
 * it under the terms of the GNU General Public License as published by
12
 * the Free Software Foundation; either version 2 of the License, or
13
 * (at your option) any later version.
14
 *
15
 * This program is distributed in the hope that it will be useful,
16
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
 * GNU General Public License for more details.
19
 *
20
 * You should have received a copy of the GNU General Public License
21
 * along with this program; if not, write to the Free Software
22
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
23
 */
24
package edu.ucsb.nceas.metacat;
25
26
/**
27 2097 jones
 * A data structure holding the information to be logged about an event.
28
 *
29
 * TODO: add a timestamp field for when the event occurred.
30
 *
31 2096 jones
 * @author jones
32
 */
33
public class EventLogData {
34
	private String ipAddress;
35 6542 leinfelder
	private String userAgent;
36 2096 jones
	private String principal;
37
	private String docid;
38
	private String event;
39
40
41
	/**
42 2097 jones
	 * Construct an EventLogData object with event log information.
43
	 *
44
	 * @param ipAddress the internet protocol address for the event
45
	 * @param principal the principal for the event (a username, etc)
46
	 * @param docid the identifier of the document to which the event applies
47
	 * @param revision the revision of the document to which the event applies
48
	 * @param event the string code for the event
49 2096 jones
	 */
50 9098 tao
	public EventLogData(String ipAddress, String userAgent, String principal, String docid, String event) {
51 2096 jones
		this.ipAddress = ipAddress;
52 9098 tao
		this.userAgent = userAgent;
53 2096 jones
		this.principal = principal;
54
		this.docid = docid;
55
		this.event = event;
56
	}
57
58
	/**
59 2097 jones
	 * Get the current value of the document identifier.
60 2096 jones
	 * @return Returns the docid.
61
	 */
62
	public String getDocid() {
63
		return docid;
64
	}
65
66
	/**
67 2097 jones
	 * Set the document identifier.
68
	 *
69 2096 jones
	 * @param docid The docid to set.
70
	 */
71
	public void setDocid(String docid) {
72
		this.docid = docid;
73
	}
74
75
	/**
76 2097 jones
	 * Get the current value of the event.
77
	 *
78 2096 jones
	 * @return Returns the event.
79
	 */
80
	public String getEvent() {
81
		return event;
82
	}
83
84
	/**
85 2097 jones
	 * Set the current value of the event.
86
	 *
87 2096 jones
	 * @param event The event to set.
88
	 */
89
	public void setEvent(String event) {
90
		this.event = event;
91
	}
92
93
	/**
94 2097 jones
	 * Get the current value of the internet protocol address.
95
	 *
96 2096 jones
	 * @return Returns the ipAddress.
97
	 */
98
	public String getIpAddress() {
99
		return ipAddress;
100
	}
101
102
	/**
103 2097 jones
	 * Set the current value of the internet protocol address.
104
	 *
105 2096 jones
	 * @param ipAddress The ipAddress to set.
106
	 */
107
	public void setIpAddress(String ipAddress) {
108
		this.ipAddress = ipAddress;
109
	}
110
111
	/**
112 2097 jones
	 * Get the current value of the principal.  This will be a username or
113
	 * other user identifier.
114
	 *
115 2096 jones
	 * @return Returns the principal.
116
	 */
117
	public String getPrincipal() {
118
		return principal;
119
	}
120
121
	/**
122 2097 jones
	 * Set the current value of the principal.  This will be a username or
123
	 * other user identifier.
124
	 *
125 2096 jones
	 * @param principal The principal to set.
126
	 */
127
	public void setPrincipal(String principal) {
128
		this.principal = principal;
129
	}
130 6542 leinfelder
131
	public String getUserAgent() {
132
		return userAgent;
133
	}
134
135
	public void setUserAgent(String userAgent) {
136
		this.userAgent = userAgent;
137
	}
138 2096 jones
}