org.gcube.accounting.datamodel
Interface UsageRecord

All Known Implementing Classes:
AbstractDelegateUsageRecord, RawUsageRecord

public interface UsageRecord


Method Summary
 String getAggregatedId()
          Return the id of the usage record aggregating this
 String getConsumerId()
          Return the identity of the entity that consumed the resource
 Calendar getCreateTime()
          Return the creation time for this usage record
 String getCreatorId()
          Return the identity of the entity creating this usage record
 Calendar getEndTime()
          Return the right end of the time interval covered by this usage record
 String getFullyQualifiedConsumerId()
           
 String getId()
          Return the unique id for this usage record
 String getResourceOwner()
          Return the identity of the owner of the resource
 String getResourceScope()
          Return the scope of the resource
 Map<String,String> getResourceSpecificProperties()
          Return all resource-specific properties
 String getResourceSpecificProperty(String name)
          Return the value of the given resource-specific property
 String getResourceType()
          Return the type of the resource this usage records refers to
 Calendar getStartTime()
          Return the left end of the time interval covered by this usage record
 void setAggregatedId(String aggregatedId)
          Set the id of the usage record aggregating this
 void setConsumerId(String consumerId)
          Set the identity of the entity that consumed the resource
 void setCreateTime(Calendar createTime)
          Set the creation time for this usage record
 void setCreatorId(String creatorId)
          Set the identity of the entity creating this usage record
 void setEndTime(Calendar endTime)
          Set the right end of the time interval covered by this usage record
 void setFullyQualifiedConsumerId(String fqcid)
           
 void setId(String id)
          Set the unique id for this usage record
 void setResourceOwner(String owner)
          Set the scope of the resource
 void setResourceScope(String scope)
          Set the scope of the resource
 void setResourceSpecificProperties(Map<String,String> props)
          Set all resource-specific properties, replacing existing ones
 void setResourceSpecificProperty(String key, String value)
          Set the value of the given resource-specific property
 void setResourceType(String resourceType)
          Set the type of the resource this usage records refers to
 void setStartTime(Calendar startTime)
          Set the left end of the time interval covered by this usage record
 void validate()
           
 

Method Detail

getCreateTime

Calendar getCreateTime()
Return the creation time for this usage record

Returns:

setCreateTime

void setCreateTime(Calendar createTime)
Set the creation time for this usage record

Parameters:
createTime -

getCreatorId

String getCreatorId()
Return the identity of the entity creating this usage record


setCreatorId

void setCreatorId(String creatorId)
Set the identity of the entity creating this usage record

Parameters:
creatorId -

getConsumerId

String getConsumerId()
Return the identity of the entity that consumed the resource

Returns:

setConsumerId

void setConsumerId(String consumerId)
Set the identity of the entity that consumed the resource


getFullyQualifiedConsumerId

String getFullyQualifiedConsumerId()
Returns:

setFullyQualifiedConsumerId

void setFullyQualifiedConsumerId(String fqcid)

getStartTime

Calendar getStartTime()
Return the left end of the time interval covered by this usage record

Returns:

setStartTime

void setStartTime(Calendar startTime)
                  throws InvalidValueException
Set the left end of the time interval covered by this usage record

Throws:
InvalidValueException

getEndTime

Calendar getEndTime()
Return the right end of the time interval covered by this usage record

Returns:

setEndTime

void setEndTime(Calendar endTime)
                throws InvalidValueException
Set the right end of the time interval covered by this usage record

Throws:
InvalidValueException

getId

String getId()
Return the unique id for this usage record

Returns:

setId

void setId(String id)
Set the unique id for this usage record

Parameters:
id -

getAggregatedId

String getAggregatedId()
Return the id of the usage record aggregating this

Returns:

setAggregatedId

void setAggregatedId(String aggregatedId)
Set the id of the usage record aggregating this

Parameters:
aggregatedId -

getResourceType

String getResourceType()
Return the type of the resource this usage records refers to

Returns:

setResourceType

void setResourceType(String resourceType)
Set the type of the resource this usage records refers to

Parameters:
resourceType -

getResourceOwner

String getResourceOwner()
Return the identity of the owner of the resource

Returns:

setResourceScope

void setResourceScope(String scope)
Set the scope of the resource


getResourceScope

String getResourceScope()
Return the scope of the resource

Returns:

setResourceOwner

void setResourceOwner(String owner)
Set the scope of the resource


getResourceSpecificProperty

String getResourceSpecificProperty(String name)
Return the value of the given resource-specific property

Parameters:
name -
Returns:

setResourceSpecificProperty

void setResourceSpecificProperty(String key,
                                 String value)
Set the value of the given resource-specific property

Parameters:
key -
value -

getResourceSpecificProperties

Map<String,String> getResourceSpecificProperties()
Return all resource-specific properties

Returns:

setResourceSpecificProperties

void setResourceSpecificProperties(Map<String,String> props)
Set all resource-specific properties, replacing existing ones


validate

void validate()
              throws InvalidValueException
Throws:
InvalidValueException


Copyright © 2013. All Rights Reserved.