All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ckableregiments.persisted-metl_2.11.3.10.0.source-code.PersistedResourceProvider.scala Maven / Gradle / Ivy

The newest version!
package com.metl.persisted

import com.metl.data._
import com.metl.utils._

class PersistedResourceProvider(config:ServerConfiguration,dbInterface:PersistenceInterface,commonBucket:String = "commonBucket"){
  def getResource(identity:String):Array[Byte] = dbInterface.getResource(identity)
  def postResource(jid:String,userProposedId:String,data:Array[Byte]):String = dbInterface.postResource(jid,userProposedId,data)
  def getResource(jid:String,identity:String):Array[Byte] = dbInterface.getResource(jid,identity)
  def insertResource(data:Array[Byte],jid:String = commonBucket):String = dbInterface.insertResource(jid,data)
  def upsertResource(identity:String,data:Array[Byte],jid:String = commonBucket):String = dbInterface.upsertResource(jid,identity,data)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy