diff --git a/src/main/java/org/gcube/accounting/datamodel/TestUsageRecord.java b/src/main/java/org/gcube/accounting/datamodel/TestUsageRecord.java index 94a2c11..8e66ccf 100644 --- a/src/main/java/org/gcube/accounting/datamodel/TestUsageRecord.java +++ b/src/main/java/org/gcube/accounting/datamodel/TestUsageRecord.java @@ -95,12 +95,14 @@ public class TestUsageRecord { usageRecord.setResourceOwner(TEST_RESOUCE_OWNER); usageRecord.setResourceScope(TEST_RESOUCE_SCOPE); - usageRecord.setObjectURI(new URI(TEST_OBJECT_URI)); + usageRecord.setResourceURI(new URI(TEST_OBJECT_URI)); usageRecord.setOperationType(OperationType.READ); - //usageRecord.setDataType(); + usageRecord.setDataType(StorageUsageRecord.STORAGE_DATA_TYPE); usageRecord.setDataVolume(generateRandomLong(MIN_DATA_VOLUME, MAX_DATA_VOLUME)); + usageRecord.setQualifier("image/png"); + usageRecord.setCallerIP("192.168.0.1"); usageRecord.setResourceProperty(TEST_PROPERTY_NAME, TEST_PROPERTY_VALUE); diff --git a/src/main/java/org/gcube/accounting/datamodel/aggregation/StorageUsageRecord.java b/src/main/java/org/gcube/accounting/datamodel/aggregation/StorageUsageRecord.java index d3dd73b..f2a40f5 100644 --- a/src/main/java/org/gcube/accounting/datamodel/aggregation/StorageUsageRecord.java +++ b/src/main/java/org/gcube/accounting/datamodel/aggregation/StorageUsageRecord.java @@ -28,7 +28,7 @@ public class StorageUsageRecord extends org.gcube.accounting.datamodel.implement @RequiredField @ValidLong @AggregatedField public static final String DATA_VOLUME = "dataVolume"; /** - * Indicate The Number of Aggregated Operation + * KEY for : Indicate The Number of Aggregated Operation */ @RequiredField @ValidInteger @AggregatedField public static final String OPERATION_COUNT = "operationCount"; diff --git a/src/main/java/org/gcube/accounting/datamodel/aggregation/aggregationstrategy/StorageUsageRecordAggregationStrategy.java b/src/main/java/org/gcube/accounting/datamodel/aggregation/aggregationstrategy/StorageUsageRecordAggregationStrategy.java index d39addc..ed5cfe8 100644 --- a/src/main/java/org/gcube/accounting/datamodel/aggregation/aggregationstrategy/StorageUsageRecordAggregationStrategy.java +++ b/src/main/java/org/gcube/accounting/datamodel/aggregation/aggregationstrategy/StorageUsageRecordAggregationStrategy.java @@ -20,8 +20,8 @@ public class StorageUsageRecordAggregationStrategy extends AggregationStrategy