[ 
https://issues.apache.org/jira/browse/SHINDIG-574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12633270#action_12633270
 ] 

Robert Bissett commented on SHINDIG-574:
----------------------------------------

Thanks for the explanation. I see now why there's a difference in the behavior 
between the two objects at least.

I still have a minor issue with the wording in the docs of person.js (but now 
at least I know jsonperson isn't wrong). If someone is writing a gadget that 
relies on the Person objects returned from some request, s/he may not know 
whether the container is implementing the new APIs yet or whether it supports 
rpc/rest/both. All that is known is that a person object is returned, since 
that's what's in the API (no JsonPerson in "OpenSocial API Reference (v0.8)"). 
However, given the way things are implemented now, in some containers this 
object will calculate a display name and in some containers it will return the 
displayName value from the back end, which may or may not exist (*). Therefore, 
the blanket "guaranteed to return a useful string" text is a little misleading 
without maybe some qualifying text.

If that makes sense, let me know and I can file an RFE. I see that this could 
go away in the 0.9 spec though, so it may not be worth the time. I'm just a 
stickler for API compliance, so if a JsonPerson "is" a Person, then it should 
do what Person says it does :)

(*) In the case of our container, we were relying on the behavior or 
person.getDisplayName. It's easy to work around though.

Cheers


> The restful/rpc apis should be producing a displayName field on the person 
> object. 
> -----------------------------------------------------------------------------------
>
>                 Key: SHINDIG-574
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-574
>             Project: Shindig
>          Issue Type: Bug
>          Components: RESTful API (Java)
>            Reporter: Cassie Doll
>            Assignee: Cassie Doll
>            Priority: Blocker
>
> This should be a pretty easy change. 
> - a String displayName field needs to be added to Person
> - the JsonDbContainer should fill it out
> - the javascript person.js should be changed to not implement getDisplayName
> - jsonperson.js should be changed to retrieve the displayName from the json 
> from the server that it is constructed with

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

Reply via email to