public interface UsageRecord extends Comparable<UsageRecord>
| Modifier and Type | Interface and Description |
|---|---|
static class |
UsageRecord.OperationResult |
| Modifier and Type | Method and Description |
|---|---|
String |
getConsumerId()
Return the user (or the Consumer Identity, that in the S2S
communication is another service)
|
Calendar |
getCreationTime()
Return the instant when this {#UsageRecord} was created.
|
String |
getId()
Return the unique id for this {#UsageRecord}
|
UsageRecord.OperationResult |
getOperationResult() |
Map<String,Serializable> |
getResourceProperties()
Return all resource-specific properties.
|
Serializable |
getResourceProperty(String key)
Return the value of the given resource property.
|
String |
getScope()
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 |
setCreationTime(Calendar creationTime)
The CreationTime is automatically created by the implementation Class.
|
void |
setId(String id)
The ID is automatically Created by the implementation Class.
|
void |
setOperationResult(UsageRecord.OperationResult operationResult)
Set the Operation Result related to the accounted Usage Record
|
void |
setResourceProperties(Map<String,Serializable> resourceSpecificProperties)
Set all resource-specific properties, replacing existing ones
|
void |
setResourceProperty(String key,
Serializable value)
Set the value of the given resource property.
|
void |
setScope(String scope)
Set the accounting scope of the {#UsageRecord}
|
void |
validate()
Validate the Resource Record.
|
compareToString getId()
void setId(String id) throws InvalidValueException
id - {#UsageRecord} Unique IDInvalidValueExceptionString getConsumerId()
void setConsumerId(String consumerId) throws InvalidValueException
consumerId - Consumer IDInvalidValueExceptionCalendar getCreationTime()
void setCreationTime(Calendar creationTime) throws InvalidValueException
creationTime - creation timeInvalidValueExceptionString getScope()
void setScope(String scope) throws InvalidValueException
scope - The accounting scope of the {#UsageRecord}InvalidValueExceptionMap<String,Serializable> getResourceProperties()
void setResourceProperties(Map<String,Serializable> resourceSpecificProperties) throws InvalidValueException
InvalidValueExceptionSerializable getResourceProperty(String key)
key - the key of the requested propertyvoid setResourceProperty(String key, Serializable value) throws InvalidValueException
key - the key of the requested propertyvalue - the value of the given resource propertyInvalidValueExceptionUsageRecord.OperationResult getOperationResult()
void setOperationResult(UsageRecord.OperationResult operationResult) throws InvalidValueException
operationResult - the Operation Result to setInvalidValueExceptionvoid validate()
throws InvalidValueException
InvalidValueExceptionCopyright © 2015. All Rights Reserved.