function addVariantsToResult(oResult, oVariantsMap, aTechnicalParameters) {
		var oResultClone = merge({}, oResult);
		values(oVariantsMap).forEach(function(oVariant) {
			var sVariantManagementId = oVariant.content.variantManagementReference;
			if (!oResultClone[sVariantManagementId]) {
				oResultClone[sVariantManagementId] = createVariantManagementSection();
			}
			oVariant = setDefaultProperties(oVariant);
			oVariant = applyChangesOnVariant(oVariant);

			// invisible variant cannot be set as current variant
			if (!oResultClone[sVariantManagementId].currentVariant && oVariant.content.content.visible && includes(aTechnicalParameters, oVariant.content.fileName)) {
				oResultClone[sVariantManagementId].currentVariant = oVariant.content.fileName;
			}

			oResultClone[sVariantManagementId].defaultVariant = sVariantManagementId;

			var iSortedIndex = VariantsApplyUtil.getIndexToSortVariant(oResultClone[sVariantManagementId].variants, oVariant);
			oResultClone[sVariantManagementId].variants.splice(iSortedIndex, 0, oVariant);
		});

		return oResultClone;
	}
// add prepared variants to resultant variant section
add prepared variants to resultant variant section
add prepared variants to resultant variant section
function addVariantsToResult(oResult, oVariantsMap, aTechnicalParameters) {
		var oResultClone = merge({}, oResult);
		values(oVariantsMap).forEach(function(oVariant) {
			var sVariantManagementId = oVariant.content.variantManagementReference;
			if (!oResultClone[sVariantManagementId]) {
				oResultClone[sVariantManagementId] = createVariantManagementSection();
			}
			oVariant = setDefaultProperties(oVariant);
			oVariant = applyChangesOnVariant(oVariant);
			if (!oResultClone[sVariantManagementId].currentVariant && oVariant.content.content.visible && includes(aTechnicalParameters, oVariant.content.fileName)) {
				oResultClone[sVariantManagementId].currentVariant = oVariant.content.fileName;
			}
			oResultClone[sVariantManagementId].defaultVariant = sVariantManagementId;
			var iSortedIndex = VariantsApplyUtil.getIndexToSortVariant(oResultClone[sVariantManagementId].variants, oVariant);
			oResultClone[sVariantManagementId].variants.splice(iSortedIndex, 0, oVariant);
		});
		return oResultClone;
	}
function addVariantsToResult ( oResult , oVariantsMap , aTechnicalParameters ) { var oResultClone = merge ( { } , oResult ) ; values ( oVariantsMap ) . forEach ( function ( oVariant ) { var sVariantManagementId = oVariant . content . variantManagementReference ; if ( ! oResultClone [ sVariantManagementId ] ) { oResultClone [ sVariantManagementId ] = createVariantManagementSection ( ) ; } oVariant = setDefaultProperties ( oVariant ) ; oVariant = applyChangesOnVariant ( oVariant ) ; if ( ! oResultClone [ sVariantManagementId ] . currentVariant && oVariant . content . content . visible && includes ( aTechnicalParameters , oVariant . content . fileName ) ) { oResultClone [ sVariantManagementId ] . currentVariant = oVariant . content . fileName ; } oResultClone [ sVariantManagementId ] . defaultVariant = sVariantManagementId ; var iSortedIndex = VariantsApplyUtil . getIndexToSortVariant ( oResultClone [ sVariantManagementId ] . variants , oVariant ) ; oResultClone [ sVariantManagementId ] . variants . splice ( iSortedIndex , 0 , oVariant ) ; } ) ; return oResultClone ; }
add prepared variants to resultant variant section
add prepared variants to resultant variant section
// invisible variant cannot be set as current variant