Class AbstractStorageUsageRecord
- java.lang.Object
-
- org.gcube.documentstore.records.implementation.AbstractRecord
-
- org.gcube.accounting.datamodel.BasicUsageRecord
-
- org.gcube.accounting.datamodel.basetypes.AbstractStorageUsageRecord
-
- All Implemented Interfaces:
Serializable,Comparable<org.gcube.documentstore.records.Record>,UsageRecord,org.gcube.documentstore.records.Record
- Direct Known Subclasses:
AggregatedStorageUsageRecord,StorageUsageRecord
public abstract class AbstractStorageUsageRecord extends BasicUsageRecord
- Author:
- Luca Frosini (ISTI - CNR)
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAbstractStorageUsageRecord.DataTypestatic classAbstractStorageUsageRecord.OperationType-
Nested classes/interfaces inherited from interface org.gcube.accounting.datamodel.UsageRecord
UsageRecord.OperationResult
-
-
Field Summary
Fields Modifier and Type Field Description static StringDATA_TYPEKEY for : type of data accessed.static StringDATA_VOLUMEKEY for : Quantity of data in terms of KBstatic StringOPERATION_TYPEKEY for : The operation performed over the stored resource.static StringPROVIDER_URIstatic StringQUALIFIERKEY for : Qualifies the data in terms of data (e.g.static StringRESOURCE_OWNERKEY for : The Owner of the stored Resourcestatic StringRESOURCE_SCOPEDeprecated.static StringRESOURCE_URIDeprecated.-
Fields inherited from class org.gcube.accounting.datamodel.BasicUsageRecord
CONSUMER_ID, OPERATION_RESULT, SCOPE
-
-
Constructor Summary
Constructors Constructor Description AbstractStorageUsageRecord()KEY for : callerQualifierAbstractStorageUsageRecord(Map<String,? extends Serializable> properties)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description AbstractStorageUsageRecord.DataTypegetDataType()longgetDataVolume()AbstractStorageUsageRecord.OperationTypegetOperationType()URIgetProviderURI()StringgetQualifier()StringgetRecordType()StringgetResourceOwner()Return the identity id of the storage resource ownerStringgetResourceScope()Deprecated.URIgetResourceURI()Deprecated.voidsetDataType(AbstractStorageUsageRecord.DataType dataType)voidsetDataVolume(long dataVolume)voidsetOperationType(AbstractStorageUsageRecord.OperationType operationType)voidsetProviderURI(URI providerURI)voidsetQualifier(String qualifier)voidsetResourceOwner(String owner)Set the identity id of the storage resource ownervoidsetResourceScope(String scope)Deprecated.voidsetResourceURI(URI resourceURI)Deprecated.-
Methods inherited from class org.gcube.accounting.datamodel.BasicUsageRecord
getConsumerId, getOperationResult, getQuerableKeys, getScope, init, setConsumerId, setOperationResult, setScope
-
Methods inherited from class org.gcube.documentstore.records.implementation.AbstractRecord
cleanExtraFields, compareTo, computeField, getAggregatedFields, getAllFields, getComputedFields, getCreationTime, getEndTimeAsCalendar, getEndTimeInMillis, getId, getOperationCount, getRequiredFields, getResourceProperties, getResourceProperty, getStartTimeAsCalendar, getStartTimeInMillis, initializeValidation, isAggregated, removeResourceProperty, setAggregated, setCreationTime, setEndTime, setId, setOperationCount, setResourceProperties, setResourceProperty, setStartTime, timestampToCalendar, toString, validate, validateField, validateProperties
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Comparable
compareTo
-
-
-
-
Field Detail
-
RESOURCE_OWNER
public static final String RESOURCE_OWNER
KEY for : The Owner of the stored Resource- See Also:
- Constant Field Values
-
RESOURCE_SCOPE
@Deprecated public static final String RESOURCE_SCOPE
Deprecated.KEY for : The Scope where the Resource was stored- See Also:
- Constant Field Values
-
RESOURCE_URI
@Deprecated public static final String RESOURCE_URI
Deprecated.KEY for : The URI of the Stored Resource- See Also:
- Constant Field Values
-
PROVIDER_URI
public static final String PROVIDER_URI
- See Also:
- Constant Field Values
-
OPERATION_TYPE
public static final String OPERATION_TYPE
KEY for : The operation performed over the stored resource. The value is a controlled dictionary by StorageUsageRecord.OperationType- See Also:
- Constant Field Values
-
DATA_TYPE
public static final String DATA_TYPE
KEY for : type of data accessed. The value is a controlled dictionary by StorageUsageRecord.DataType- See Also:
- Constant Field Values
-
DATA_VOLUME
public static final String DATA_VOLUME
KEY for : Quantity of data in terms of KB- See Also:
- Constant Field Values
-
QUALIFIER
public static final String QUALIFIER
KEY for : Qualifies the data in terms of data (e.g. MIME type for the Storage, domain for a database)- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AbstractStorageUsageRecord
public AbstractStorageUsageRecord()
KEY for : callerQualifier
-
AbstractStorageUsageRecord
public AbstractStorageUsageRecord(Map<String,? extends Serializable> properties) throws org.gcube.documentstore.exception.InvalidValueException
- Throws:
org.gcube.documentstore.exception.InvalidValueException
-
-
Method Detail
-
getRecordType
public String getRecordType()
- Specified by:
getRecordTypein interfaceorg.gcube.documentstore.records.Record- Overrides:
getRecordTypein classBasicUsageRecord
-
getResourceOwner
public String getResourceOwner()
Return the identity id of the storage resource owner- Returns:
- the identity id of the accounting owner
-
setResourceOwner
public void setResourceOwner(String owner) throws org.gcube.documentstore.exception.InvalidValueException
Set the identity id of the storage resource owner- Parameters:
owner- the identity id of the storage resource owner- Throws:
org.gcube.documentstore.exception.InvalidValueException
-
getResourceScope
@Deprecated public String getResourceScope()
Deprecated.Return the scope of the storage resource- Returns:
- The scope id of the storage resource
-
setResourceScope
@Deprecated public void setResourceScope(String scope) throws org.gcube.documentstore.exception.InvalidValueException
Deprecated.Set the scope of the storage resource- Parameters:
scope- the scope of the storage resource- Throws:
org.gcube.documentstore.exception.InvalidValueException
-
getProviderURI
public URI getProviderURI()
-
setProviderURI
public void setProviderURI(URI providerURI) throws org.gcube.documentstore.exception.InvalidValueException
- Throws:
org.gcube.documentstore.exception.InvalidValueException
-
getResourceURI
@Deprecated public URI getResourceURI()
Deprecated.
-
setResourceURI
@Deprecated public void setResourceURI(URI resourceURI) throws org.gcube.documentstore.exception.InvalidValueException
Deprecated.- Throws:
org.gcube.documentstore.exception.InvalidValueException
-
getOperationType
public AbstractStorageUsageRecord.OperationType getOperationType()
-
setOperationType
public void setOperationType(AbstractStorageUsageRecord.OperationType operationType) throws org.gcube.documentstore.exception.InvalidValueException
- Throws:
org.gcube.documentstore.exception.InvalidValueException
-
getDataType
public AbstractStorageUsageRecord.DataType getDataType()
-
setDataType
public void setDataType(AbstractStorageUsageRecord.DataType dataType) throws org.gcube.documentstore.exception.InvalidValueException
- Throws:
org.gcube.documentstore.exception.InvalidValueException
-
getDataVolume
public long getDataVolume()
-
setDataVolume
public void setDataVolume(long dataVolume) throws org.gcube.documentstore.exception.InvalidValueException- Throws:
org.gcube.documentstore.exception.InvalidValueException
-
getQualifier
public String getQualifier()
-
setQualifier
public void setQualifier(String qualifier) throws org.gcube.documentstore.exception.InvalidValueException
- Throws:
org.gcube.documentstore.exception.InvalidValueException
-
-