org.gcube.accounting.usagetracker.rest.resources
Class AbstractRecordsResource<T extends org.gcube.accounting.datamodel.UsageRecord>

java.lang.Object
  extended by 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
           
 
Constructor Summary
AbstractRecordsResource()
           
 
Method Summary
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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

request

@Context
protected javax.servlet.http.HttpServletRequest request
Constructor Detail

AbstractRecordsResource

public AbstractRecordsResource()
Method Detail

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.