You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by "Changshin Lee (JIRA)" <ji...@apache.org> on 2008/03/18 10:41:24 UTC
[jira] Updated: (SHINDIG-137) Enable GadgetDataServlet to be
configured with GadgetDataHandlers init param.
[ https://issues.apache.org/jira/browse/SHINDIG-137?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Changshin Lee updated SHINDIG-137:
----------------------------------
Attachment: improve-data-servlet.patch
This patch is the code described above.
> Enable GadgetDataServlet to be configured with GadgetDataHandlers init param.
> ------------------------------------------------------------------------------
>
> Key: SHINDIG-137
> URL: https://issues.apache.org/jira/browse/SHINDIG-137
> Project: Shindig
> Issue Type: Improvement
> Components: Gadgets Server - Java
> Reporter: Changshin Lee
> Attachments: improve-data-servlet.patch
>
>
> Adding
> @Override
> public void init(ServletConfig config) throws ServletException {
> super.init(config);
> String handlerNames = config.getInitParameter("handlers");
> if (handlerNames == null) {
> handlers.add(new OpenSocialDataHandler());
> handlers.add(new StateFileDataHandler());
> } else {
> for (String handlerName : handlerNames.split(",")) {
> try {
> GadgetDataHandler handler = (GadgetDataHandler) (Class.forName(handlerName)).newInstance();
> handlers.add(handler);
> } catch (Exception ex) {
> throw new ServletException(ex);
> }
> }
> }
> }
> to GadgetDataServlet enables you to configure GadgetDataHandlers with a web.xml init parameter like the following:
> <!-- Serve social data -->
> <servlet>
> <servlet-name>socialdata</servlet-name>
> <servlet-class>org.apache.shindig.social.GadgetDataServlet</servlet-class>
> <init-param>
> <param-name>handlers</param-name>
> <param-value>agt.OpenSocialDataHandler</param-value>
> </init-param>
> </servlet>
> This improvement is the bottom line for letting your own Shindig instance have a different way of data handling.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.