Project

General

Profile

1
/**
2
 *  '$RCSfile$'
3
 *  Copyright: 2004 Regents of the University of California and the
4
 *             National Center for Ecological Analysis and Synthesis
5
 *
6
 *   '$Author: leinfelder $'
7
 *     '$Date: 2011-10-20 14:03:19 -0700 (Thu, 20 Oct 2011) $'
8
 * '$Revision: 6542 $'
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
 * 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
 * @author jones
32
 */
33
public class EventLogData {
34
	private String ipAddress;
35
	private String userAgent;
36
	private String principal;
37
	private String docid;
38
	private String event;
39
	
40
	
41
	/**
42
	 * 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
	 */
50
	public EventLogData(String ipAddress, String principal, String docid, String event) {
51
		this.ipAddress = ipAddress;
52
		this.principal = principal;
53
		this.docid = docid;
54
		this.event = event;
55
	}
56
	
57
	/**
58
	 * Get the current value of the document identifier.
59
	 * @return Returns the docid.
60
	 */
61
	public String getDocid() {
62
		return docid;
63
	}
64
	
65
	/**
66
	 * Set the document identifier.
67
	 * 
68
	 * @param docid The docid to set.
69
	 */
70
	public void setDocid(String docid) {
71
		this.docid = docid;
72
	}
73
	
74
	/**
75
	 * Get the current value of the event.
76
	 * 
77
	 * @return Returns the event.
78
	 */
79
	public String getEvent() {
80
		return event;
81
	}
82
	
83
	/**
84
	 * Set the current value of the event.
85
	 * 
86
	 * @param event The event to set.
87
	 */
88
	public void setEvent(String event) {
89
		this.event = event;
90
	}
91
	
92
	/**
93
	 * Get the current value of the internet protocol address.
94
	 * 
95
	 * @return Returns the ipAddress.
96
	 */
97
	public String getIpAddress() {
98
		return ipAddress;
99
	}
100
	
101
	/**
102
	 * Set the current value of the internet protocol address.
103
	 * 
104
	 * @param ipAddress The ipAddress to set.
105
	 */
106
	public void setIpAddress(String ipAddress) {
107
		this.ipAddress = ipAddress;
108
	}
109
	
110
	/**
111
	 * Get the current value of the principal.  This will be a username or 
112
	 * other user identifier.
113
	 * 
114
	 * @return Returns the principal.
115
	 */
116
	public String getPrincipal() {
117
		return principal;
118
	}
119
	
120
	/**
121
	 * Set the current value of the principal.  This will be a username or 
122
	 * other user identifier.
123
	 * 
124
	 * @param principal The principal to set.
125
	 */
126
	public void setPrincipal(String principal) {
127
		this.principal = principal;
128
	}
129

    
130
	public String getUserAgent() {
131
		return userAgent;
132
	}
133

    
134
	public void setUserAgent(String userAgent) {
135
		this.userAgent = userAgent;
136
	}
137
}
(36-36/65)