Skip to content
This repository has been archived by the owner on Mar 11, 2020. It is now read-only.

Commit

Permalink
[Content] Applied object attributes assignment checking.
Browse files Browse the repository at this point in the history
* [NABI-RSA] TDIS-7319, TDIS-7322, TDIS-7323
  • Loading branch information
wcwang committed Oct 23, 2013
1 parent db6e377 commit 57c79bc
Show file tree
Hide file tree
Showing 2 changed files with 193 additions and 99 deletions.
25 changes: 17 additions & 8 deletions lib/ripple/platform/tizen/2.0/AttributeFilter.js
Expand Up @@ -22,6 +22,11 @@ AttributeFilter = function (attributeName, matchFlag, matchValue) {

t.AttributeFilter(arguments, this);

attributeFilter.attributeName = attributeName;
attributeFilter.matchFlag = matchFlag || "EXACTLY";
attributeFilter.matchValue = (matchFlag === "EXISTS") ? null :
matchValue || null;

this.__defineGetter__("attributeName", function () {
return attributeFilter.attributeName;
});
Expand All @@ -42,14 +47,18 @@ AttributeFilter = function (attributeName, matchFlag, matchValue) {
}
});

attributeFilter.attributeName = attributeName;
attributeFilter.matchFlag = matchFlag || "EXACTLY";

if(matchValue === undefined) {
this.matchValue = null;
} else {
this.matchValue = matchValue;
}
this.__defineGetter__("matchValue", function () {
return attributeFilter.matchValue;
});
this.__defineSetter__("matchValue", function (val) {
try {
if (attributeFilter.matchFlag === "EXISTS") {
return;
}
attributeFilter.matchValue = t.any(val);
} catch (e) {
}
});
};

module.exports = AttributeFilter;

0 comments on commit 57c79bc

Please sign in to comment.