/**
 * Config helper to define files.
 * @module task.helpers.FileConfigHelper.
 * @author "ci.worker.generateFileConfigHelper"
 *
 */

var _configObjects = require('./_config_objects'),
    File = _configObjects.File;

/**
 * New readonly file.
 * @param {string} src - Template file name.
 * @param {object} data - Render data.
 * @returns {object} - File definition object.
 * @protected
 * @ignore
 */
function newReadonlyFile(src, data) {
    return new File().tmpl(src).mode('444').force(true).data(data);
}


/**
 * File definition with tmpl/Apemanfile.js.hbs template.
 * By default,  mode is 444 and force option is enabled.
 * @function apemanfile.helper.newApemanfileJsFile
 * @param {object} data - Render data object.
 * @example
 *    var ApemanfileJsFile = h.newApemanfileJsFile({foo:bar}).force(false).mode('644');
 * @returns {object} - File config object.
 */
exports.newApemanfileJsFile = function (data) {
    var src = 'tmpl/Apemanfile.js.hbs';
    return newReadonlyFile(src, data);
};

/**
 * File definition with tmpl/LICENSE.hbs template.
 * By default,  mode is 444 and force option is enabled.
 * @function apemanfile.helper.newLICENSEFile
 * @param {object} data - Render data object.
 * @example
 *    var LICENSEFile = h.newLICENSEFile({foo:bar}).force(false).mode('644');
 * @returns {object} - File config object.
 */
exports.newLICENSEFile = function (data) {
    var src = 'tmpl/LICENSE.hbs';
    return newReadonlyFile(src, data);
};

/**
 * File definition with tmpl/VERSION.hbs template.
 * By default,  mode is 444 and force option is enabled.
 * @function apemanfile.helper.newVERSIONFile
 * @param {object} data - Render data object.
 * @example
 *    var VERSIONFile = h.newVERSIONFile({foo:bar}).force(false).mode('644');
 * @returns {object} - File config object.
 */
exports.newVERSIONFile = function (data) {
    var src = 'tmpl/VERSION.hbs';
    return newReadonlyFile(src, data);
};

/**
 * File definition with tmpl/bin/release_bin.hbs template.
 * By default,  mode is 444 and force option is enabled.
 * @function apemanfile.helper.newReleaseBinFile
 * @param {object} data - Render data object.
 * @example
 *    var releaseBinFile = h.newReleaseBinFile({foo:bar}).force(false).mode('644');
 * @returns {object} - File config object.
 */
exports.newReleaseBinFile = function (data) {
    var src = 'tmpl/bin/release_bin.hbs';
    return newReadonlyFile(src, data);
};

/**
 * File definition with tmpl/bin/task_bin.hbs template.
 * By default,  mode is 444 and force option is enabled.
 * @function apemanfile.helper.newTaskBinFile
 * @param {object} data - Render data object.
 * @example
 *    var taskBinFile = h.newTaskBinFile({foo:bar}).force(false).mode('644');
 * @returns {object} - File config object.
 */
exports.newTaskBinFile = function (data) {
    var src = 'tmpl/bin/task_bin.hbs';
    return newReadonlyFile(src, data);
};

/**
 * File definition with tmpl/gitignore.hbs template.
 * By default,  mode is 444 and force option is enabled.
 * @function apemanfile.helper.newGitignoreFile
 * @param {object} data - Render data object.
 * @example
 *    var gitignoreFile = h.newGitignoreFile({foo:bar}).force(false).mode('644');
 * @returns {object} - File config object.
 */
exports.newGitignoreFile = function (data) {
    var src = 'tmpl/gitignore.hbs';
    return newReadonlyFile(src, data);
};

/**
 * File definition with tmpl/html/doc-index.html.hbs template.
 * By default,  mode is 444 and force option is enabled.
 * @function apemanfile.helper.newDocIndexHtmlFile
 * @param {object} data - Render data object.
 * @example
 *    var docIndexHtmlFile = h.newDocIndexHtmlFile({foo:bar}).force(false).mode('644');
 * @returns {object} - File config object.
 */
exports.newDocIndexHtmlFile = function (data) {
    var src = 'tmpl/html/doc-index.html.hbs';
    return newReadonlyFile(src, data);
};

/**
 * File definition with tmpl/js/ci-dependencies-config.js.hbs template.
 * By default,  mode is 444 and force option is enabled.
 * @function apemanfile.helper.newCiDependenciesConfigJsFile
 * @param {object} data - Render data object.
 * @example
 *    var ciDependenciesConfigJsFile = h.newCiDependenciesConfigJsFile({foo:bar}).force(false).mode('644');
 * @returns {object} - File config object.
 */
exports.newCiDependenciesConfigJsFile = function (data) {
    var src = 'tmpl/js/ci-dependencies-config.js.hbs';
    return newReadonlyFile(src, data);
};

/**
 * File definition with tmpl/js/ci-index-config.js.hbs template.
 * By default,  mode is 444 and force option is enabled.
 * @function apemanfile.helper.newCiIndexConfigJsFile
 * @param {object} data - Render data object.
 * @example
 *    var ciIndexConfigJsFile = h.newCiIndexConfigJsFile({foo:bar}).force(false).mode('644');
 * @returns {object} - File config object.
 */
exports.newCiIndexConfigJsFile = function (data) {
    var src = 'tmpl/js/ci-index-config.js.hbs';
    return newReadonlyFile(src, data);
};

/**
 * File definition with tmpl/js/ci-meta-config.js.hbs template.
 * By default,  mode is 444 and force option is enabled.
 * @function apemanfile.helper.newCiMetaConfigJsFile
 * @param {object} data - Render data object.
 * @example
 *    var ciMetaConfigJsFile = h.newCiMetaConfigJsFile({foo:bar}).force(false).mode('644');
 * @returns {object} - File config object.
 */
exports.newCiMetaConfigJsFile = function (data) {
    var src = 'tmpl/js/ci-meta-config.js.hbs';
    return newReadonlyFile(src, data);
};

/**
 * File definition with tmpl/js/ci-scaffold-config.js.hbs template.
 * By default,  mode is 444 and force option is enabled.
 * @function apemanfile.helper.newCiScaffoldConfigJsFile
 * @param {object} data - Render data object.
 * @example
 *    var ciScaffoldConfigJsFile = h.newCiScaffoldConfigJsFile({foo:bar}).force(false).mode('644');
 * @returns {object} - File config object.
 */
exports.newCiScaffoldConfigJsFile = function (data) {
    var src = 'tmpl/js/ci-scaffold-config.js.hbs';
    return newReadonlyFile(src, data);
};

/**
 * File definition with tmpl/js/ci-structure-config.js.hbs template.
 * By default,  mode is 444 and force option is enabled.
 * @function apemanfile.helper.newCiStructureConfigJsFile
 * @param {object} data - Render data object.
 * @example
 *    var ciStructureConfigJsFile = h.newCiStructureConfigJsFile({foo:bar}).force(false).mode('644');
 * @returns {object} - File config object.
 */
exports.newCiStructureConfigJsFile = function (data) {
    var src = 'tmpl/js/ci-structure-config.js.hbs';
    return newReadonlyFile(src, data);
};

/**
 * File definition with tmpl/js/ci_debug.js.hbs template.
 * By default,  mode is 444 and force option is enabled.
 * @function apemanfile.helper.newCiDebugJsFile
 * @param {object} data - Render data object.
 * @example
 *    var ciDebugJsFile = h.newCiDebugJsFile({foo:bar}).force(false).mode('644');
 * @returns {object} - File config object.
 */
exports.newCiDebugJsFile = function (data) {
    var src = 'tmpl/js/ci_debug.js.hbs';
    return newReadonlyFile(src, data);
};

/**
 * File definition with tmpl/js/ci_debug_test.js.hbs template.
 * By default,  mode is 444 and force option is enabled.
 * @function apemanfile.helper.newCiDebugTestJsFile
 * @param {object} data - Render data object.
 * @example
 *    var ciDebugTestJsFile = h.newCiDebugTestJsFile({foo:bar}).force(false).mode('644');
 * @returns {object} - File config object.
 */
exports.newCiDebugTestJsFile = function (data) {
    var src = 'tmpl/js/ci_debug_test.js.hbs';
    return newReadonlyFile(src, data);
};

/**
 * File definition with tmpl/js/ci_file_config_helper.js.hbs template.
 * By default,  mode is 444 and force option is enabled.
 * @function apemanfile.helper.newCiFileConfigHelperJsFile
 * @param {object} data - Render data object.
 * @example
 *    var ciFileConfigHelperJsFile = h.newCiFileConfigHelperJsFile({foo:bar}).force(false).mode('644');
 * @returns {object} - File config object.
 */
exports.newCiFileConfigHelperJsFile = function (data) {
    var src = 'tmpl/js/ci_file_config_helper.js.hbs';
    return newReadonlyFile(src, data);
};

/**
 * File definition with tmpl/js/ci_file_config_helper_test.js.hbs template.
 * By default,  mode is 444 and force option is enabled.
 * @function apemanfile.helper.newCiFileConfigHelperTestJsFile
 * @param {object} data - Render data object.
 * @example
 *    var ciFileConfigHelperTestJsFile = h.newCiFileConfigHelperTestJsFile({foo:bar}).force(false).mode('644');
 * @returns {object} - File config object.
 */
exports.newCiFileConfigHelperTestJsFile = function (data) {
    var src = 'tmpl/js/ci_file_config_helper_test.js.hbs';
    return newReadonlyFile(src, data);
};

/**
 * File definition with tmpl/js/ci_file_read_helper.js.hbs template.
 * By default,  mode is 444 and force option is enabled.
 * @function apemanfile.helper.newCiFileReadHelperJsFile
 * @param {object} data - Render data object.
 * @example
 *    var ciFileReadHelperJsFile = h.newCiFileReadHelperJsFile({foo:bar}).force(false).mode('644');
 * @returns {object} - File config object.
 */
exports.newCiFileReadHelperJsFile = function (data) {
    var src = 'tmpl/js/ci_file_read_helper.js.hbs';
    return newReadonlyFile(src, data);
};

/**
 * File definition with tmpl/js/ci_file_read_helper_test.js.hbs template.
 * By default,  mode is 444 and force option is enabled.
 * @function apemanfile.helper.newCiFileReadHelperTestJsFile
 * @param {object} data - Render data object.
 * @example
 *    var ciFileReadHelperTestJsFile = h.newCiFileReadHelperTestJsFile({foo:bar}).force(false).mode('644');
 * @returns {object} - File config object.
 */
exports.newCiFileReadHelperTestJsFile = function (data) {
    var src = 'tmpl/js/ci_file_read_helper_test.js.hbs';
    return newReadonlyFile(src, data);
};

/**
 * File definition with tmpl/js/ci_helper_config_objects.js.hbs template.
 * By default,  mode is 444 and force option is enabled.
 * @function apemanfile.helper.newCiHelperConfigObjectsJsFile
 * @param {object} data - Render data object.
 * @example
 *    var ciHelperConfigObjectsJsFile = h.newCiHelperConfigObjectsJsFile({foo:bar}).force(false).mode('644');
 * @returns {object} - File config object.
 */
exports.newCiHelperConfigObjectsJsFile = function (data) {
    var src = 'tmpl/js/ci_helper_config_objects.js.hbs';
    return newReadonlyFile(src, data);
};

/**
 * File definition with tmpl/js/ci_helper_config_objects_test.js.hbs template.
 * By default,  mode is 444 and force option is enabled.
 * @function apemanfile.helper.newCiHelperConfigObjectsTestJsFile
 * @param {object} data - Render data object.
 * @example
 *    var ciHelperConfigObjectsTestJsFile = h.newCiHelperConfigObjectsTestJsFile({foo:bar}).force(false).mode('644');
 * @returns {object} - File config object.
 */
exports.newCiHelperConfigObjectsTestJsFile = function (data) {
    var src = 'tmpl/js/ci_helper_config_objects_test.js.hbs';
    return newReadonlyFile(src, data);
};

/**
 * File definition with tmpl/js/ci_task_define_helper.js.hbs template.
 * By default,  mode is 444 and force option is enabled.
 * @function apemanfile.helper.newCiTaskDefineHelperJsFile
 * @param {object} data - Render data object.
 * @example
 *    var ciTaskDefineHelperJsFile = h.newCiTaskDefineHelperJsFile({foo:bar}).force(false).mode('644');
 * @returns {object} - File config object.
 */
exports.newCiTaskDefineHelperJsFile = function (data) {
    var src = 'tmpl/js/ci_task_define_helper.js.hbs';
    return newReadonlyFile(src, data);
};

/**
 * File definition with tmpl/js/ci_task_define_helper_test.js.hbs template.
 * By default,  mode is 444 and force option is enabled.
 * @function apemanfile.helper.newCiTaskDefineHelperTestJsFile
 * @param {object} data - Render data object.
 * @example
 *    var ciTaskDefineHelperTestJsFile = h.newCiTaskDefineHelperTestJsFile({foo:bar}).force(false).mode('644');
 * @returns {object} - File config object.
 */
exports.newCiTaskDefineHelperTestJsFile = function (data) {
    var src = 'tmpl/js/ci_task_define_helper_test.js.hbs';
    return newReadonlyFile(src, data);
};

/**
 * File definition with tmpl/js/ci_tasks.js.hbs template.
 * By default,  mode is 444 and force option is enabled.
 * @function apemanfile.helper.newCiTasksJsFile
 * @param {object} data - Render data object.
 * @example
 *    var ciTasksJsFile = h.newCiTasksJsFile({foo:bar}).force(false).mode('644');
 * @returns {object} - File config object.
 */
exports.newCiTasksJsFile = function (data) {
    var src = 'tmpl/js/ci_tasks.js.hbs';
    return newReadonlyFile(src, data);
};

/**
 * File definition with tmpl/js/ci_tasks_index.js.hbs template.
 * By default,  mode is 444 and force option is enabled.
 * @function apemanfile.helper.newCiTasksIndexJsFile
 * @param {object} data - Render data object.
 * @example
 *    var ciTasksIndexJsFile = h.newCiTasksIndexJsFile({foo:bar}).force(false).mode('644');
 * @returns {object} - File config object.
 */
exports.newCiTasksIndexJsFile = function (data) {
    var src = 'tmpl/js/ci_tasks_index.js.hbs';
    return newReadonlyFile(src, data);
};

/**
 * File definition with tmpl/js/ci_worker.js.hbs template.
 * By default,  mode is 444 and force option is enabled.
 * @function apemanfile.helper.newCiWorkerJsFile
 * @param {object} data - Render data object.
 * @example
 *    var ciWorkerJsFile = h.newCiWorkerJsFile({foo:bar}).force(false).mode('644');
 * @returns {object} - File config object.
 */
exports.newCiWorkerJsFile = function (data) {
    var src = 'tmpl/js/ci_worker.js.hbs';
    return newReadonlyFile(src, data);
};

/**
 * File definition with tmpl/js/index.js.hbs template.
 * By default,  mode is 444 and force option is enabled.
 * @function apemanfile.helper.newIndexJsFile
 * @param {object} data - Render data object.
 * @example
 *    var indexJsFile = h.newIndexJsFile({foo:bar}).force(false).mode('644');
 * @returns {object} - File config object.
 */
exports.newIndexJsFile = function (data) {
    var src = 'tmpl/js/index.js.hbs';
    return newReadonlyFile(src, data);
};

/**
 * File definition with tmpl/js/index_test.js.hbs template.
 * By default,  mode is 444 and force option is enabled.
 * @function apemanfile.helper.newIndexTestJsFile
 * @param {object} data - Render data object.
 * @example
 *    var indexTestJsFile = h.newIndexTestJsFile({foo:bar}).force(false).mode('644');
 * @returns {object} - File config object.
 */
exports.newIndexTestJsFile = function (data) {
    var src = 'tmpl/js/index_test.js.hbs';
    return newReadonlyFile(src, data);
};

/**
 * File definition with tmpl/js/lib_index_test.js.hbs template.
 * By default,  mode is 444 and force option is enabled.
 * @function apemanfile.helper.newLibIndexTestJsFile
 * @param {object} data - Render data object.
 * @example
 *    var libIndexTestJsFile = h.newLibIndexTestJsFile({foo:bar}).force(false).mode('644');
 * @returns {object} - File config object.
 */
exports.newLibIndexTestJsFile = function (data) {
    var src = 'tmpl/js/lib_index_test.js.hbs';
    return newReadonlyFile(src, data);
};

/**
 * File definition with tmpl/js/mock_injector.js.hbs template.
 * By default,  mode is 444 and force option is enabled.
 * @function apemanfile.helper.newMockInjectorJsFile
 * @param {object} data - Render data object.
 * @example
 *    var mockInjectorJsFile = h.newMockInjectorJsFile({foo:bar}).force(false).mode('644');
 * @returns {object} - File config object.
 */
exports.newMockInjectorJsFile = function (data) {
    var src = 'tmpl/js/mock_injector.js.hbs';
    return newReadonlyFile(src, data);
};

/**
 * File definition with tmpl/js/test_resource.js.hbs template.
 * By default,  mode is 444 and force option is enabled.
 * @function apemanfile.helper.newTestResourceJsFile
 * @param {object} data - Render data object.
 * @example
 *    var testResourceJsFile = h.newTestResourceJsFile({foo:bar}).force(false).mode('644');
 * @returns {object} - File config object.
 */
exports.newTestResourceJsFile = function (data) {
    var src = 'tmpl/js/test_resource.js.hbs';
    return newReadonlyFile(src, data);
};

/**
 * File definition with tmpl/js/unit_test.js.hbs template.
 * By default,  mode is 444 and force option is enabled.
 * @function apemanfile.helper.newUnitTestJsFile
 * @param {object} data - Render data object.
 * @example
 *    var unitTestJsFile = h.newUnitTestJsFile({foo:bar}).force(false).mode('644');
 * @returns {object} - File config object.
 */
exports.newUnitTestJsFile = function (data) {
    var src = 'tmpl/js/unit_test.js.hbs';
    return newReadonlyFile(src, data);
};

/**
 * File definition with tmpl/md/README.md.hbs template.
 * By default,  mode is 444 and force option is enabled.
 * @function apemanfile.helper.newREADMEMdFile
 * @param {object} data - Render data object.
 * @example
 *    var READMEMdFile = h.newREADMEMdFile({foo:bar}).force(false).mode('644');
 * @returns {object} - File config object.
 */
exports.newREADMEMdFile = function (data) {
    var src = 'tmpl/md/README.md.hbs';
    return newReadonlyFile(src, data);
};

/**
 * File definition with tmpl/mock/mock_coffee.coffee.hbs template.
 * By default,  mode is 444 and force option is enabled.
 * @function apemanfile.helper.newMockCoffeeCoffeeFile
 * @param {object} data - Render data object.
 * @example
 *    var mockCoffeeCoffeeFile = h.newMockCoffeeCoffeeFile({foo:bar}).force(false).mode('644');
 * @returns {object} - File config object.
 */
exports.newMockCoffeeCoffeeFile = function (data) {
    var src = 'tmpl/mock/mock_coffee.coffee.hbs';
    return newReadonlyFile(src, data);
};

/**
 * File definition with tmpl/mock/mock_css.css.hbs template.
 * By default,  mode is 444 and force option is enabled.
 * @function apemanfile.helper.newMockCssCssFile
 * @param {object} data - Render data object.
 * @example
 *    var mockCssCssFile = h.newMockCssCssFile({foo:bar}).force(false).mode('644');
 * @returns {object} - File config object.
 */
exports.newMockCssCssFile = function (data) {
    var src = 'tmpl/mock/mock_css.css.hbs';
    return newReadonlyFile(src, data);
};

/**
 * File definition with tmpl/mock/mock_html.html.hbs template.
 * By default,  mode is 444 and force option is enabled.
 * @function apemanfile.helper.newMockHtmlHtmlFile
 * @param {object} data - Render data object.
 * @example
 *    var mockHtmlHtmlFile = h.newMockHtmlHtmlFile({foo:bar}).force(false).mode('644');
 * @returns {object} - File config object.
 */
exports.newMockHtmlHtmlFile = function (data) {
    var src = 'tmpl/mock/mock_html.html.hbs';
    return newReadonlyFile(src, data);
};

/**
 * File definition with tmpl/mock/mock_jade.jade.hbs template.
 * By default,  mode is 444 and force option is enabled.
 * @function apemanfile.helper.newMockJadeJadeFile
 * @param {object} data - Render data object.
 * @example
 *    var mockJadeJadeFile = h.newMockJadeJadeFile({foo:bar}).force(false).mode('644');
 * @returns {object} - File config object.
 */
exports.newMockJadeJadeFile = function (data) {
    var src = 'tmpl/mock/mock_jade.jade.hbs';
    return newReadonlyFile(src, data);
};

/**
 * File definition with tmpl/mock/mock_js.js.hbs template.
 * By default,  mode is 444 and force option is enabled.
 * @function apemanfile.helper.newMockJsJsFile
 * @param {object} data - Render data object.
 * @example
 *    var mockJsJsFile = h.newMockJsJsFile({foo:bar}).force(false).mode('644');
 * @returns {object} - File config object.
 */
exports.newMockJsJsFile = function (data) {
    var src = 'tmpl/mock/mock_js.js.hbs';
    return newReadonlyFile(src, data);
};

/**
 * File definition with tmpl/mock/mock_less.less.hbs template.
 * By default,  mode is 444 and force option is enabled.
 * @function apemanfile.helper.newMockLessLessFile
 * @param {object} data - Render data object.
 * @example
 *    var mockLessLessFile = h.newMockLessLessFile({foo:bar}).force(false).mode('644');
 * @returns {object} - File config object.
 */
exports.newMockLessLessFile = function (data) {
    var src = 'tmpl/mock/mock_less.less.hbs';
    return newReadonlyFile(src, data);
};

/**
 * File definition with tmpl/mock/mock_log.log.hbs template.
 * By default,  mode is 444 and force option is enabled.
 * @function apemanfile.helper.newMockLogLogFile
 * @param {object} data - Render data object.
 * @example
 *    var mockLogLogFile = h.newMockLogLogFile({foo:bar}).force(false).mode('644');
 * @returns {object} - File config object.
 */
exports.newMockLogLogFile = function (data) {
    var src = 'tmpl/mock/mock_log.log.hbs';
    return newReadonlyFile(src, data);
};

/**
 * File definition with tmpl/mock/mock_txt.txt.hbs template.
 * By default,  mode is 444 and force option is enabled.
 * @function apemanfile.helper.newMockTxtTxtFile
 * @param {object} data - Render data object.
 * @example
 *    var mockTxtTxtFile = h.newMockTxtTxtFile({foo:bar}).force(false).mode('644');
 * @returns {object} - File config object.
 */
exports.newMockTxtTxtFile = function (data) {
    var src = 'tmpl/mock/mock_txt.txt.hbs';
    return newReadonlyFile(src, data);
};

