01: /*
02: * $Id: Log.java 1178 2007-06-19 11:56:51Z hengels $
03: * (c) Copyright 2004 con:cern development team.
04: *
05: * This file is part of con:cern (http://concern.sf.net).
06: *
07: * con:cern is free software; you can redistribute it and/or modify
08: * it under the terms of the GNU Lesser General Public License
09: * as published by the Free Software Foundation; either version 2.1
10: * of the License, or (at your option) any later version.
11: *
12: * Please see COPYING for the complete licence.
13: */
14: package org.concern;
15:
16: import java.sql.Timestamp;
17: import java.io.Serializable;
18: import java.util.Map;
19:
20: /**
21: * @author hengels
22: */
23: public class Log implements Serializable {
24: private String userValue;
25: private String activity;
26: private boolean success;
27: private String message;
28: private String details;
29: private Map<String, String> annotations;
30: private Timestamp timestamp;
31:
32: public Log(String userValue, String activity, boolean success,
33: String message, String details,
34: Map<String, String> annotations, Timestamp timestamp) {
35: this .userValue = userValue;
36: this .activity = activity;
37: this .success = success;
38: this .message = message;
39: this .details = details;
40: this .annotations = annotations;
41: this .timestamp = timestamp;
42: }
43:
44: public String getUserValue() {
45: return userValue;
46: }
47:
48: public String getActivity() {
49: return activity;
50: }
51:
52: public boolean isSuccess() {
53: return success;
54: }
55:
56: public String getMessage() {
57: return message;
58: }
59:
60: public String getDetails() {
61: return details;
62: }
63:
64: public Map<String, String> getAnnotations() {
65: return annotations;
66: }
67:
68: public Timestamp getTimestamp() {
69: return timestamp;
70: }
71:
72: public String toString() {
73: return (success ? "+ " : "- ") + userValue + " " + activity
74: + ": " + message;
75: }
76: }
|