diff options
author | Armen Kesablyan | 2012-06-20 15:04:25 -0700 |
---|---|---|
committer | Armen Kesablyan | 2012-06-20 15:04:25 -0700 |
commit | fc818d31de267d2b77fda3b3029ad38d48698be8 (patch) | |
tree | 122ebf54d3378578c1ded4d786ba3940d4a911d2 /node_modules/montage/data/rest-access | |
parent | 120e31dcf1e11eed11ee430d77c438e7b073e9f8 (diff) | |
parent | c9852665eadc1acb9c1c881d207c4bd9ef88805f (diff) | |
download | ninja-fc818d31de267d2b77fda3b3029ad38d48698be8.tar.gz |
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal
Diffstat (limited to 'node_modules/montage/data/rest-access')
4 files changed, 308 insertions, 0 deletions
diff --git a/node_modules/montage/data/rest-access/rest-mapping.js b/node_modules/montage/data/rest-access/rest-mapping.js new file mode 100644 index 00000000..88051c40 --- /dev/null +++ b/node_modules/montage/data/rest-access/rest-mapping.js | |||
@@ -0,0 +1,61 @@ | |||
1 | /* <copyright> | ||
2 | This file contains proprietary software owned by Motorola Mobility, Inc.<br/> | ||
3 | No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/> | ||
4 | (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. | ||
5 | </copyright> */ | ||
6 | /** | ||
7 | @module montage/data/rest-mapping | ||
8 | @requires montage/core/core | ||
9 | @requires montage/core/logger | ||
10 | @requires montage/data/mapping | ||
11 | */ | ||
12 | var Montage = require("montage").Montage; | ||
13 | var BinderMapping = require("data/mapping").BinderMapping; | ||
14 | var BlueprintMapping = require("data/mapping").BlueprintMapping; | ||
15 | var AttributeMapping = require("data/mapping").AttributeMapping; | ||
16 | var AssociationMapping = require("data/mapping").AssociationMapping; | ||
17 | var logger = require("core/logger").logger("rest-mapping"); | ||
18 | |||
19 | /** | ||
20 | * TODO | ||
21 | @class module:montage/data/rest-access/rest-mapping.RestBinderMapping | ||
22 | @extends module:montage/data/mapping.BinderMapping | ||
23 | */ | ||
24 | var RestBinderMapping = exports.RestBinderMapping = Montage.create(BinderMapping, /** @lends module:montage/data/rest-access/rest-mapping.RestBinderMapping# */ { | ||
25 | |||
26 | |||
27 | }); | ||
28 | |||
29 | |||
30 | /** | ||
31 | * TODO | ||
32 | @class module:montage/data/rest-access/rest-mapping.RestBlueprintMapping | ||
33 | @extends module:montage/data/mapping.BlueprintMapping | ||
34 | */ | ||
35 | var RestBlueprintMapping = exports.RestBlueprintMapping = Montage.create(BlueprintMapping, /** @lends module:montage/data/rest-access/rest-mapping.RestBlueprintMapping# */ { | ||
36 | |||
37 | |||
38 | }); | ||
39 | |||
40 | |||
41 | /** | ||
42 | * TODO | ||
43 | @class module:montage/data/rest-access/rest-mapping.RestAttributeMapping | ||
44 | @extends module:montage/data/mapping.AttributeMapping | ||
45 | */ | ||
46 | var RestAttributeMapping = exports.RestAttributeMapping = Montage.create(AttributeMapping, /** @lends module:montage/data/rest-access/rest-mapping.RestAttributeMapping# */ { | ||
47 | |||
48 | |||
49 | }); | ||
50 | |||
51 | |||
52 | /** | ||
53 | * TODO | ||
54 | @class module:montage/data/rest-access/rest-mapping.RestAssociationMapping | ||
55 | @extends module:montage/data/mapping.AssociationMapping | ||
56 | */ | ||
57 | var RestAssociationMapping = exports.RestAssociationMapping = Montage.create(AssociationMapping, /** @lends module:montage/data/rest-access/rest-mapping.RestAssociationMapping# */ { | ||
58 | |||
59 | |||
60 | }); | ||
61 | |||
diff --git a/node_modules/montage/data/rest-access/rest-object-id.js b/node_modules/montage/data/rest-access/rest-object-id.js new file mode 100755 index 00000000..7398ed6a --- /dev/null +++ b/node_modules/montage/data/rest-access/rest-object-id.js | |||
@@ -0,0 +1,21 @@ | |||
1 | /* <copyright> | ||
2 | This file contains proprietary software owned by Motorola Mobility, Inc.<br/> | ||
3 | No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/> | ||
4 | (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. | ||
5 | </copyright> */ | ||
6 | /** | ||
7 | @module montage/data/rest-object-id | ||
8 | @requires montage/data/object-id | ||
9 | @requires montage/core/logger | ||
10 | */ | ||
11 | var Montage = require("montage").Montage; | ||
12 | var ObjectId = require("data/object-id").ObjectId; | ||
13 | var logger = require("core/logger").logger("rest-object-id"); | ||
14 | /** | ||
15 | @class module:montage/data/rest-access/rest-object-id.RestObjectId | ||
16 | @extends module:montage/data/-object-id.ObjectId | ||
17 | */ | ||
18 | var RestObjectId = exports.RestObjectId = Montage.create(ObjectId,/** @lends module:montage/data/rest-access/rest-object-id.RestObjectId# */ { | ||
19 | |||
20 | |||
21 | }); | ||
diff --git a/node_modules/montage/data/rest-access/rest-selector-semantics.js b/node_modules/montage/data/rest-access/rest-selector-semantics.js new file mode 100644 index 00000000..018448f1 --- /dev/null +++ b/node_modules/montage/data/rest-access/rest-selector-semantics.js | |||
@@ -0,0 +1,5 @@ | |||
1 | /* <copyright> | ||
2 | This file contains proprietary software owned by Motorola Mobility, Inc.<br/> | ||
3 | No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/> | ||
4 | (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. | ||
5 | </copyright> */ | ||
diff --git a/node_modules/montage/data/rest-access/rest-store.js b/node_modules/montage/data/rest-access/rest-store.js new file mode 100755 index 00000000..28dbd650 --- /dev/null +++ b/node_modules/montage/data/rest-access/rest-store.js | |||
@@ -0,0 +1,221 @@ | |||
1 | /* <copyright> | ||
2 | This file contains proprietary software owned by Motorola Mobility, Inc.<br/> | ||
3 | No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/> | ||
4 | (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. | ||
5 | </copyright> */ | ||
6 | /** | ||
7 | @module montage/data/rest-access/rest-store | ||
8 | @requires montage/core/core | ||
9 | @requires montage/data/store | ||
10 | @requires montage/core/logger | ||
11 | @requires montage/core/promise | ||
12 | @requires data/rest-access/rest-mapping | ||
13 | */ | ||
14 | var Montage = require("montage").Montage; | ||
15 | var Store = require("data/store").Store; | ||
16 | var Promise = require("core/promise").Promise; | ||
17 | var RestBinderMapping = require("data/rest-access/rest-mapping").RestBinderMapping; | ||
18 | var RestBlueprintMapping = require("data/rest-access/rest-mapping").RestBlueprintMapping; | ||
19 | var RestAttributeMapping = require("data/rest-access/rest-mapping").RestAttributeMapping; | ||
20 | var RestAssociationMapping = require("data/rest-access/rest-mapping").RestAssociationMapping; | ||
21 | |||
22 | var logger = require("core/logger").logger("rest-store"); | ||
23 | |||
24 | /** | ||
25 | @class module:montage/data/rest-access/rest-store.RestStore | ||
26 | @extends module:montage/data/store.Store | ||
27 | */ | ||
28 | var RestStore = exports.RestStore = Montage.create(Store, /** @lends module:montage/data/rest-access/rest-store.RestStore# */ { | ||
29 | |||
30 | /** | ||
31 | Create a new binder mapping. | ||
32 | @function | ||
33 | @returns binder mapping | ||
34 | */ | ||
35 | createBinderMapping:{ | ||
36 | get:function () { | ||
37 | return RestBinderMapping.create(); | ||
38 | } | ||
39 | }, | ||
40 | |||
41 | /** | ||
42 | Create a new blueprint mapping. | ||
43 | @function | ||
44 | @returns blueprint mapping | ||
45 | */ | ||
46 | createBlueprintMapping:{ | ||
47 | get:function () { | ||
48 | return RestBlueprintMapping.create(); | ||
49 | } | ||
50 | }, | ||
51 | |||
52 | /** | ||
53 | Create a new attribute mapping. | ||
54 | @function | ||
55 | @returns attribute mapping | ||
56 | */ | ||
57 | createAttributeMapping:{ | ||
58 | get:function () { | ||
59 | return RestAttributeMapping.create(); | ||
60 | } | ||
61 | }, | ||
62 | |||
63 | /** | ||
64 | Create a new association mapping. | ||
65 | @function | ||
66 | @returns association mapping | ||
67 | */ | ||
68 | createAssociationMapping:{ | ||
69 | get:function () { | ||
70 | return RestAssociationMapping.create(); | ||
71 | } | ||
72 | }, | ||
73 | |||
74 | /** | ||
75 | Description TODO | ||
76 | @function | ||
77 | @param {Object} object TODO | ||
78 | @param {Property} context TODO | ||
79 | @param {Property} transactionId TODO | ||
80 | @returns {Function} Promise.ref(object.objectId) or Promise.ref(null) | ||
81 | */ | ||
82 | permanentIdForObjectId$Implementation:{ | ||
83 | value:function (object, context, transactionId) { | ||
84 | // TODO [PJYF Apr 28 2011] We need to implement it. | ||
85 | if (typeof object.objectId !== "undefined") { | ||
86 | return Promise.ref(object.objectId); | ||
87 | } | ||
88 | return Promise.ref(null); | ||
89 | } | ||
90 | }, | ||
91 | |||
92 | /** | ||
93 | Description TODO | ||
94 | @function | ||
95 | @param {Object} objectId TODO | ||
96 | @param {Property} context TODO | ||
97 | @param {Property} transactionId TODO | ||
98 | @returns {Function} Promise.ref(null) | ||
99 | */ | ||
100 | pledgeForObjectId$Implementation:{ | ||
101 | value:function (objectId, context, transactionId) { | ||
102 | // TODO [PJYF Apr 28 2011] We need to implement it. | ||
103 | return Promise.ref(null); | ||
104 | } | ||
105 | }, | ||
106 | |||
107 | /** | ||
108 | Description TODO | ||
109 | @function | ||
110 | @param {Object} sourceObject TODO | ||
111 | @param {Property} relationship TODO | ||
112 | @param {Property} context TODO | ||
113 | @param {Property} transactionId TODO | ||
114 | @returns {Function} Promise.ref(null) | ||
115 | */ | ||
116 | pledgeForSourceObjectAssociation$Implementation:{ | ||