aboutsummaryrefslogtreecommitdiff
path: root/node_modules/montage/data/rest-access
diff options
context:
space:
mode:
authorJose Antonio Marquez2012-06-20 16:48:34 -0700
committerJose Antonio Marquez2012-06-20 16:48:34 -0700
commit4eff115126ab946c5852d787fd596e07b156c9a5 (patch)
treef7d45b260f2fb5ba5dc4d1879076ca032d5ae2e6 /node_modules/montage/data/rest-access
parent7615da5c6ba54bd082eac4b8a6d9196084e5c590 (diff)
parent392a559e90357d48c910a07617261483b2b45476 (diff)
downloadninja-4eff115126ab946c5852d787fd596e07b156c9a5.tar.gz
Merge branch 'refs/heads/Ninja-Internal' into Color
Diffstat (limited to 'node_modules/montage/data/rest-access')
-rw-r--r--node_modules/montage/data/rest-access/rest-mapping.js61
-rwxr-xr-xnode_modules/montage/data/rest-access/rest-object-id.js21
-rw-r--r--node_modules/montage/data/rest-access/rest-selector-semantics.js5
-rwxr-xr-xnode_modules/montage/data/rest-access/rest-store.js221
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 */
12var Montage = require("montage").Montage;
13var BinderMapping = require("data/mapping").BinderMapping;
14var BlueprintMapping = require("data/mapping").BlueprintMapping;
15var AttributeMapping = require("data/mapping").AttributeMapping;
16var AssociationMapping = require("data/mapping").AssociationMapping;
17var 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 */
24var 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 */
35var 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 */
46var 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 */
57var 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>
2This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
3No 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*/
11var Montage = require("montage").Montage;
12var ObjectId = require("data/object-id").ObjectId;
13var 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*/
18var 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 */
14var Montage = require("montage").Montage;
15var Store = require("data/store").Store;
16var Promise = require("core/promise").Promise;
17var RestBinderMapping = require("data/rest-access/rest-mapping").RestBinderMapping;
18var RestBlueprintMapping = require("data/rest-access/rest-mapping").RestBlueprintMapping;
19var RestAttributeMapping = require("data/rest-access/rest-mapping").RestAttributeMapping;
20var RestAssociationMapping = require("data/rest-access/rest-mapping").RestAssociationMapping;
21
22var 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 */
28var 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:{