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: jones $'
7
 *     '$Date: 2004-04-01 22:49:30 -0800 (Thu, 01 Apr 2004) $'
8
 * '$Revision: 2097 $'
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 principal;
36
	private String docid;
37
    private long revision;
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,
51
			long revision, String event) {
52
		this.ipAddress = ipAddress;
53
		this.principal = principal;
54
		this.docid = docid;
55
		this.revision = revision;
56
		this.event = event;
57
	}
58
	
59
	/**
60
	 * Get the current value of the document identifier.
61
	 * @return Returns the docid.
62
	 */
63
	public String getDocid() {
64
		return docid;
65
	}
66
	
67
	/**
68
	 * Set the document identifier.
69
	 * 
70
	 * @param docid The docid to set.
71
	 */
72
	public void setDocid(String docid) {
73
		this.docid = docid;
74
	}
75
	
76
	/**
77
	 * Get the current value of the event.
78
	 * 
79
	 * @return Returns the event.
80
	 */
81
	public String getEvent() {
82
		return event;
83
	}
84
	
85
	/**
86
	 * Set the current value of the event.
87
	 * 
88
	 * @param event The event to set.
89
	 */
90
	public void setEvent(String event) {
91
		this.event = event;
92
	}
93
	
94
	/**
95
	 * Get the current value of the internet protocol address.
96
	 * 
97
	 * @return Returns the ipAddress.
98
	 */
99
	public String getIpAddress() {
100
		return ipAddress;
101
	}
102
	
103
	/**
104
	 * Set the current value of the internet protocol address.
105
	 * 
106
	 * @param ipAddress The ipAddress to set.
107
	 */
108
	public void setIpAddress(String ipAddress) {
109
		this.ipAddress = ipAddress;
110
	}
111
	
112
	/**
113
	 * Get the current value of the principal.  This will be a username or 
114
	 * other user identifier.
115
	 * 
116
	 * @return Returns the principal.
117
	 */
118
	public String getPrincipal() {
119
		return principal;
120
	}
121
	
122
	/**
123
	 * Set the current value of the principal.  This will be a username or 
124
	 * other user identifier.
125
	 * 
126
	 * @param principal The principal to set.
127
	 */
128
	public void setPrincipal(String principal) {
129
		this.principal = principal;
130
	}
131
	
132
	/**
133
	 * Get the current value of the document revision.
134
	 * 
135
	 * @return Returns the revision.
136
	 */
137
	public long getRevision() {
138
		return revision;
139
	}
140
	
141
	/**
142
	 * Set the current value of the document revision.
143
	 * 
144
	 * @param revision The revision to set.
145
	 */
146
	public void setRevision(long revision) {
147
		this.revision = revision;
148
	}
149
}
(36-36/61)