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
This commit is contained in:
Luca Frosini 2015-06-10 13:15:07 +00:00
parent 3a2792d7d5
commit 405903f952
1 changed files with 10 additions and 0 deletions

View File

@ -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);
}
}