You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by "Chris Chabot (JIRA)" <ji...@apache.org> on 2008/08/26 18:12:44 UTC

[jira] Created: (SHINDIG-543) Get supportedFields through the RESTful API

Get supportedFields through the RESTful API
-------------------------------------------

                 Key: SHINDIG-543
                 URL: https://issues.apache.org/jira/browse/SHINDIG-543
             Project: Shindig
          Issue Type: New Feature
          Components: RESTful API (PHP)
            Reporter: Chris Chabot
            Priority: Critical


See http://groups.google.com/group/opensocial-and-gadgets-spec/browse_thread/thread/2ce4adb503576439?hl=en


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-543) Get supportedFields through the RESTful API

Posted by "Ram Sharma (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-543?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12626556#action_12626556 ] 

Ram Sharma commented on SHINDIG-543:
------------------------------------

Hi Chris,

I would like to work on this issue but don't know from where I can fetch all the supported fields by the container. As per I know there is something in config/container.js regarding supported fields. Do we have to retrieve supported fields from there or may be from some other place.

> Get supportedFields through the RESTful API
> -------------------------------------------
>
>                 Key: SHINDIG-543
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-543
>             Project: Shindig
>          Issue Type: New Feature
>          Components: RESTful API (PHP)
>            Reporter: Chris Chabot
>            Priority: Critical
>
> See http://groups.google.com/group/opensocial-and-gadgets-spec/browse_thread/thread/2ce4adb503576439?hl=en

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SHINDIG-543) Get supportedFields through the RESTful API

Posted by "impetus technologies (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-543?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

impetus technologies updated SHINDIG-543:
-----------------------------------------

    Attachment: DataRequestHandler.php.patch

> Get supportedFields through the RESTful API
> -------------------------------------------
>
>                 Key: SHINDIG-543
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-543
>             Project: Shindig
>          Issue Type: New Feature
>          Components: RESTful API (PHP)
>            Reporter: Chris Chabot
>            Priority: Critical
>         Attachments: DataRequestHandler.php.patch
>
>
> See http://groups.google.com/group/opensocial-and-gadgets-spec/browse_thread/thread/2ce4adb503576439?hl=en

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-543) Get supportedFields through the RESTful API

Posted by "Ram Sharma (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-543?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12626847#action_12626847 ] 

Ram Sharma commented on SHINDIG-543:
------------------------------------

Hi Chris/Cassie,

What should I do now. Should I go with the container.js (or <foo>.js) with ContainerConfig.php or just to seat back and watch what happens with the container.js :)

> Get supportedFields through the RESTful API
> -------------------------------------------
>
>                 Key: SHINDIG-543
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-543
>             Project: Shindig
>          Issue Type: New Feature
>          Components: RESTful API (PHP)
>            Reporter: Chris Chabot
>            Priority: Critical
>
> See http://groups.google.com/group/opensocial-and-gadgets-spec/browse_thread/thread/2ce4adb503576439?hl=en

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (SHINDIG-543) Get supportedFields through the RESTful API

Posted by "Chris Chabot (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-543?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris Chabot resolved SHINDIG-543.
----------------------------------

    Resolution: Fixed
      Assignee: Chris Chabot

My apologies for the slight delay in getting to this, was out of town for a week.

There were 2 small issues with the patch, one was the missing {}'s in the first if / else statement (this leads to subtle bugs down the road), and also there was no error checking for if no opensocial-foo.bar key was found, so i changed that too:

	if (!count($version)) {
		throw new Exception("Invalid container configuration, opensocial-x.y key not found");
	}
	rsort($version);
	return $version[0];

After making those 2 small modifications, the patch is great! Another item of our todo list done, thanks for the great work!

> Get supportedFields through the RESTful API
> -------------------------------------------
>
>                 Key: SHINDIG-543
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-543
>             Project: Shindig
>          Issue Type: New Feature
>          Components: RESTful API (PHP)
>            Reporter: Chris Chabot
>            Assignee: Chris Chabot
>            Priority: Critical
>         Attachments: DataRequestHandler.php.patch
>
>
> See http://groups.google.com/group/opensocial-and-gadgets-spec/browse_thread/thread/2ce4adb503576439?hl=en

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (SHINDIG-543) Get supportedFields through the RESTful API

Posted by "impetus technologies (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-543?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12627427#action_12627427 ] 

impetus edited comment on SHINDIG-543 at 9/1/08 6:28 AM:
----------------------------------------------------------------------

Hi Chirs,

as per my understanding i have tried to implement getSupportedfields feature as you mentioned. On my side it is working fine. Please review the patch.

- Ram Sharma


      was (Author: impetus):
    Hi Chirs,

as per my understanding i have tried to implement getSupportedfields feature as you mentioned. On my side it is working fine. Please review the patch.


  
> Get supportedFields through the RESTful API
> -------------------------------------------
>
>                 Key: SHINDIG-543
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-543
>             Project: Shindig
>          Issue Type: New Feature
>          Components: RESTful API (PHP)
>            Reporter: Chris Chabot
>            Priority: Critical
>         Attachments: DataRequestHandler.php.patch
>
>
> See http://groups.google.com/group/opensocial-and-gadgets-spec/browse_thread/thread/2ce4adb503576439?hl=en

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-543) Get supportedFields through the RESTful API

Posted by "Cassie Doll (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-543?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12626811#action_12626811 ] 

Cassie Doll commented on SHINDIG-543:
-------------------------------------

Chris - I was actually  hoping to remove that configuration. 

Instead, I was thinking that the js would be changed to get the information from the restful apis. So the container.js wouldn't be the right place to put the supportedFields anymore. In java I was thinking that we would make some interface (like usual) that we would ask for supportedFields or we could get it from some guice injection. Whatever it is - it would be server language specific. 

Were you thinking the php would use the container.js long term? Or what do you think about removing it?
Thanks!

 

> Get supportedFields through the RESTful API
> -------------------------------------------
>
>                 Key: SHINDIG-543
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-543
>             Project: Shindig
>          Issue Type: New Feature
>          Components: RESTful API (PHP)
>            Reporter: Chris Chabot
>            Priority: Critical
>
> See http://groups.google.com/group/opensocial-and-gadgets-spec/browse_thread/thread/2ce4adb503576439?hl=en

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SHINDIG-543) Get supportedFields through the RESTful API

Posted by "impetus technologies (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-543?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

impetus technologies updated SHINDIG-543:
-----------------------------------------

    Attachment: DataRequestHandler.php.patch

Hi Chirs,

as per my understanding i have tried to implement getSupportedfields feature as you mentioned. On my side it is working fine. Please review the patch.



> Get supportedFields through the RESTful API
> -------------------------------------------
>
>                 Key: SHINDIG-543
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-543
>             Project: Shindig
>          Issue Type: New Feature
>          Components: RESTful API (PHP)
>            Reporter: Chris Chabot
>            Priority: Critical
>         Attachments: DataRequestHandler.php.patch
>
>
> See http://groups.google.com/group/opensocial-and-gadgets-spec/browse_thread/thread/2ce4adb503576439?hl=en

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SHINDIG-543) Get supportedFields through the RESTful API

Posted by "Ram Sharma (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-543?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ram Sharma updated SHINDIG-543:
-------------------------------

    Attachment: DataRequestHandler.php.patch

Hi Chris,

Here is the updated patch. Please varify this.

Thanks in advance




> Get supportedFields through the RESTful API
> -------------------------------------------
>
>                 Key: SHINDIG-543
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-543
>             Project: Shindig
>          Issue Type: New Feature
>          Components: RESTful API (PHP)
>            Reporter: Chris Chabot
>            Priority: Critical
>         Attachments: DataRequestHandler.php.patch, DataRequestHandler.php.patch
>
>
> See http://groups.google.com/group/opensocial-and-gadgets-spec/browse_thread/thread/2ce4adb503576439?hl=en

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-543) Get supportedFields through the RESTful API

Posted by "Chris Chabot (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-543?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12626789#action_12626789 ] 

Chris Chabot commented on SHINDIG-543:
--------------------------------------

Hey Ram, Indeed the shindig/config/container.js (or the <foo>.js that matches the ?container=<foo> flag of the request, if any, see src/gadgets/ContainerConfig.php as reference, would be nice if you could just use that class instead of duplicating code) is the right place to extract the information, because having 2 places to define the supported fields would only be much more confusing.

Another thing to keep in mind is preventing hard coding for the root key to look for, right now it's "opensocial-0.8", but in a couple of months that might be 0.9 already :) So it's probably best to walk through the keys, match it against opensocial-<foo>, and use it's supportedFields entry.

Hope that's of some help, if not please let me know! :)



> Get supportedFields through the RESTful API
> -------------------------------------------
>
>                 Key: SHINDIG-543
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-543
>             Project: Shindig
>          Issue Type: New Feature
>          Components: RESTful API (PHP)
>            Reporter: Chris Chabot
>            Priority: Critical
>
> See http://groups.google.com/group/opensocial-and-gadgets-spec/browse_thread/thread/2ce4adb503576439?hl=en

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-543) Get supportedFields through the RESTful API

Posted by "Ram Sharma (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-543?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12626963#action_12626963 ] 

Ram Sharma commented on SHINDIG-543:
------------------------------------

Hi Chris,

I have some doubts regarding  implementation of this fix: 

This is about the activitieshandler.php file.

Ideally , the Rest supportfield request,  http://shindig/socil/rest/activities/@supportedfields should go to ActivitiesHandler->handleGet()  (assuming I understand the flow correctlyJ)

 If yes then  the handleGet Method directly calls ActivitiesService->getActivities() method. 

So to implement the call to getsupportedFields, I have following two options:

 1. Changes should be made in the existing handleGet Method in the ActivitiesHandler file , based on the request parameters.

2.  Or some new interface file should be made for the same which directs the request to different handlers depending upon the request is for supported fields or Activity ID?

I guess your answer for activities/supportedfields, will be applicable for people/supportedfields as well.



> Get supportedFields through the RESTful API
> -------------------------------------------
>
>                 Key: SHINDIG-543
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-543
>             Project: Shindig
>          Issue Type: New Feature
>          Components: RESTful API (PHP)
>            Reporter: Chris Chabot
>            Priority: Critical
>
> See http://groups.google.com/group/opensocial-and-gadgets-spec/browse_thread/thread/2ce4adb503576439?hl=en

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-543) Get supportedFields through the RESTful API

Posted by "Chris Chabot (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-543?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12627086#action_12627086 ] 

Chris Chabot commented on SHINDIG-543:
--------------------------------------

Actually i guess the best place to put this is in the base class the dispatches the handler events: DataRequestHandler::handleMethod().

If method == get, and the request is for @supportedfields, it could call a $this->getSupportedFields instead of the handler code, using the url to see of which type the info is required then ofc



> Get supportedFields through the RESTful API
> -------------------------------------------
>
>                 Key: SHINDIG-543
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-543
>             Project: Shindig
>          Issue Type: New Feature
>          Components: RESTful API (PHP)
>            Reporter: Chris Chabot
>            Priority: Critical
>
> See http://groups.google.com/group/opensocial-and-gadgets-spec/browse_thread/thread/2ce4adb503576439?hl=en

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SHINDIG-543) Get supportedFields through the RESTful API

Posted by "impetus technologies (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-543?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

impetus technologies updated SHINDIG-543:
-----------------------------------------

    Attachment:     (was: DataRequestHandler.php.patch)

> Get supportedFields through the RESTful API
> -------------------------------------------
>
>                 Key: SHINDIG-543
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-543
>             Project: Shindig
>          Issue Type: New Feature
>          Components: RESTful API (PHP)
>            Reporter: Chris Chabot
>            Priority: Critical
>         Attachments: DataRequestHandler.php.patch
>
>
> See http://groups.google.com/group/opensocial-and-gadgets-spec/browse_thread/thread/2ce4adb503576439?hl=en

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-543) Get supportedFields through the RESTful API

Posted by "Chris Chabot (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-543?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12626908#action_12626908 ] 

Chris Chabot commented on SHINDIG-543:
--------------------------------------

I'd say implement it using ContainerConfig.php (which uses the container.js/foo.js files), and either the change will be transparent; Or we'll only have to replace the tiny bit of code that reads the configuration ... the REST facing code & logic will remain the same either way, so no need to block on it :)

Cassie: I'll get back to you on that once i had a chance to mul it over for a moment 



> Get supportedFields through the RESTful API
> -------------------------------------------
>
>                 Key: SHINDIG-543
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-543
>             Project: Shindig
>          Issue Type: New Feature
>          Components: RESTful API (PHP)
>            Reporter: Chris Chabot
>            Priority: Critical
>
> See http://groups.google.com/group/opensocial-and-gadgets-spec/browse_thread/thread/2ce4adb503576439?hl=en

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-543) Get supportedFields through the RESTful API

Posted by "Chris Chabot (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-543?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12627991#action_12627991 ] 

Chris Chabot commented on SHINDIG-543:
--------------------------------------

Hi Ram,

I'm missing one thing in that patch, and that is the detection of the opensocial-X.Y version to use as discussed in an earlier comment, right now the patch lists:

$supportedFields = $config['opensocial-0.8']['supportedFields'];

Instead it should loop through the $config keys, match it against "opensocial-" and then pick the highest one (in case multiple opensocial-* entries are ever encountered).

Oh and you have an IF statement without {}'s, which is just asking for bugs in the long term :)

If you could please correct those 2 issues, i'll apply it asap; Thanks!

> Get supportedFields through the RESTful API
> -------------------------------------------
>
>                 Key: SHINDIG-543
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-543
>             Project: Shindig
>          Issue Type: New Feature
>          Components: RESTful API (PHP)
>            Reporter: Chris Chabot
>            Priority: Critical
>         Attachments: DataRequestHandler.php.patch
>
>
> See http://groups.google.com/group/opensocial-and-gadgets-spec/browse_thread/thread/2ce4adb503576439?hl=en

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-543) Get supportedFields through the RESTful API

Posted by "Ram Sharma (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-543?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12628549#action_12628549 ] 

Ram Sharma commented on SHINDIG-543:
------------------------------------

Hi Chris,

Any updates on this ?

> Get supportedFields through the RESTful API
> -------------------------------------------
>
>                 Key: SHINDIG-543
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-543
>             Project: Shindig
>          Issue Type: New Feature
>          Components: RESTful API (PHP)
>            Reporter: Chris Chabot
>            Priority: Critical
>         Attachments: DataRequestHandler.php.patch
>
>
> See http://groups.google.com/group/opensocial-and-gadgets-spec/browse_thread/thread/2ce4adb503576439?hl=en

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SHINDIG-543) Get supportedFields through the RESTful API

Posted by "impetus technologies (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-543?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

impetus technologies updated SHINDIG-543:
-----------------------------------------

    Attachment: OutputAtomConverter.php.patch

OutputAtomConverter.php expects some userId to be used as author however in supportedFields the same was not applicable . Hence the call to supportedFields, particularly for  format= atom fails. Patch is attached. Pls verify.

> Get supportedFields through the RESTful API
> -------------------------------------------
>
>                 Key: SHINDIG-543
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-543
>             Project: Shindig
>          Issue Type: New Feature
>          Components: RESTful API (PHP)
>            Reporter: Chris Chabot
>            Assignee: Chris Chabot
>            Priority: Critical
>         Attachments: DataRequestHandler.php.patch, OutputAtomConverter.php.patch
>
>
> See http://groups.google.com/group/opensocial-and-gadgets-spec/browse_thread/thread/2ce4adb503576439?hl=en

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SHINDIG-543) Get supportedFields through the RESTful API

Posted by "impetus technologies (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-543?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

impetus technologies updated SHINDIG-543:
-----------------------------------------

    Attachment:     (was: DataRequestHandler.php.patch)

> Get supportedFields through the RESTful API
> -------------------------------------------
>
>                 Key: SHINDIG-543
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-543
>             Project: Shindig
>          Issue Type: New Feature
>          Components: RESTful API (PHP)
>            Reporter: Chris Chabot
>            Priority: Critical
>         Attachments: DataRequestHandler.php.patch
>
>
> See http://groups.google.com/group/opensocial-and-gadgets-spec/browse_thread/thread/2ce4adb503576439?hl=en

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.