fileVirtual

UB.virtualStores. fileVirtual

Virtual store implementation for storing documents into the file system. Since this is primary type of store for most systems, almost all methods is a proxy to native implementation for performance reason.

Constructor

new fileVirtual()

Extends

Methods

saveContentToTempStore(handler) static

Save file content to temporary file store
Arguments:
  1. handler (TubDocumentHandlerCustom)

moveToArchive(handler) → Boolean static

Move old file revision to file archive according to store historyDepth and delete file from permanent store.
Arguments:
  1. handler (TubDocumentHandlerCustom)

deleteContent(handler) → boolean static

Delete file content from permanent file store
Arguments:
  1. handler (TubDocumentHandlerCustom)

loadContentFromTempStore(handler, aWithBody) static

Load content and (optionally) body from temporary file
Arguments:
  1. handler (TubDocumentHandlerCustom)
  2. aWithBody (TubLoadContentBody)

moveToPermanentStore(handler, aPrevRelPath) → boolean static

Move file content from temporary file store to permanent file store
Arguments:
  1. handler (TubDocumentHandlerCustom)
  2. aPrevRelPath (String)  In case exist prev. file revision this variable contain it relative path

fillResponse() static

Returns null and fill response from file storage

loadBodyFromEntity(handler) → boolean static

Fill handler.request body from file storage
Arguments:
  1. handler (TubDocumentHandlerCustom)

getRevisionConfig(handler, aRevision, aRelPath) → String static

Returns config of selected file revision
Arguments:
  1. handler (TubDocumentHandlerCustom)
  2. aRevision (Number)
  3. aRelPath (String)

setRevisionIsPermanent(params) static

Change isPermanent flag of revision
Arguments:
  1. params (Object)  parameters object
    Properties
    1. entity (String)
    2. attribute (String)
    3. id (Number)
    4. revision (Number)
    5. isPermanent (Boolean)

tempContentExists(handler) → Boolean static

Is temp content exists.
Arguments:
  1. handler (TubDocumentHandlerCustom)