org.gcube.accounting.usagetracker.rest.resources
Class AbstractRecordsResource<T extends org.gcube.accounting.datamodel.UsageRecord>
java.lang.Object
org.gcube.accounting.usagetracker.rest.resources.AbstractRecordsResource<T>
- Direct Known Subclasses:
- RawRecordsResource
public abstract class AbstractRecordsResource<T extends org.gcube.accounting.datamodel.UsageRecord>
- extends Object
|
Field Summary |
protected javax.servlet.http.HttpServletRequest |
request
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
request
@Context
protected javax.servlet.http.HttpServletRequest request
AbstractRecordsResource
public AbstractRecordsResource()
insertUsageRecord
public String insertUsageRecord(T record)
throws org.gcube.accounting.exception.rest.NotAuthorizedException
- Throws:
org.gcube.accounting.exception.rest.NotAuthorizedException
validate
protected abstract void validate(T record)
throws org.gcube.accounting.exception.InvalidValueException
- Throws:
org.gcube.accounting.exception.InvalidValueException
getRecords
public Collection<T> getRecords(Map<String,org.gcube.accounting.datamodel.query.QueryClause> clauses)
getTypeClause
protected org.gcube.accounting.datamodel.query.QueryClause getTypeClause()
getNumberOfRecords
public String getNumberOfRecords(String query)
throws org.gcube.accounting.exception.rest.NotAuthorizedException,
org.gcube.accounting.exception.QueryFormatException,
UnknownHostException
- Throws:
org.gcube.accounting.exception.rest.NotAuthorizedException
org.gcube.accounting.exception.QueryFormatException
UnknownHostException
getRecordsWithPost
public Collection<T> getRecordsWithPost(String x,
org.gcube.accounting.datamodel.query.QueryClause q)
throws org.gcube.accounting.exception.rest.NotAuthorizedException
- Throws:
org.gcube.accounting.exception.rest.NotAuthorizedException
getRecords
public Collection<T> getRecords(String query)
throws org.gcube.accounting.exception.rest.NotAuthorizedException
- Throws:
org.gcube.accounting.exception.rest.NotAuthorizedException
createRecord
protected abstract T createRecord(org.gcube.accounting.datamodel.RawUsageRecord record)
Copyright © 2013. All Rights Reserved.