summaryrefslogtreecommitdiffstats
path: root/base/common/src/com/netscape/certsrv/logging
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2014-06-23 14:51:46 -0400
committerEndi S. Dewata <edewata@redhat.com>2014-06-24 16:45:07 -0400
commit7be5451f6bb665ab57300431fbcd1c30f51c2e04 (patch)
treee09dc309dab9095002c9c7c7532281f8e236f422 /base/common/src/com/netscape/certsrv/logging
parent0b4f4e78841abdb9ab90c7b084ddfe89f4043743 (diff)
downloadpki-7be5451f6bb665ab57300431fbcd1c30f51c2e04.tar.gz
pki-7be5451f6bb665ab57300431fbcd1c30f51c2e04.tar.xz
pki-7be5451f6bb665ab57300431fbcd1c30f51c2e04.zip
Fixed missing TPS activity attributes.
The ActivityService has been fixed to return the missing TPS activity attributes including IP, operation, result, and message. The TPS CLI and UI has been fixed to display the activity date in UTC format. Ticket #1050
Diffstat (limited to 'base/common/src/com/netscape/certsrv/logging')
-rw-r--r--base/common/src/com/netscape/certsrv/logging/ActivityData.java53
1 files changed, 50 insertions, 3 deletions
diff --git a/base/common/src/com/netscape/certsrv/logging/ActivityData.java b/base/common/src/com/netscape/certsrv/logging/ActivityData.java
index 0624cc73b..d918357ad 100644
--- a/base/common/src/com/netscape/certsrv/logging/ActivityData.java
+++ b/base/common/src/com/netscape/certsrv/logging/ActivityData.java
@@ -56,6 +56,7 @@ public class ActivityData {
String ip;
String operation;
String result;
+ String message;
Date date;
Link link;
@@ -88,11 +89,11 @@ public class ActivityData {
}
@XmlElement(name="IP")
- public String getIp() {
+ public String getIP() {
return ip;
}
- public void setIp(String ip) {
+ public void setIP(String ip) {
this.ip = ip;
}
@@ -114,6 +115,15 @@ public class ActivityData {
this.result = result;
}
+ @XmlElement(name="Message")
+ public String getMessage() {
+ return message;
+ }
+
+ public void setMessage(String message) {
+ this.message = message;
+ }
+
@XmlElement(name="Date")
public Date getDate() {
return date;
@@ -136,8 +146,14 @@ public class ActivityData {
public int hashCode() {
final int prime = 31;
int result = 1;
+ result = prime * result + ((date == null) ? 0 : date.hashCode());
result = prime * result + ((id == null) ? 0 : id.hashCode());
+ result = prime * result + ((ip == null) ? 0 : ip.hashCode());
result = prime * result + ((link == null) ? 0 : link.hashCode());
+ result = prime * result + ((message == null) ? 0 : message.hashCode());
+ result = prime * result + ((operation == null) ? 0 : operation.hashCode());
+ result = prime * result + ((this.result == null) ? 0 : this.result.hashCode());
+ result = prime * result + ((tokenID == null) ? 0 : tokenID.hashCode());
result = prime * result + ((userID == null) ? 0 : userID.hashCode());
return result;
}
@@ -151,16 +167,46 @@ public class ActivityData {
if (getClass() != obj.getClass())
return false;
ActivityData other = (ActivityData) obj;
+ if (date == null) {
+ if (other.date != null)
+ return false;
+ } else if (!date.equals(other.date))
+ return false;
if (id == null) {
if (other.id != null)
return false;
} else if (!id.equals(other.id))
return false;
+ if (ip == null) {
+ if (other.ip != null)
+ return false;
+ } else if (!ip.equals(other.ip))
+ return false;
if (link == null) {
if (other.link != null)
return false;
} else if (!link.equals(other.link))
return false;
+ if (message == null) {
+ if (other.message != null)
+ return false;
+ } else if (!message.equals(other.message))
+ return false;
+ if (operation == null) {
+ if (other.operation != null)
+ return false;
+ } else if (!operation.equals(other.operation))
+ return false;
+ if (result == null) {
+ if (other.result != null)
+ return false;
+ } else if (!result.equals(other.result))
+ return false;
+ if (tokenID == null) {
+ if (other.tokenID != null)
+ return false;
+ } else if (!tokenID.equals(other.tokenID))
+ return false;
if (userID == null) {
if (other.userID != null)
return false;
@@ -194,9 +240,10 @@ public class ActivityData {
before.setID("activity1");
before.setTokenID("TOKEN1234");
before.setUserID("user1");
- before.setIp("192.168.1.1");
+ before.setIP("192.168.1.1");
before.setOperation("enroll");
before.setResult("success");
+ before.setMessage("test");
before.setDate(new Date());
String string = before.toString();