From f0b9f1cd4b231b956da912cbffba2c7b7e22111a Mon Sep 17 00:00:00 2001 From: Luca Frosini Date: Fri, 17 Jul 2015 08:54:14 +0000 Subject: [PATCH] Extended visibility of constant git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/accounting/accounting-lib@117296 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../org/gcube/accounting/aggregation/ServiceUsageRecord.java | 4 ++-- .../gcube/accounting/datamodel/AggregatedUsageRecord.java | 5 +++++ .../org/gcube/accounting/datamodel/BasicUsageRecord.java | 1 + .../java/org/gcube/accounting/messaging/QueueCouple.java | 5 +++-- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/gcube/accounting/aggregation/ServiceUsageRecord.java b/src/main/java/org/gcube/accounting/aggregation/ServiceUsageRecord.java index f65e6a9..9807e97 100644 --- a/src/main/java/org/gcube/accounting/aggregation/ServiceUsageRecord.java +++ b/src/main/java/org/gcube/accounting/aggregation/ServiceUsageRecord.java @@ -29,9 +29,9 @@ public class ServiceUsageRecord extends org.gcube.accounting.datamodel.basetypes public static final String DURATION = org.gcube.accounting.datamodel.basetypes.ServiceUsageRecord.DURATION; @RequiredField @ValidLong @AggregatedField - protected static final String MAX_INVOCATION_TIME = "maxInvocationTime"; + public static final String MAX_INVOCATION_TIME = "maxInvocationTime"; @RequiredField @ValidLong @AggregatedField - protected static final String MIN_INVOCATION_TIME = "minInvocationTime"; + public static final String MIN_INVOCATION_TIME = "minInvocationTime"; private void init(){ this.resourceProperties.put(AGGREGATED, true); diff --git a/src/main/java/org/gcube/accounting/datamodel/AggregatedUsageRecord.java b/src/main/java/org/gcube/accounting/datamodel/AggregatedUsageRecord.java index f3a49a3..b064cb3 100644 --- a/src/main/java/org/gcube/accounting/datamodel/AggregatedUsageRecord.java +++ b/src/main/java/org/gcube/accounting/datamodel/AggregatedUsageRecord.java @@ -3,6 +3,8 @@ */ package org.gcube.accounting.datamodel; +import org.gcube.accounting.datamodel.decorators.AggregatedField; +import org.gcube.accounting.datamodel.validations.annotations.ValidInteger; import org.gcube.accounting.exception.InvalidValueException; /** @@ -10,6 +12,9 @@ import org.gcube.accounting.exception.InvalidValueException; */ public interface AggregatedUsageRecord, B extends SingleUsageRecord> extends UsageRecord { + @AggregatedField @ValidInteger + public static final String OPERATION_COUNT = "operationCount"; + public T getAggregatedUsageRecord(B usageRecord) throws InvalidValueException ; } diff --git a/src/main/java/org/gcube/accounting/datamodel/BasicUsageRecord.java b/src/main/java/org/gcube/accounting/datamodel/BasicUsageRecord.java index 75a0485..8d4b753 100644 --- a/src/main/java/org/gcube/accounting/datamodel/BasicUsageRecord.java +++ b/src/main/java/org/gcube/accounting/datamodel/BasicUsageRecord.java @@ -123,6 +123,7 @@ public abstract class BasicUsageRecord implements UsageRecord, Serializable { */ @AggregatedField @NotEmptyIfNotNull protected static final String AGGREGATED = "aggregated"; + /** * KEY for : Indicate The Number of Aggregated Operation */ diff --git a/src/main/java/org/gcube/accounting/messaging/QueueCouple.java b/src/main/java/org/gcube/accounting/messaging/QueueCouple.java index e0057bb..b75cb44 100644 --- a/src/main/java/org/gcube/accounting/messaging/QueueCouple.java +++ b/src/main/java/org/gcube/accounting/messaging/QueueCouple.java @@ -1,5 +1,8 @@ package org.gcube.accounting.messaging; +import org.gcube.accounting.aggregation.ServiceUsageRecord; + + @Deprecated public class QueueCouple { @@ -34,7 +37,5 @@ public class QueueCouple { } - - }