Custom

UB.virtualStores. Custom

new Custom() abstract

Methods

saveContentToTempStore(handler) abstract static

Implementation must save file content to temporary store
Arguments:
  1. handler (TubDocumentHandlerCustom)

moveToArchive(handler)Boolean abstract static

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

deleteContent(handler)boolean abstract static

Implementation must delete file content from permanent store
Arguments:
  1. handler (TubDocumentHandlerCustom)

loadContentFromTempStore(handler, aWithBody) abstract static

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

moveToPermanentStore(handler, aPrevRelPath)boolean abstract static

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

fillResponse(handler) → * static

Response for setDocument HTTP request. Descendants MUST return null(if responce internally filled) or the following object:

 {
     httpResultCode: 200, // in case httpResultCode == 200 you MUST return attributes below, else it not necessary
     body: '..', either full file path or string representation of content
     header: 'Content-Type: text/html', // HTTP header to be added to response. Minimal is Content-type header
     isFromFile: false //is body contain path to file
 }

if body is undefined then out body will take from request body

Arguments:
  1. handler (TubDocumentHandlerCustom)

loadBodyFromEntity(handler)boolean abstract static

Implementation MUST fill handler.request body by call one of request body-related methods
Arguments:
  1. handler (TubDocumentHandlerCustom)

getTempFileName(handler)string protected static

Get path to temporary file and it's name
Arguments:
  1. handler (TubDocumentHandlerCustom)