function DocumentDataSourceBuilder() {
}

_.inherit(DocumentDataSourceBuilder, BaseDataSourceBuilder);

_.extend(DocumentDataSourceBuilder.prototype, {
    applyMetadata: function(builder, parent, metadata, dataSource){
        BaseDataSourceBuilder.prototype.applyMetadata.call(this, builder, parent, metadata, dataSource);
        dataSource.setConfigId(metadata.ConfigId);
        dataSource.setDocumentId(metadata.DocumentId);
    },

    createDataSource: function(parent){
        return new DocumentDataSource({
            view: parent
        });
    },

    initFileProvider: function (dataSource) {
        var fileProvider = window.providerRegister.build('DocumentFileProvider', {
            documentId: dataSource.getDocumentId(),
            configId: dataSource.getConfigId()
        });

        dataSource.setFileProvider(fileProvider);
    }
});

@@ -318,16 +318,17 @@
 ource);%0A
+%0A
         
@@ -362,17 +362,18 @@
 data
-.
+%5B'
 ConfigId
 );%0A 
@@ -368,16 +368,18 @@
 ConfigId
+'%5D
 );%0A     
@@ -414,17 +414,18 @@
 metadata
-.
+%5B'
 Document
@@ -426,18 +426,480 @@
 cumentId
-);
+'%5D);%0A%0A        if('CreateAction' in metadata)%7B%0A            dataSource.setCreateAction(metadata%5B'CreateAction'%5D);%0A        %7D%0A        if('ReadAction' in metadata)%7B%0A            dataSource.setReadAction(metadata%5B'ReadAction'%5D);%0A        %7D%0A        if('UpdateAction' in metadata)%7B%0A            dataSource.setUpdateAction(metadata%5B'UpdateAction'%5D);%0A        %7D%0A        if('DeleteAction' in metadata)%7B%0A            dataSource.setDeleteAction(metadata%5B'DeleteAction'%5D);%0A        %7D%0A
 %0A    %7D,%0A

set custom actions