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 { } - - }