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 Modifier and Type Interface Description static classUsageRecord.OperationResult
-
Field Summary
Fields Modifier and Type Field Description static StringCONSUMER_IDKEY for : The user (or the Consumer Identity, that in the S2S communication is another service).static StringOPERATION_RESULTKEY for : The Operation Result of the accounted operation.static StringSCOPEKEY for : The scope
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetConsumerId()Return the user (or the Consumer Identity, that in the S2S communication is another service)UsageRecord.OperationResultgetOperationResult()StringgetScope()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 RecordvoidsetScope(String scope)Set the scope of the {#UsageRecord}-
Methods inherited from interface java.lang.Comparable
compareTo
-
Methods inherited from interface org.gcube.documentstore.records.Record
getComputedFields, getCreationTime, getId, getQuerableKeys, getRecordType, getRequiredFields, getResourceProperties, getResourceProperty, removeResourceProperty, setCreationTime, setId, setResourceProperties, setResourceProperty, validate
-
-
-
-
Field Detail
-
OPERATION_RESULT
static final String OPERATION_RESULT
KEY for : The Operation Result of the accounted operation. The value is expressed as OperationResult- See Also:
- Constant Field Values
-
CONSUMER_ID
static final String CONSUMER_ID
KEY for : The user (or the Consumer Identity, that in the S2S communication is another service).- See Also:
- Constant Field Values
-
SCOPE
static final String SCOPE
KEY for : The scope- See Also:
- Constant Field Values
-
-
Method Detail
-
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
void setScope(String scope) throws org.gcube.documentstore.exception.InvalidValueException
Set the scope of the {#UsageRecord}- Parameters:
scope- the scope of the {#UsageRecord}- Throws:
org.gcube.documentstore.exception.InvalidValueException
-
-