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

java.lang.Object
  extended by org.gcube.accounting.usagetracker.rest.resources.AbstractRecordResource<T>
Direct Known Subclasses:
RawRecordResource

public abstract class AbstractRecordResource<T extends org.gcube.accounting.datamodel.UsageRecord>
extends Object


Constructor Summary
AbstractRecordResource()
           
AbstractRecordResource(String id)
           
 
Method Summary
protected abstract  T createRecord(org.gcube.accounting.datamodel.UsageRecord record)
           
 T getRecord()
           
 String getUserId()
           
protected abstract  boolean isCorrectType(org.gcube.accounting.datamodel.UsageRecord record)
           
 void setUserId(String userId)
           
protected abstract  void validate(T record)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractRecordResource

public AbstractRecordResource()

AbstractRecordResource

public AbstractRecordResource(String id)
Method Detail

getRecord

public T getRecord()
                                                               throws org.gcube.accounting.exception.NotAuthorizedException
Throws:
org.gcube.accounting.exception.NotAuthorizedException

validate

protected abstract void validate(T record)
                          throws org.gcube.accounting.exception.InvalidValueException
Throws:
org.gcube.accounting.exception.InvalidValueException

createRecord

protected abstract T createRecord(org.gcube.accounting.datamodel.UsageRecord record)
                                                                              throws org.gcube.accounting.exception.InvalidValueException
Throws:
org.gcube.accounting.exception.InvalidValueException

isCorrectType

protected abstract boolean isCorrectType(org.gcube.accounting.datamodel.UsageRecord record)

getUserId

public String getUserId()

setUserId

public void setUserId(String userId)


Copyright © 2013. All Rights Reserved.