Details
-
New Feature
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
Description
Currently, there's no way to get the gadget meta data without implementing a full container that uses the core java libraries directly. To rectify this situation, we should introduce a JsonRpcServlet class that will take requests in the form:
var request = {
"requestContext":
,
"gadgets": [ // index should be module id based
{"specUrl": "url-of-gadget-spec.xml", "userPrefs": {"up_name":"up_value"}},
...more gadgets...
]
};
and responds with:
var response = {
"libs": ["setprefs", "analytics"],
"gadgets": [ // guaranteed to be the same order as inputs.
{"specUrl":"same-as-input",
"prefSpec": {"up_name":{"display":"Localized, user-friendly name for the pref", "type:"string", "default":"", "value":"same-as-input, or default"}},
"contentType":"url, iframe, or caja",
"content":"iframe url, url for type=url gadgets, or cajoled content",
"token":"gadget token, produced by a GadgetSigner implementation",
},
...more gadgets...
]
};
This RPC mechanism should be designed in such a way that it can easily be used as a reference mechanism for anyone that wants to build an rpc system using shindig using alternative rpc mechanisms (SOAP, XML-RPC, various proprietary solutions).