[Calendar] Change common variables names to match other modules
authorPawel Kaczmarek <p.kaczmarek3@samsung.com>
Thu, 22 Jan 2015 11:47:08 +0000 (12:47 +0100)
committerPawel Sikorski <p.sikorski@samsung.com>
Thu, 22 Jan 2015 15:16:01 +0000 (00:16 +0900)
[Verification] TCT without change

Change-Id: I8eb70a24e39c1c59d03ba23de11621639fb10403
Signed-off-by: Pawel Kaczmarek <p.kaczmarek3@samsung.com>
src/calendar/js/calendar.js
src/calendar/js/calendar_alarm.js
src/calendar/js/calendar_attendee.js
src/calendar/js/calendar_item.js
src/calendar/js/calendar_manager.js
src/calendar/js/calendar_recurrence_rule.js
src/calendar/js/common.js

index 9833edc05fa84c3f0d6e5042972283e5288ceaf1..284f06cb3cb6f94300f25d28359423cc6593b49d 100644 (file)
@@ -53,14 +53,14 @@ var InternalCalendar = function(data) {
 var Calendar = function(accountId, name, type) {
   var _data;
 
-  AV.isConstructorCall(this, Calendar);
+  validator_.isConstructorCall(this, Calendar);
 
   if (arguments[0] instanceof InternalCalendar) {
     _data = arguments[0];
   } else {
-    var _accountId = Converter.toLong(accountId);
-    var _name = Converter.toString(name);
-    var _type = Converter.toString(type);
+    var _accountId = converter_.toLong(accountId);
+    var _name = converter_.toString(name);
+    var _type = converter_.toString(type);
 
     if (arguments.length < 3) {
       _data = new InternalCalendar();
@@ -75,13 +75,13 @@ var Calendar = function(accountId, name, type) {
 
   Object.defineProperties(this, {
     accountId: {
-      value: Converter.toLong(_data.accountId),
+      value: converter_.toLong(_data.accountId),
       writable: false,
       enumerable: true
     },
     id: {
       get: function() {
-        return Converter.toString(_data.id, true);
+        return converter_.toString(_data.id, true);
       },
       set: function(v) {
         if (v instanceof InternalCalendar) {
@@ -114,14 +114,14 @@ Calendar.prototype.get = function(id) {
     if (!parseInt(id) || parseInt(id) <= 0) {
       throw new tizen.WebAPIException(tizen.WebAPIException.NOT_FOUND_ERR);
     }
-    args = AV.validateArgs(arguments, [{
+    args = validator_.validateArgs(arguments, [{
       name: 'id',
-      type: AV.Types.STRING
+      type: types_.STRING
     }]);
   } else {
-    args = AV.validateArgs(arguments, [{
+    args = validator_.validateArgs(arguments, [{
       name: 'id',
-      type: AV.Types.PLATFORM_OBJECT,
+      type: types_.PLATFORM_OBJECT,
       values: tizen.CalendarEventId
     }]);
   }
@@ -150,10 +150,10 @@ Calendar.prototype.get = function(id) {
 };
 
 Calendar.prototype.add = function() {
-  var args = AV.validateArgs(arguments, [
+  var args = validator_.validateArgs(arguments, [
     {
       name: 'item',
-      type: AV.Types.PLATFORM_OBJECT,
+      type: types_.PLATFORM_OBJECT,
       values: [CalendarEvent, CalendarTask]
     }
   ]);
@@ -193,20 +193,20 @@ Calendar.prototype.add = function() {
 };
 
 Calendar.prototype.addBatch = function() {
-  var args = AV.validateArgs(arguments, [
+  var args = validator_.validateArgs(arguments, [
     {
       name: 'items',
-      type: AV.Types.ARRAY,
+      type: types_.ARRAY,
       values: (this.type === CalendarType.EVENT)
                 ? tizen.CalendarEvent : tizen.CalendarTask
     }, {
       name: 'successCallback',
-      type: AV.Types.FUNCTION,
+      type: types_.FUNCTION,
       optional: true,
       nullable: true
     }, {
       name: 'errorCallback',
-      type: AV.Types.FUNCTION,
+      type: types_.FUNCTION,
       optional: true,
       nullable: true
     }
@@ -255,15 +255,15 @@ Calendar.prototype.addBatch = function() {
 };
 
 Calendar.prototype.update = function() {
-  var args = AV.validateArgs(arguments, [
+  var args = validator_.validateArgs(arguments, [
     {
       name: 'item',
-      type: AV.Types.PLATFORM_OBJECT,
+      type: types_.PLATFORM_OBJECT,
       values: [tizen.CalendarEvent, tizen.CalendarTask]
     },
     {
       name: 'updateAllInstances',
-      type: AV.Types.BOOLEAN,
+      type: types_.BOOLEAN,
       optional: true,
       nullable: true
     }
@@ -282,7 +282,7 @@ Calendar.prototype.update = function() {
     item: tmp,
     type: this.type,
     updateAllInstances: (args.has.updateAllInstances)
-            ? Converter.toBoolean(args.updateAllInstances, true)
+            ? converter_.toBoolean(args.updateAllInstances, true)
             : true
   });
 
@@ -302,28 +302,28 @@ Calendar.prototype.update = function() {
 };
 
 Calendar.prototype.updateBatch = function() {
-  var args = AV.validateArgs(arguments, [
+  var args = validator_.validateArgs(arguments, [
     {
       name: 'items',
-      type: AV.Types.ARRAY,
+      type: types_.ARRAY,
       values: (this.type === CalendarType.EVENT)
                 ? tizen.CalendarEvent : tizen.CalendarTask
     },
     {
       name: 'successCallback',
-      type: AV.Types.FUNCTION,
+      type: types_.FUNCTION,
       optional: true,
       nullable: true
     },
     {
       name: 'errorCallback',
-      type: AV.Types.FUNCTION,
+      type: types_.FUNCTION,
       optional: true,
       nullable: true
     },
     {
       name: 'updateAllInstances',
-      type: AV.Types.BOOLEAN,
+      type: types_.BOOLEAN,
       optional: true,
       nullable: true
     }
@@ -356,7 +356,7 @@ Calendar.prototype.updateBatch = function() {
     type: this.type,
     items: tmp,
     updateAllInstances: (args.has.updateAllInstances)
-            ? Converter.toBoolean(args.updateAllInstances, true)
+            ? converter_.toBoolean(args.updateAllInstances, true)
             : true
   }, callback);
 
@@ -368,14 +368,14 @@ Calendar.prototype.remove = function(id) {
     if (!parseInt(id) || parseInt(id) <= 0) {
       throw new tizen.WebAPIException(tizen.WebAPIException.NOT_FOUND_ERR);
     }
-    args = AV.validateArgs(arguments, [{
+    args = validator_.validateArgs(arguments, [{
       name: 'id',
-      type: AV.Types.STRING
+      type: types_.STRING
     }]);
   } else {
-    args = AV.validateArgs(arguments, [{
+    args = validator_.validateArgs(arguments, [{
       name: 'id',
-      type: AV.Types.PLATFORM_OBJECT,
+      type: types_.PLATFORM_OBJECT,
       values: tizen.CalendarEventId
     }]);
   }
@@ -391,22 +391,22 @@ Calendar.prototype.remove = function(id) {
 };
 
 Calendar.prototype.removeBatch = function() {
-  var args = AV.validateArgs(arguments, [
+  var args = validator_.validateArgs(arguments, [
     {
       name: 'ids',
-      type: AV.Types.ARRAY,
+      type: types_.ARRAY,
       values: (this.type === CalendarType.EVENT)
                 ? tizen.CalendarEventId : undefined
     },
     {
       name: 'successCallback',
-      type: AV.Types.FUNCTION,
+      type: types_.FUNCTION,
       optional: true,
       nullable: true
     },
     {
       name: 'errorCallback',
-      type: AV.Types.FUNCTION,
+      type: types_.FUNCTION,
       optional: true,
       nullable: true
     }
@@ -428,27 +428,27 @@ Calendar.prototype.removeBatch = function() {
 };
 
 Calendar.prototype.find = function(successCallback, errorCallback, filter, sortMode) {
-  var args = AV.validateArgs(arguments, [
+  var args = validator_.validateArgs(arguments, [
     {
       name: 'successCallback',
-      type: AV.Types.FUNCTION
+      type: types_.FUNCTION
     },
     {
       name: 'errorCallback',
-      type: AV.Types.FUNCTION,
+      type: types_.FUNCTION,
       optional: true,
       nullable: true
     },
     {
       name: 'filter',
-      type: AV.Types.PLATFORM_OBJECT,
+      type: types_.PLATFORM_OBJECT,
       values: [tizen.AttributeFilter, tizen.AttributeRangeFilter, tizen.CompositeFilter],
       optional: true,
       nullable: true
     },
     {
       name: 'sortMode',
-      type: AV.Types.PLATFORM_OBJECT,
+      type: types_.PLATFORM_OBJECT,
       values: tizen.SortMode,
       optional: true,
       nullable: true
@@ -483,7 +483,7 @@ Calendar.prototype.find = function(successCallback, errorCallback, filter, sortM
   };
 
   C.filter = function (arr, filter) {
-    if (T.isNullOrUndefined(arr))
+    if (type_.isNullOrUndefined(arr))
       return arr;
     if (filter instanceof tizen.AttributeFilter ||
             filter instanceof tizen.AttributeRangeFilter ||
@@ -549,7 +549,7 @@ function _CalendarChangeCallback(type, event) {
         if (type === 'EVENT') {
           item = new CalendarEventId(items[i].id, null);
         } else {
-          item = Converter.toString(items[i].id);
+          item = converter_.toString(items[i].id);
         }
       } else {
         item = _itemConverter.toTizenObject(items[i], items[i].isAllDay);
@@ -596,7 +596,7 @@ function _CalendarChangeCallback(type, event) {
     var action = actions[i];
     var callback = 'onitems' + action;
 
-    if (event.hasOwnProperty(action) && T.isArray(event[action]) && event[action].length) {
+    if (event.hasOwnProperty(action) && type_.isArray(event[action]) && event[action].length) {
 
       // invoke listeners for unified calendars
       if (_listeners.hasOwnProperty(type)) {
@@ -614,9 +614,9 @@ function _CalendarChangeCallback(type, event) {
 }
 
 Calendar.prototype.addChangeListener = function() {
-  var args = AV.validateArgs(arguments, [{
+  var args = validator_.validateArgs(arguments, [{
     name: 'successCallback',
-    type: AV.Types.LISTENER,
+    type: types_.LISTENER,
     values: ['onitemsadded', 'onitemsupdated', 'onitemsremoved']
   }]);
 
@@ -650,14 +650,14 @@ Calendar.prototype.addChangeListener = function() {
 };
 
 Calendar.prototype.removeChangeListener = function() {
-  var args = AV.validateArgs(arguments, [
+  var args = validator_.validateArgs(arguments, [
     {
       name: 'watchId',
-      type: AV.Types.LONG
+      type: types_.LONG
     }
   ]);
 
-  var watchId = Converter.toString(args.watchId);
+  var watchId = converter_.toString(args.watchId);
   var calendarId = (this.isUnified) ? this.type : this.id;
 
   if (!_listeners[calendarId] || !_listeners[calendarId][watchId]) {
@@ -666,11 +666,11 @@ Calendar.prototype.removeChangeListener = function() {
 
   delete _listeners[calendarId][watchId];
 
-  if (T.isEmptyObject(_listeners[calendarId])) {
+  if (type_.isEmptyObject(_listeners[calendarId])) {
     delete _listeners[calendarId];
   }
 
-  if (T.isEmptyObject(_listeners)) {
+  if (type_.isEmptyObject(_listeners)) {
 
     var result;
     // @todo consider listener unregister when we are not listening on this.type of calendar
index b9ac85d524271f7e0e2089373a24a9967ec9b015..9f64b110e124f8e7d5f8e4d116e2f22940362606 100644 (file)
@@ -8,12 +8,12 @@ var AlarmMethod = {
 };
 
 var CalendarAlarm = function(time, method, description) {
-  AV.isConstructorCall(this, CalendarAlarm);
+  validator_.isConstructorCall(this, CalendarAlarm);
 
   var _absoluteDate = time instanceof tizen.TZDate && !this.before ? time : null;
   var _before = time instanceof tizen.TimeDuration && !this.absoluteDate ? time : null;
-  var _method = Converter.toEnum(method, Object.keys(AlarmMethod), false);
-  var _description = (description) ? Converter.toString(description, true) : '';
+  var _method = converter_.toEnum(method, Object.keys(AlarmMethod), false);
+  var _description = (description) ? converter_.toString(description, true) : '';
 
   Object.defineProperties(this, {
     absoluteDate: {
@@ -42,7 +42,7 @@ var CalendarAlarm = function(time, method, description) {
         if (v === null) {
           return;
         }
-        _method = Converter.toEnum(v, Object.keys(AlarmMethod), false);
+        _method = converter_.toEnum(v, Object.keys(AlarmMethod), false);
       },
       enumerable: true
     },
@@ -51,7 +51,7 @@ var CalendarAlarm = function(time, method, description) {
         return _description;
       },
       set: function(v) {
-        _description = Converter.toString(v, true);
+        _description = converter_.toString(v, true);
       },
       enumerable: true
     }
index 85757644d97318e610ab457f99522accb1338596..b52e417ba3b801114640b8a34e8c871205774a8d 100644 (file)
@@ -44,7 +44,7 @@ var CalendarAttendeeInit = function(data) {
         return _name;
       },
       set: function(v) {
-        _name = Converter.toString(v, true);
+        _name = converter_.toString(v, true);
       },
       enumerable: true
     },
@@ -56,7 +56,7 @@ var CalendarAttendeeInit = function(data) {
         if (v === null) {
           return;
         }
-        _role = Converter.toEnum(v, Object.keys(AttendeeRole), false);
+        _role = converter_.toEnum(v, Object.keys(AttendeeRole), false);
       },
       enumerable: true
     },
@@ -68,7 +68,7 @@ var CalendarAttendeeInit = function(data) {
         if (v === null) {
           return;
         }
-        _status = Converter.toEnum(v, Object.keys(AttendeeStatus), false);
+        _status = converter_.toEnum(v, Object.keys(AttendeeStatus), false);
       },
       enumerable: true
     },
@@ -77,7 +77,7 @@ var CalendarAttendeeInit = function(data) {
         return _RSVP;
       },
       set: function(v) {
-        _RSVP = Converter.toBoolean(v);
+        _RSVP = converter_.toBoolean(v);
       },
       enumerable: true
     },
@@ -89,7 +89,7 @@ var CalendarAttendeeInit = function(data) {
         if (v === null) {
           return;
         }
-        _type = Converter.toEnum(v, Object.keys(AttendeeType), false);
+        _type = converter_.toEnum(v, Object.keys(AttendeeType), false);
       },
       enumerable: true
     },
@@ -98,7 +98,7 @@ var CalendarAttendeeInit = function(data) {
         return _group;
       },
       set: function(v) {
-        _group = Converter.toString(v, true);
+        _group = converter_.toString(v, true);
       },
       enumerable: true
     },
@@ -107,7 +107,7 @@ var CalendarAttendeeInit = function(data) {
         return _delegatorURI;
       },
       set: function(v) {
-        _delegatorURI = Converter.toString(v, true);
+        _delegatorURI = converter_.toString(v, true);
       },
       enumerable: true
     },
@@ -116,7 +116,7 @@ var CalendarAttendeeInit = function(data) {
         return _delegateURI;
       },
       set: function(v) {
-        _delegateURI = Converter.toString(v, true);
+        _delegateURI = converter_.toString(v, true);
       },
       enumerable: true
     },
@@ -141,7 +141,7 @@ var CalendarAttendeeInit = function(data) {
 };
 
 var CalendarAttendee = function(uri, attendeeInitDict) {
-  AV.isConstructorCall(this, CalendarAttendee);
+  validator_.isConstructorCall(this, CalendarAttendee);
 
   CalendarAttendeeInit.call(this, attendeeInitDict);
 
@@ -156,7 +156,7 @@ var CalendarAttendee = function(uri, attendeeInitDict) {
         if (v === null) {
           return;
         }
-        _uri = Converter.toString(v, true);
+        _uri = converter_.toString(v, true);
       },
       enumerable: true
     }
index c7de25d329f00fff08cb74e34264e72d48c65cdc..ee69f13e1d896cf0b406a94569e6aca523167357 100644 (file)
@@ -34,7 +34,7 @@ var EventAvailability = {
 };
 
 var CalendarEventId = function(uid, rid) {
-  AV.isConstructorCall(this, CalendarEventId);
+  validator_.isConstructorCall(this, CalendarEventId);
 
   var _uid = null;
 
@@ -47,12 +47,12 @@ var CalendarEventId = function(uid, rid) {
         if (v === null) {
           return;
         }
-        _uid = Converter.toString(v, true);
+        _uid = converter_.toString(v, true);
       },
       enumerable: true
     },
     rid: {
-      value: (rid) ? Converter.toString(rid, true) : null,
+      value: (rid) ? converter_.toString(rid, true) : null,
       writable: true,
       enumerable: true
     }
@@ -84,7 +84,7 @@ var CalendarItem = function(data) {
   function _validateAlarms(v) {
     var valid = false;
 
-    if (T.isArray(v)) {
+    if (type_.isArray(v)) {
       for (var i = 0; i < v.length; i++) {
         if (!(v[i] instanceof tizen.CalendarAlarm)) {
           return false;
@@ -98,7 +98,7 @@ var CalendarItem = function(data) {
   function _validateAttendees(v) {
     var valid = false;
 
-    if (T.isArray(v)) {
+    if (type_.isArray(v)) {
       for (var i = 0; i < v.length; i++) {
         if (!(v[i] instanceof tizen.CalendarAttendee)) {
           return false;
@@ -112,9 +112,9 @@ var CalendarItem = function(data) {
   function _validateCategories(v) {
     var valid = false;
 
-    if (T.isArray(v)) {
+    if (type_.isArray(v)) {
       for (var i = 0; i < v.length; i++) {
-        if (!(T.isString(v[i]))) {
+        if (!(type_.isString(v[i]))) {
           return false;
         }
       }
@@ -133,7 +133,7 @@ var CalendarItem = function(data) {
           if (v instanceof Object) {
             _id = new CalendarEventId(v.uid, v.rid);
           } else {
-            _id = Converter.toString(v, true);
+            _id = converter_.toString(v, true);
           }
         }
       },
@@ -167,7 +167,7 @@ var CalendarItem = function(data) {
         return _description;
       },
       set: function(v) {
-        _description = v ? Converter.toString(v, true) : _description;
+        _description = v ? converter_.toString(v, true) : _description;
       },
       enumerable: true
     },
@@ -176,7 +176,7 @@ var CalendarItem = function(data) {
         return _summary;
       },
       set: function(v) {
-        _summary = v ? Converter.toString(v, true) : _summary;
+        _summary = v ? converter_.toString(v, true) : _summary;
       },
       enumerable: true
     },
@@ -185,7 +185,7 @@ var CalendarItem = function(data) {
         return _isAllDay;
       },
       set: function(v) {
-        _isAllDay = v ? Converter.toBoolean(v) : _isAllDay;
+        _isAllDay = v ? converter_.toBoolean(v) : _isAllDay;
       },
       enumerable: true
     },
@@ -230,7 +230,7 @@ var CalendarItem = function(data) {
         return _location;
       },
       set: function(v) {
-        _location = v ? Converter.toString(v) : _location;
+        _location = v ? converter_.toString(v) : _location;
       },
       enumerable: true
     },
@@ -248,7 +248,7 @@ var CalendarItem = function(data) {
         return _organizer;
       },
       set: function(v) {
-        _organizer = v ? Converter.toString(v) : _organizer;
+        _organizer = v ? converter_.toString(v) : _organizer;
       },
       enumerable: true
     },
@@ -257,7 +257,7 @@ var CalendarItem = function(data) {
         return _visibility;
       },
       set: function(v) {
-        _visibility = v ? Converter.toEnum(v, Object.keys(CalendarItemVisibility), false) :
+        _visibility = v ? converter_.toEnum(v, Object.keys(CalendarItemVisibility), false) :
                 _visibility;
       },
       enumerable: true
@@ -271,10 +271,10 @@ var CalendarItem = function(data) {
           return;
         }
         if (this instanceof tizen.CalendarEvent) {
-          _status = v ? Converter.toEnum(v, Object.keys(CalendarItemStatus).slice(0, 3), false) :
+          _status = v ? converter_.toEnum(v, Object.keys(CalendarItemStatus).slice(0, 3), false) :
                         CalendarItemStatus.CONFIRMED;
         } else {
-          _status = v ? Converter.toEnum(v, Object.keys(CalendarItemStatus).slice(2), false) :
+          _status = v ? converter_.toEnum(v, Object.keys(CalendarItemStatus).slice(2), false) :
                         CalendarItemStatus.NEEDS_ACTION;
         }
       },
@@ -288,7 +288,7 @@ var CalendarItem = function(data) {
         if (v === null) {
           return;
         }
-        _priority = v ? Converter.toEnum(v, Object.keys(CalendarItemPriority), false) :
+        _priority = v ? converter_.toEnum(v, Object.keys(CalendarItemPriority), false) :
                     _status;
       },
       enumerable: true
@@ -333,10 +333,10 @@ var CalendarItem = function(data) {
 };
 
 CalendarItem.prototype.convertToString = function() {
-  var args = AV.validateArgs(arguments, [
+  var args = validator_.validateArgs(arguments, [
     {
       name: 'format',
-      type: AV.Types.ENUM,
+      type: types_.ENUM,
       values: Object.keys(CalendarTextFormat)
     }
   ]);
@@ -549,7 +549,7 @@ var CalendarTaskInit = function(data) {
         if (v === null) {
           return;
         }
-        _progress = (T.isNumber(v) && (v >= 0 || v <= 100)) ? v : _progress;
+        _progress = (type_.isNumber(v) && (v >= 0 || v <= 100)) ? v : _progress;
       },
       enumerable: true
     }
@@ -565,9 +565,9 @@ var CalendarTaskInit = function(data) {
 };
 
 var CalendarTask = function(taskInitDict, format) {
-  AV.isConstructorCall(this, CalendarTask);
+  validator_.isConstructorCall(this, CalendarTask);
 
-  if (T.isString(taskInitDict) && Object.keys(CalendarTextFormat).indexOf(format) > -1) {
+  if (type_.isString(taskInitDict) && Object.keys(CalendarTextFormat).indexOf(format) > -1) {
     CalendarTaskInit.call(this, _convertFromStringToItem(taskInitDict));
   } else {
     CalendarTaskInit.call(this, taskInitDict);
@@ -657,9 +657,9 @@ var CalendarEventInit = function(data) {
 };
 
 var CalendarEvent = function(eventInitDict, format) {
-  AV.isConstructorCall(this, CalendarEvent);
+  validator_.isConstructorCall(this, CalendarEvent);
 
-  if (T.isString(eventInitDict) && Object.keys(CalendarTextFormat).indexOf(format) > -1) {
+  if (type_.isString(eventInitDict) && Object.keys(CalendarTextFormat).indexOf(format) > -1) {
     CalendarEventInit.call(this, _convertFromStringToItem(eventInitDict));
   } else {
     CalendarEventInit.call(this, eventInitDict);
@@ -692,25 +692,25 @@ CalendarEvent.prototype.expandRecurrence = function(startDate, endDate, successC
       'The event is not recurring.');
   }
 
-  var args = AV.validateArgs(arguments, [
+  var args = validator_.validateArgs(arguments, [
     {
       name: 'startDate',
-      type: AV.Types.PLATFORM_OBJECT,
+      type: types_.PLATFORM_OBJECT,
       values: tizen.TZDate
     },
     {
       name: 'endDate',
-      type: AV.Types.PLATFORM_OBJECT,
+      type: types_.PLATFORM_OBJECT,
       values: tizen.TZDate
     },
     {
       name: 'successCallback',
-      type: AV.Types.FUNCTION,
+      type: types_.FUNCTION,
       nullable: true
     },
     {
       name: 'errorCallback',
-      type: AV.Types.FUNCTION,
+      type: types_.FUNCTION,
       optional: true,
       nullable: true
     }
index b6e0f49f2e8f77031f73fab958c7ba34938d5d40..62907b0c0f6d1f7a053c7b41711de958916a5541 100644 (file)
@@ -12,18 +12,18 @@ var DefaultCalendarId = {
 };
 
 CalendarManager.prototype.getCalendars = function() {
-  var args = AV.validateArgs(arguments, [{
+  var args = validator_.validateArgs(arguments, [{
     name: 'type',
-    type: AV.Types.ENUM,
+    type: types_.ENUM,
     values: Object.keys(CalendarType)
   },
   {
     name: 'successCallback',
-    type: AV.Types.FUNCTION
+    type: types_.FUNCTION
   },
   {
     name: 'errorCallback',
-    type: AV.Types.FUNCTION,
+    type: types_.FUNCTION,
     optional: true,
     nullable: true
   }]);
@@ -50,9 +50,9 @@ CalendarManager.prototype.getCalendars = function() {
 
 CalendarManager.prototype.getUnifiedCalendar = function() {
 
-  var args = AV.validateArgs(arguments, [{
+  var args = validator_.validateArgs(arguments, [{
     name: 'type',
-    type: AV.Types.ENUM,
+    type: types_.ENUM,
     values: Object.keys(CalendarType)
   }]);
 
@@ -64,9 +64,9 @@ CalendarManager.prototype.getUnifiedCalendar = function() {
 
 CalendarManager.prototype.getDefaultCalendar = function() {
 
-  var args = AV.validateArgs(arguments, [{
+  var args = validator_.validateArgs(arguments, [{
     name: 'type',
-    type: AV.Types.ENUM,
+    type: types_.ENUM,
     values: Object.keys(CalendarType)
   }
   ]);
@@ -76,14 +76,14 @@ CalendarManager.prototype.getDefaultCalendar = function() {
 
 CalendarManager.prototype.getCalendar = function() {
 
-  var args = AV.validateArgs(arguments, [{
+  var args = validator_.validateArgs(arguments, [{
     name: 'type',
-    type: AV.Types.ENUM,
+    type: types_.ENUM,
     values: Object.keys(CalendarType)
   },
   {
     name: 'id',
-    type: AV.Types.STRING
+    type: types_.STRING
   }
   ]);
 
@@ -103,9 +103,9 @@ CalendarManager.prototype.getCalendar = function() {
 
 CalendarManager.prototype.addCalendar = function() {
 
-  var args = AV.validateArgs(arguments, [{
+  var args = validator_.validateArgs(arguments, [{
     name: 'calendar',
-    type: AV.Types.PLATFORM_OBJECT,
+    type: types_.PLATFORM_OBJECT,
     values: Calendar
   }]);
 
@@ -126,14 +126,14 @@ CalendarManager.prototype.addCalendar = function() {
 
 CalendarManager.prototype.removeCalendar = function() {
 
-  var args = AV.validateArgs(arguments, [{
+  var args = validator_.validateArgs(arguments, [{
     name: 'type',
-    type: AV.Types.ENUM,
+    type: types_.ENUM,
     values: Object.keys(CalendarType)
   },
   {
     name: 'id',
-    type: AV.Types.STRING
+    type: types_.STRING
   }
   ]);
 
index 7e6950a4757c9e3052794b8a5ffab287a77ae58c..a4854c58c897907e668f2cb62d2d23fea144df6f 100644 (file)
@@ -28,7 +28,7 @@ var CalendarRecurrenceRuleInit = function(data) {
   var _exceptions = [];
 
   function _validateDaysOfTheWeek(v) {
-    if (T.isArray(v)) {
+    if (type_.isArray(v)) {
       var allowedValues = Object.keys(ByDayValue);
       for (var i = 0; i < v.length; ++i) {
         if (allowedValues.indexOf(v[i]) < 0) {
@@ -44,7 +44,7 @@ var CalendarRecurrenceRuleInit = function(data) {
   function _validateSetPositions(v) {
     var valid = false;
 
-    if (T.isArray(v)) {
+    if (type_.isArray(v)) {
       for (var i = 0; i < v.length; i++) {
         v[i] = parseInt(v[i]);
         if (isNaN(v[i]) || (v[i] < -366 || v[i] > 366 || v[i] === 0)) {
@@ -59,7 +59,7 @@ var CalendarRecurrenceRuleInit = function(data) {
   function _validateExceptions(v) {
     var valid = false;
 
-    if (T.isArray(v)) {
+    if (type_.isArray(v)) {
       for (var i = 0; i < v.length; i++) {
         if (!(v[i] instanceof tizen.TZDate)) {
           return false;
@@ -76,7 +76,7 @@ var CalendarRecurrenceRuleInit = function(data) {
         return _interval;
       },
       set: function(v) {
-        _interval = (T.isNumber(v) && v > 0) ? v : _interval;
+        _interval = (type_.isNumber(v) && v > 0) ? v : _interval;
       },
       enumerable: true
     },
@@ -96,7 +96,7 @@ var CalendarRecurrenceRuleInit = function(data) {
         return _occurrenceCount;
       },
       set: function(v) {
-        if (T.isNumber(v) && v >= -1) {
+        if (type_.isNumber(v) && v >= -1) {
           _occurrenceCount = v;
         }
       },
@@ -141,7 +141,7 @@ var CalendarRecurrenceRuleInit = function(data) {
 };
 
 var CalendarRecurrenceRule = function(frequency, ruleInitDict) {
-  AV.isConstructorCall(this, CalendarRecurrenceRule);
+  validator_.isConstructorCall(this, CalendarRecurrenceRule);
 
   CalendarRecurrenceRuleInit.call(this, ruleInitDict);
 
@@ -156,7 +156,7 @@ var CalendarRecurrenceRule = function(frequency, ruleInitDict) {
         if (v === null) {
           return;
         }
-        _frequency = Converter.toEnum(v, Object.keys(RecurrenceRuleFrequency), false);
+        _frequency = converter_.toEnum(v, Object.keys(RecurrenceRuleFrequency), false);
       },
       enumerable: true
     }
index 66dde084641cbf790dc3720c9b33dd005196874c..b65781d04a92a63e07a2ef8443e6a74a5ba1b2f0 100644 (file)
@@ -2,10 +2,11 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-var _common = xwalk.utils;
-var T = _common.type;
-var Converter = _common.converter;
-var AV = _common.validator;
+var utils_ = xwalk.utils;
+var type_ = utils_.type;
+var converter_ = utils_.converter;
+var validator_ = utils_.validator;
+var types_ = validator_.Types;
 var native_ = new xwalk.utils.NativeManager(extension);