src/sap.ui.support/src/sap/ui/support/supportRules/ui/models/PresetsUtils.js
function (oImport) {
			var bIsFileValid = true;

			if (!oImport.hasOwnProperty("title")) {
				bIsFileValid = false;
			}

			if (!oImport.hasOwnProperty("selections")) {
				bIsFileValid = false;
			} else if (!Array.isArray(oImport.selections)) {
				bIsFileValid = false;
			} else {
				for (var i = 0; i < oImport.selections.length; i++) {
					var oRuleSelection = oImport.selections[i];
					if (!oRuleSelection.hasOwnProperty("ruleId") || !oRuleSelection.hasOwnProperty("libName")) {
						bIsFileValid = false;
						break;
					}
				}
			}

			return bIsFileValid;
		}
function (oImport) {
			var bIsFileValid = true;

			if (!oImport.hasOwnProperty("title")) {
				bIsFileValid = false;
			}

			if (!oImport.hasOwnProperty("selections")) {
				bIsFileValid = false;
			} else if (!Array.isArray(oImport.selections)) {
				bIsFileValid = false;
			} else {
				for (var i = 0; i < oImport.selections.length; i++) {
					var oRuleSelection = oImport.selections[i];
					if (!oRuleSelection.hasOwnProperty("ruleId") || !oRuleSelection.hasOwnProperty("libName")) {
						bIsFileValid = false;
						break;
					}
				}
			}

			return bIsFileValid;
		}
function ( oImport ) { var bIsFileValid = true ; if ( ! oImport . hasOwnProperty ( "title" ) ) { bIsFileValid = false ; } if ( ! oImport . hasOwnProperty ( "selections" ) ) { bIsFileValid = false ; } else if ( ! Array . isArray ( oImport . selections ) ) { bIsFileValid = false ; } else { for ( var i = 0 ; i < oImport . selections . length ; i ++ ) { var oRuleSelection = oImport . selections [ i ] ; if ( ! oRuleSelection . hasOwnProperty ( "ruleId" ) || ! oRuleSelection . hasOwnProperty ( "libName" ) ) { bIsFileValid = false ; break ; } } } return bIsFileValid ; }
Validates if the given import is in the correct format.
@param {Object} oImport The preset object to import
@return {boolean} Is the import data a valid rule preset file
Validates if the given import is in the correct format .