public class UsageTrackerRestAPI extends Object
| Constructor and Description |
|---|
UsageTrackerRestAPI(String uri) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Deprecated.
this operation is for development/testing purposes only. It
will be removed in future releases
|
void |
deleteUsageRecord(org.gcube.accounting.datamodel.UsageRecord record) |
FilterRating |
getFilterRating(Report r) |
long |
getNumberOfRecords(String query)
Return the number of the usage records matching the given query
|
Collection<AggregatedResult> |
getReport(Report r) |
Collection<Consumer> |
getTrackedConsumers() |
Collection<ResourceScope> |
getTrackedResourceScopes() |
Collection<ResourceType> |
getTrackedResourceTypes() |
Collection<UpdateInfo> |
getUpdateInfo()
Query the Usage Tracker for update information from each infrastructure (resource owner)
|
Collection<org.gcube.accounting.datamodel.UsageRecord> |
getUsageRecords(String query)
Return the usage records matching the given query and aggregation fields for sorting/pagination purposes
Example: resourceType=job&resourceScope=testing&sortField=startTime&paginationStartPage=1&paginationRecords=6
Aggregation fields
======================
sortField : field on which you want to order the results
sortOrder : sort criteria (asc/desc)
paginationStartRecord : start record of the pagination
paginationRecords : number of records per page
|
Collection<User> |
getUsers()
Deprecated.
this operation is for development/testing purposes only. It
will be removed in future releases
|
void |
insertUsageRecord(org.gcube.accounting.datamodel.AbstractDelegateUsageRecord ur)
Insert the new given usage record
|
void |
insertUsageRecord(org.gcube.accounting.datamodel.RawUsageRecord ur)
Insert the given storage-specific usage record
|
void |
insertUsageRecord(org.gcube.accounting.datamodel.UsageRecord ur)
Insert the new given usage record
|
void |
insertUsageRecords(Collection<org.gcube.accounting.datamodel.UsageRecord> records)
Insert a set of usage records
|
static void |
main(String[] args) |
static GregorianCalendar |
randomDate() |
void |
setUserToken(String username,
String password) |
void |
setUserToken(String username,
String password,
String delegator) |
public UsageTrackerRestAPI(String uri)
uri - the URI of the Usage Trackerpublic void insertUsageRecords(Collection<org.gcube.accounting.datamodel.UsageRecord> records)
records - public void insertUsageRecord(org.gcube.accounting.datamodel.UsageRecord ur)
ur - public void insertUsageRecord(org.gcube.accounting.datamodel.AbstractDelegateUsageRecord ur)
ur - public void insertUsageRecord(org.gcube.accounting.datamodel.RawUsageRecord ur)
ur - public Collection<org.gcube.accounting.datamodel.UsageRecord> getUsageRecords(String query)
query - must have the form: name=value&name>value&kname=value&...public Collection<UpdateInfo> getUpdateInfo()
public Collection<User> getUsers()
public Collection<Consumer> getTrackedConsumers()
public Collection<ResourceType> getTrackedResourceTypes()
public Collection<ResourceScope> getTrackedResourceScopes()
public long getNumberOfRecords(String query)
query - public void clear()
public void deleteUsageRecord(org.gcube.accounting.datamodel.UsageRecord record)
public Collection<AggregatedResult> getReport(Report r)
public FilterRating getFilterRating(Report r)
public static void main(String[] args)
public static GregorianCalendar randomDate()
Copyright © 2014. All Rights Reserved.