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
	private String principal;
36
	private String docid;
37
	private String event;
38
39
40
	/**
41 2097 jones
	 * Construct an EventLogData object with event log information.
42
	 *
43
	 * @param ipAddress the internet protocol address for the event
44
	 * @param principal the principal for the event (a username, etc)
45
	 * @param docid the identifier of the document to which the event applies
46
	 * @param revision the revision of the document to which the event applies
47
	 * @param event the string code for the event
48 2096 jones
	 */
49
	public EventLogData(String ipAddress, String principal, String docid,
50 2101 jones
			String event) {
51 2096 jones
		this.ipAddress = ipAddress;
52
		this.principal = principal;
53
		this.docid = docid;
54
		this.event = event;
55
	}
56
57
	/**
58 2097 jones
	 * Get the current value of the document identifier.
59 2096 jones
	 * @return Returns the docid.
60
	 */
61
	public String getDocid() {
62
		return docid;
63
	}
64
65
	/**
66 2097 jones
	 * Set the document identifier.
67
	 *
68 2096 jones
	 * @param docid The docid to set.
69
	 */
70
	public void setDocid(String docid) {
71
		this.docid = docid;
72
	}
73
74
	/**
75 2097 jones
	 * Get the current value of the event.
76
	 *
77 2096 jones
	 * @return Returns the event.
78
	 */
79
	public String getEvent() {
80
		return event;
81
	}
82
83
	/**
84 2097 jones
	 * Set the current value of the event.
85
	 *
86 2096 jones
	 * @param event The event to set.
87
	 */
88
	public void setEvent(String event) {
89
		this.event = event;
90
	}
91
92
	/**
93 2097 jones
	 * Get the current value of the internet protocol address.
94
	 *
95 2096 jones
	 * @return Returns the ipAddress.
96
	 */
97
	public String getIpAddress() {
98
		return ipAddress;
99
	}
100
101
	/**
102 2097 jones
	 * Set the current value of the internet protocol address.
103
	 *
104 2096 jones
	 * @param ipAddress The ipAddress to set.
105
	 */
106
	public void setIpAddress(String ipAddress) {
107
		this.ipAddress = ipAddress;
108
	}
109
110
	/**
111 2097 jones
	 * Get the current value of the principal.  This will be a username or
112
	 * other user identifier.
113
	 *
114 2096 jones
	 * @return Returns the principal.
115
	 */
116
	public String getPrincipal() {
117
		return principal;
118
	}
119
120
	/**
121 2097 jones
	 * Set the current value of the principal.  This will be a username or
122
	 * other user identifier.
123
	 *
124 2096 jones
	 * @param principal The principal to set.
125
	 */
126
	public void setPrincipal(String principal) {
127
		this.principal = principal;
128
	}
129
}