From 1378ba1bb3d7519b5d9b61c38ac8d368aed509f9 Mon Sep 17 00:00:00 2001 From: Luca Frosini Date: Wed, 10 Jun 2015 13:23:12 +0000 Subject: [PATCH] refs #200: Create accouting-lib library https://support.d4science.org/issues/200 Implementing library git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/accounting/accounting-lib@115296 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../datamodel/implementations/PortletUsageRecord.java | 7 ++++--- .../datamodel/implementations/ServiceUsageRecord.java | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) 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 b820e02..081410d 100644 --- a/src/main/java/org/gcube/accounting/datamodel/implementations/PortletUsageRecord.java +++ b/src/main/java/org/gcube/accounting/datamodel/implementations/PortletUsageRecord.java @@ -64,10 +64,10 @@ public class PortletUsageRecord extends RawUsageRecord implements SingleUsageRec super(properties); } - /** + /* * * Use {@link #getConsumerId()} instead * @return the Consumer ID - */ + * / @Deprecated public String getUserId() { return (String) this.resourceProperties.get(CONSUMER_ID); @@ -78,12 +78,13 @@ public class PortletUsageRecord extends RawUsageRecord implements SingleUsageRec * {@link #setConsumerId()} instead. * @param userId Consumer Id * @throws InvalidValueException if fails - */ + * / @Deprecated public void setUserId(String userId) throws InvalidValueException { setResourceProperty(USER_ID, userId); } + */ public String getPortletId() { return (String) this.resourceProperties.get(PORTLET_ID); diff --git a/src/main/java/org/gcube/accounting/datamodel/implementations/ServiceUsageRecord.java b/src/main/java/org/gcube/accounting/datamodel/implementations/ServiceUsageRecord.java index cae4a21..c3eb2bd 100644 --- a/src/main/java/org/gcube/accounting/datamodel/implementations/ServiceUsageRecord.java +++ b/src/main/java/org/gcube/accounting/datamodel/implementations/ServiceUsageRecord.java @@ -36,7 +36,7 @@ public class ServiceUsageRecord extends RawUsageRecord implements SingleUsageRec @RequiredField @NotEmpty public static final String REF_VM = "refVM"; @NotEmpty @DeprecatedWarning - public static final String DOMAIN = "domain"; + protected static final String DOMAIN = "domain"; @ValidInteger @AggregatedField protected static final String INVOCATION_COUNT = "invocationCount"; @ValidInteger @AggregatedField @@ -85,7 +85,7 @@ public class ServiceUsageRecord extends RawUsageRecord implements SingleUsageRec public void setRefVM(String refVM) throws InvalidValueException { setResourceProperty(REF_VM, refVM); } - + /* protected String getDomain() { return (String) this.resourceProperties.get(DOMAIN); } @@ -109,7 +109,8 @@ public class ServiceUsageRecord extends RawUsageRecord implements SingleUsageRec public void setAverageInvocationTime(String averageInvocationTime) throws InvalidValueException { setResourceProperty(AVERAGE_INVOCATION_COUNT, averageInvocationTime); } - + */ + public String getServiceClass() { return (String) this.resourceProperties.get(SERVICE_CLASS); }