       error: ->
         callback "Unable to load "+metadata.name
 
+  remove: (metadata, callback) ->
+    $.ajax
+      url: removeDocumentUrl
+      data:
+        recordname: metadata.name
+      context: @
+      xhrFields:
+        withCredentials: true
+      success: (data) ->
+        callback null, data
+      error: ->
+        callback "Unable to load "+metadata.name
+
   _addParams: (url, params) ->
     return url unless params
     kvp = []

listUrl          = "#{documentStore}/document/all"
loadDocumentUrl      = "#{documentStore}/document/open"
saveDocumentUrl      = "#{documentStore}/document/save"

tr = require '../utils/translate'
isString = require '../utils/is-string'

        save: true
        load: true
        list: true
        remove: true

  @Name: 'documentStore'

