public abstract class AbstractRecordsResource<T extends org.gcube.accounting.datamodel.UsageRecord> extends Object
| Modifier and Type | Field and Description |
|---|---|
protected javax.servlet.http.HttpServletRequest |
request |
| Constructor and Description |
|---|
AbstractRecordsResource() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract T |
createRecord(org.gcube.accounting.datamodel.RawUsageRecord record) |
String |
getNumberOfRecords(String query) |
Collection<T> |
getRecords(Map<String,org.gcube.accounting.datamodel.query.QueryClause> clauses) |
Collection<T> |
getRecords(String query) |
Collection<T> |
getRecordsWithPost(String x,
org.gcube.accounting.datamodel.query.QueryClause q) |
protected org.gcube.accounting.datamodel.query.QueryClause |
getTypeClause() |
String |
insertUsageRecord(T record) |
protected abstract void |
validate(T record) |
public String insertUsageRecord(T record) throws org.gcube.accounting.exception.rest.NotAuthorizedException
org.gcube.accounting.exception.rest.NotAuthorizedExceptionprotected abstract void validate(T record) throws org.gcube.accounting.exception.InvalidValueException
org.gcube.accounting.exception.InvalidValueExceptionpublic Collection<T> getRecords(Map<String,org.gcube.accounting.datamodel.query.QueryClause> clauses)
protected org.gcube.accounting.datamodel.query.QueryClause getTypeClause()
public String getNumberOfRecords(String query) throws org.gcube.accounting.exception.rest.NotAuthorizedException, org.gcube.accounting.exception.QueryFormatException, UnknownHostException
org.gcube.accounting.exception.rest.NotAuthorizedExceptionorg.gcube.accounting.exception.QueryFormatExceptionUnknownHostExceptionpublic Collection<T> getRecordsWithPost(String x, org.gcube.accounting.datamodel.query.QueryClause q) throws org.gcube.accounting.exception.rest.NotAuthorizedException
org.gcube.accounting.exception.rest.NotAuthorizedExceptionpublic Collection<T> getRecords(String query) throws org.gcube.accounting.exception.rest.NotAuthorizedException
org.gcube.accounting.exception.rest.NotAuthorizedExceptionprotected abstract T createRecord(org.gcube.accounting.datamodel.RawUsageRecord record)
Copyright © 2014. All Rights Reserved.