Name
sn_grc.IGDocumentActionHandler
Description
No description available
Script
var IGDocumentActionHandler = Class.create();
IGDocumentActionHandler.prototype = {
initialize: function(action, strategy) {
this.actionType = String(action.action);
this.source = action.source;
this.sourceTable = action.table;
this.documentId = action.document_id;
this.contentId = action.content_id;
this.strategy = strategy;
this.batchIds = action.batch_processing_ids + '';
},
execute: function() {
if (gs.nil(this.actionType)) {
return;
}
switch (this.actionType) {
case 'activate_document':
return this.strategy.activateRelatedContentAndItemsForDocument(this.documentId);
case 'deactivate_document':
return this.strategy.deactivateRelatedContentsAndItemsForDocument(this.documentId);
case 'delete_document':
return this.strategy.deleteDocument(this.documentId,this.batchIds);
case 'content_to_document':
return this.strategy.updateContentToDocumentLink(this.contentId, this.documentId);
}
},
type: 'IGDocumentActionHandler'
};
Sys ID
ed7bf5510757a010bbc77f04a9d30015