Package org.gcube.accounting.datamodel
Interface UsageRecord
- All Superinterfaces:
Comparable<org.gcube.documentstore.records.Record>,org.gcube.documentstore.records.Record,Serializable
- All Known Implementing Classes:
AbstractJobUsageRecord,AbstractPortletUsageRecord,AbstractServiceUsageRecord,AbstractStorageStatusRecord,AbstractStorageUsageRecord,AggregatedJobUsageRecord,AggregatedPortletUsageRecord,AggregatedServiceUsageRecord,AggregatedStorageStatusRecord,AggregatedStorageUsageRecord,BasicUsageRecord,JobUsageRecord,PortletUsageRecord,ServiceUsageRecord,StorageStatusRecord,StorageUsageRecord
public interface UsageRecord
extends org.gcube.documentstore.records.Record
- Author:
- Luca Frosini (ISTI - CNR)
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringKEY for : The user (or the Consumer Identity, that in the S2S communication is another service).static final StringKEY for : The Operation Result of the accounted operation.static final StringKEY for : The scopeFields inherited from interface org.gcube.documentstore.records.Record
CREATION_TIME, ID, RECORD_TYPE -
Method Summary
Modifier and TypeMethodDescriptionReturn the user (or the Consumer Identity, that in the S2S communication is another service)getScope()Return the scope of this {#UsageRecord}voidsetConsumerId(String consumerId) Set the user (or the Consumer Identity, that in the S2S communication is another service)voidsetOperationResult(UsageRecord.OperationResult operationResult) Set the Operation Result related to the accounted Usage RecordvoidSet the scope of the {#UsageRecord}Methods inherited from interface java.lang.Comparable
compareToMethods inherited from interface org.gcube.documentstore.records.Record
getComputedFields, getCreationTime, getId, getQuerableKeys, getRecordType, getRequiredFields, getResourceProperties, getResourceProperty, removeResourceProperty, setCreationTime, setId, setResourceProperties, setResourceProperty, validate
-
Field Details
-
OPERATION_RESULT
KEY for : The Operation Result of the accounted operation. The value is expressed as OperationResult- See Also:
-
CONSUMER_ID
KEY for : The user (or the Consumer Identity, that in the S2S communication is another service).- See Also:
-
SCOPE
KEY for : The scope- See Also:
-
-
Method Details
-
getOperationResult
UsageRecord.OperationResult getOperationResult()- Returns:
- the Operation Result of the accounted operation.
-
setOperationResult
void setOperationResult(UsageRecord.OperationResult operationResult) throws org.gcube.documentstore.exception.InvalidValueException Set the Operation Result related to the accounted Usage Record- Parameters:
operationResult- the Operation Result to set- Throws:
org.gcube.documentstore.exception.InvalidValueException
-
getConsumerId
String getConsumerId()Return the user (or the Consumer Identity, that in the S2S communication is another service)- Returns:
- Consumer ID
-
setConsumerId
void setConsumerId(String consumerId) throws org.gcube.documentstore.exception.InvalidValueException Set the user (or the Consumer Identity, that in the S2S communication is another service)- Parameters:
consumerId- Consumer ID- Throws:
org.gcube.documentstore.exception.InvalidValueException
-
getScope
String getScope()Return the scope of this {#UsageRecord}- Returns:
- The scope of this {#UsageRecord}
-
setScope
Set the scope of the {#UsageRecord}- Parameters:
scope- the scope of the {#UsageRecord}- Throws:
org.gcube.documentstore.exception.InvalidValueException
-