From 405903f9524c147ae546912a3e0e47aa7f64a20a Mon Sep 17 00:00:00 2001 From: Luca Frosini Date: Wed, 10 Jun 2015 13:15:07 +0000 Subject: [PATCH] Added Optional Message to support AccessLogger library fields for PortletUsageRecord git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/accounting/accounting-lib@115292 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../datamodel/implementations/PortletUsageRecord.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/java/org/gcube/accounting/datamodel/implementations/PortletUsageRecord.java b/src/main/java/org/gcube/accounting/datamodel/implementations/PortletUsageRecord.java index 55994a5..20e623b 100644 --- a/src/main/java/org/gcube/accounting/datamodel/implementations/PortletUsageRecord.java +++ b/src/main/java/org/gcube/accounting/datamodel/implementations/PortletUsageRecord.java @@ -33,6 +33,9 @@ public class PortletUsageRecord extends RawUsageRecord implements SingleUsageRec @RequiredField @NotEmpty public static final String OPERATION_ID = "operationId"; // TODO check ASL for more field + @NotEmptyIfNotNull + public static final String MESSAGE = "message"; + public PortletUsageRecord(){ super(); @@ -68,4 +71,11 @@ public class PortletUsageRecord extends RawUsageRecord implements SingleUsageRec setResourceProperty(OPERATION_ID, operationId); } + public String getMessage() { + return (String) this.resourceProperties.get(MESSAGE); + } + + public void setMessage(String message) throws InvalidValueException { + setResourceProperty(MESSAGE, message); + } }