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 enum 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    KEY for : The user (or the Consumer Identity, that in the S2S communication is another service).
    static final String
    KEY for : The Operation Result of the accounted operation.
    static final String
    KEY for : The scope

    Fields inherited from interface org.gcube.documentstore.records.Record

    CREATION_TIME, ID, RECORD_TYPE
  • Method Summary

    Modifier and Type
    Method
    Description
    Return the user (or the Consumer Identity, that in the S2S communication is another service)
     
    Return the scope of this {#UsageRecord}
    void
    setConsumerId(String consumerId)
    Set the user (or the Consumer Identity, that in the S2S communication is another service)
    void
    Set the Operation Result related to the accounted Usage Record
    void
    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 Details

    • OPERATION_RESULT

      static final String OPERATION_RESULT
      KEY for : The Operation Result of the accounted operation. The value is expressed as OperationResult
      See Also:
    • 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:
    • SCOPE

      static final String 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

      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