new Custom() abstract
Methods
saveContentToTempStore(handler)
abstract
static
Implementation must save file content to temporary store
Arguments:
-
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:
-
handler
(TubDocumentHandlerCustom)
deleteContent(handler) → boolean
abstract
static
Implementation must delete file content from permanent store
Arguments:
-
handler
(TubDocumentHandlerCustom)
loadContentFromTempStore(handler, aWithBody)
abstract
static
Load content and (optionally) body from temporary file
Arguments:
-
handler
(TubDocumentHandlerCustom)
-
aWithBody
(TubLoadContentBody)
moveToPermanentStore(handler, aPrevRelPath) → boolean
abstract
static
Implementation must MOVE file content from temporary store to permanent store
Arguments:
-
handler
(TubDocumentHandlerCustom)
-
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:
-
handler
(TubDocumentHandlerCustom)
loadBodyFromEntity(handler) → boolean
abstract
static
Implementation MUST fill handler.request body by call one of request body-related methods
Arguments:
-
handler
(TubDocumentHandlerCustom)
getTempFileName(handler) → string
protected
static
Get path to temporary file and it's name
Arguments:
-
handler
(TubDocumentHandlerCustom)
handler
(TubDocumentHandlerCustom)
handler
(TubDocumentHandlerCustom)
handler
(TubDocumentHandlerCustom)
handler
(TubDocumentHandlerCustom)
aWithBody
(TubLoadContentBody)
handler
(TubDocumentHandlerCustom)
aPrevRelPath
(String)
 In case exist prev. file revision this variable contain it relative path
{
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
handler
(TubDocumentHandlerCustom)
handler
(TubDocumentHandlerCustom)
handler
(TubDocumentHandlerCustom)