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

[jira] Created: (SHINDIG-629) partial client-side code for Message support

partial client-side code for Message support
--------------------------------------------

                 Key: SHINDIG-629
                 URL: https://issues.apache.org/jira/browse/SHINDIG-629
             Project: Shindig
          Issue Type: New Feature
          Components: OpenSocial  feature (Javascript)
         Environment: All
            Reporter: Robert Bissett
         Attachments: diff.out

Am filing issue to submit some JavaScript code to go along with initial support for Message posting. See http://codereview.appspot.com/5702 for related work.

>From shindig-dev@incubator.apache.org, the discussion thread starts here: http://tinyurl.com/4h9mlw
Description of files to attach: 

I've attached my simple jsonmessage.js file (mostly it just adds a  
toJsonObject method) and related diffs. With these changes, I create a  
message in the gadget with:

   var req = opensocial.newDataRequest();
   var message = opensocial.newMessage(msg);
   message.setField(opensocial.Message.Field.TYPE,
     opensocial.Message.Type.PRIVATE_MESSAGE);
   message.setField(opensocial.Message.Field.TITLE, subject);

   // not part of api, but in RPC proposal
   var recipients = [ tempToId ];
   message.setField("recipients", recipients);

and create a JsonRpcRequestItem with a param:

     rpc.params.message = message.toJsonObject();

On the server side, I can get the Message object (almost) in my  
MessageHandler with:

         Message incomingMessage =
             reqitem.getTypedParameter("message", Message.class);

...except that I'm running into an error in the bean json converter  
due to the list of recipients I've added (following the proposal to  
add recipients in an array in the message request).

Here's a description of the diffs.

jsonrpccontainer.js
- Added newMessage() function in order to return the new jsonmessage  
object.

feature.xml
- Added jsonmessage.js file so that it's loaded.

message.js
- Changed the text of the Type fields to match Message.java on the  
server, otherwise the json could not be converted to a pojo.

org.apache.shindig.social.opensocial.model.Message
- This is a minor change, but it's an API change so it's a bigger  
deal. To match the rest/rpc proposal, I added a list of recipients to  
the class so that they can be pulled out in the message handler. I see  
that's a todo in your handler; the recipients could be another param  
in the post body, but I don't think that works well in the rest case  
without clashing with the messaging URI template.

org.apache.shindig.social.core.model.MessageImpl
- Added List<String> of recipients to match interface. Just made the  
minimum change to compile.

I hope some of this is helpful. That list of recipients is giving me  
some grief in the converter, so I'll have to go with my workarounds  
for now (e.g. treating the incoming messages as a simple JSONObject)  
and can help more with this after you have a chance to look it over.  
One other issue is that, when returning a message to the client, there  
needs to be some way to include the sender information. Another field  
could be added to Message, or this could be handled in an impl- 
specific way.

Let me know please if you have any questions or would like me to try  
something else. You can see the server-side code as I commit it here  
(I hope to wrap up message support today, though with some workarounds):

https://socialsite.dev.java.net/source/browse/socialsite/trunk/src/java/com/sun/socialsite/web/rest/core/

Cheers,
Bobby


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


[jira] Commented: (SHINDIG-629) partial client-side code for Message support

Posted by "Paul Lindner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-629?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12645851#action_12645851 ] 

Paul Lindner commented on SHINDIG-629:
--------------------------------------

Starting discussion here:

http://groups.google.com/group/opensocial-and-gadgets-spec/browse_thread/thread/1a3b4864b88fc89c?hl=en#


> partial client-side code for Message support
> --------------------------------------------
>
>                 Key: SHINDIG-629
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-629
>             Project: Shindig
>          Issue Type: New Feature
>          Components: OpenSocial  feature (Javascript)
>         Environment: All
>            Reporter: Robert Bissett
>         Attachments: fix-629-bug.patch, jsonmessage.js, rebased-jsonMessage.patch
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> Am filing issue to submit some JavaScript code to go along with initial support for Message posting. See http://codereview.appspot.com/5702 for related work.
> From shindig-dev@incubator.apache.org, the discussion thread starts here: http://tinyurl.com/4h9mlw
> Description of files to attach: 
> I've attached my simple jsonmessage.js file (mostly it just adds a  
> toJsonObject method) and related diffs. With these changes, I create a  
> message in the gadget with:
>    var req = opensocial.newDataRequest();
>    var message = opensocial.newMessage(msg);
>    message.setField(opensocial.Message.Field.TYPE,
>      opensocial.Message.Type.PRIVATE_MESSAGE);
>    message.setField(opensocial.Message.Field.TITLE, subject);
>    // not part of api, but in RPC proposal
>    var recipients = [ tempToId ];
>    message.setField("recipients", recipients);
> and create a JsonRpcRequestItem with a param:
>      rpc.params.message = message.toJsonObject();
> On the server side, I can get the Message object (almost) in my  
> MessageHandler with:
>          Message incomingMessage =
>              reqitem.getTypedParameter("message", Message.class);
> ...except that I'm running into an error in the bean json converter  
> due to the list of recipients I've added (following the proposal to  
> add recipients in an array in the message request).
> Here's a description of the diffs.
> jsonrpccontainer.js
> - Added newMessage() function in order to return the new jsonmessage  
> object.
> feature.xml
> - Added jsonmessage.js file so that it's loaded.
> message.js
> - Changed the text of the Type fields to match Message.java on the  
> server, otherwise the json could not be converted to a pojo.
> org.apache.shindig.social.opensocial.model.Message
> - This is a minor change, but it's an API change so it's a bigger  
> deal. To match the rest/rpc proposal, I added a list of recipients to  
> the class so that they can be pulled out in the message handler. I see  
> that's a todo in your handler; the recipients could be another param  
> in the post body, but I don't think that works well in the rest case  
> without clashing with the messaging URI template.
> org.apache.shindig.social.core.model.MessageImpl
> - Added List<String> of recipients to match interface. Just made the  
> minimum change to compile.
> I hope some of this is helpful. That list of recipients is giving me  
> some grief in the converter, so I'll have to go with my workarounds  
> for now (e.g. treating the incoming messages as a simple JSONObject)  
> and can help more with this after you have a chance to look it over.  
> One other issue is that, when returning a message to the client, there  
> needs to be some way to include the sender information. Another field  
> could be added to Message, or this could be handled in an impl- 
> specific way.
> Let me know please if you have any questions or would like me to try  
> something else. You can see the server-side code as I commit it here  
> (I hope to wrap up message support today, though with some workarounds):
> https://socialsite.dev.java.net/source/browse/socialsite/trunk/src/java/com/sun/socialsite/web/rest/core/
> Cheers,
> Bobby

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


[jira] Updated: (SHINDIG-629) partial client-side code for Message support

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

Robert Bissett updated SHINDIG-629:
-----------------------------------

    Attachment: diff.out

Svn diff file of changes to use jsonmessage.js.


> partial client-side code for Message support
> --------------------------------------------
>
>                 Key: SHINDIG-629
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-629
>             Project: Shindig
>          Issue Type: New Feature
>          Components: OpenSocial  feature (Javascript)
>         Environment: All
>            Reporter: Robert Bissett
>         Attachments: diff.out
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> Am filing issue to submit some JavaScript code to go along with initial support for Message posting. See http://codereview.appspot.com/5702 for related work.
> From shindig-dev@incubator.apache.org, the discussion thread starts here: http://tinyurl.com/4h9mlw
> Description of files to attach: 
> I've attached my simple jsonmessage.js file (mostly it just adds a  
> toJsonObject method) and related diffs. With these changes, I create a  
> message in the gadget with:
>    var req = opensocial.newDataRequest();
>    var message = opensocial.newMessage(msg);
>    message.setField(opensocial.Message.Field.TYPE,
>      opensocial.Message.Type.PRIVATE_MESSAGE);
>    message.setField(opensocial.Message.Field.TITLE, subject);
>    // not part of api, but in RPC proposal
>    var recipients = [ tempToId ];
>    message.setField("recipients", recipients);
> and create a JsonRpcRequestItem with a param:
>      rpc.params.message = message.toJsonObject();
> On the server side, I can get the Message object (almost) in my  
> MessageHandler with:
>          Message incomingMessage =
>              reqitem.getTypedParameter("message", Message.class);
> ...except that I'm running into an error in the bean json converter  
> due to the list of recipients I've added (following the proposal to  
> add recipients in an array in the message request).
> Here's a description of the diffs.
> jsonrpccontainer.js
> - Added newMessage() function in order to return the new jsonmessage  
> object.
> feature.xml
> - Added jsonmessage.js file so that it's loaded.
> message.js
> - Changed the text of the Type fields to match Message.java on the  
> server, otherwise the json could not be converted to a pojo.
> org.apache.shindig.social.opensocial.model.Message
> - This is a minor change, but it's an API change so it's a bigger  
> deal. To match the rest/rpc proposal, I added a list of recipients to  
> the class so that they can be pulled out in the message handler. I see  
> that's a todo in your handler; the recipients could be another param  
> in the post body, but I don't think that works well in the rest case  
> without clashing with the messaging URI template.
> org.apache.shindig.social.core.model.MessageImpl
> - Added List<String> of recipients to match interface. Just made the  
> minimum change to compile.
> I hope some of this is helpful. That list of recipients is giving me  
> some grief in the converter, so I'll have to go with my workarounds  
> for now (e.g. treating the incoming messages as a simple JSONObject)  
> and can help more with this after you have a chance to look it over.  
> One other issue is that, when returning a message to the client, there  
> needs to be some way to include the sender information. Another field  
> could be added to Message, or this could be handled in an impl- 
> specific way.
> Let me know please if you have any questions or would like me to try  
> something else. You can see the server-side code as I commit it here  
> (I hope to wrap up message support today, though with some workarounds):
> https://socialsite.dev.java.net/source/browse/socialsite/trunk/src/java/com/sun/socialsite/web/rest/core/
> Cheers,
> Bobby

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


[jira] Updated: (SHINDIG-629) partial client-side code for Message support

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

Robert Bissett updated SHINDIG-629:
-----------------------------------

    Attachment:     (was: diff.out)

> partial client-side code for Message support
> --------------------------------------------
>
>                 Key: SHINDIG-629
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-629
>             Project: Shindig
>          Issue Type: New Feature
>          Components: OpenSocial  feature (Javascript)
>         Environment: All
>            Reporter: Robert Bissett
>         Attachments: fix-629-bug.patch, jsonmessage.js
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> Am filing issue to submit some JavaScript code to go along with initial support for Message posting. See http://codereview.appspot.com/5702 for related work.
> From shindig-dev@incubator.apache.org, the discussion thread starts here: http://tinyurl.com/4h9mlw
> Description of files to attach: 
> I've attached my simple jsonmessage.js file (mostly it just adds a  
> toJsonObject method) and related diffs. With these changes, I create a  
> message in the gadget with:
>    var req = opensocial.newDataRequest();
>    var message = opensocial.newMessage(msg);
>    message.setField(opensocial.Message.Field.TYPE,
>      opensocial.Message.Type.PRIVATE_MESSAGE);
>    message.setField(opensocial.Message.Field.TITLE, subject);
>    // not part of api, but in RPC proposal
>    var recipients = [ tempToId ];
>    message.setField("recipients", recipients);
> and create a JsonRpcRequestItem with a param:
>      rpc.params.message = message.toJsonObject();
> On the server side, I can get the Message object (almost) in my  
> MessageHandler with:
>          Message incomingMessage =
>              reqitem.getTypedParameter("message", Message.class);
> ...except that I'm running into an error in the bean json converter  
> due to the list of recipients I've added (following the proposal to  
> add recipients in an array in the message request).
> Here's a description of the diffs.
> jsonrpccontainer.js
> - Added newMessage() function in order to return the new jsonmessage  
> object.
> feature.xml
> - Added jsonmessage.js file so that it's loaded.
> message.js
> - Changed the text of the Type fields to match Message.java on the  
> server, otherwise the json could not be converted to a pojo.
> org.apache.shindig.social.opensocial.model.Message
> - This is a minor change, but it's an API change so it's a bigger  
> deal. To match the rest/rpc proposal, I added a list of recipients to  
> the class so that they can be pulled out in the message handler. I see  
> that's a todo in your handler; the recipients could be another param  
> in the post body, but I don't think that works well in the rest case  
> without clashing with the messaging URI template.
> org.apache.shindig.social.core.model.MessageImpl
> - Added List<String> of recipients to match interface. Just made the  
> minimum change to compile.
> I hope some of this is helpful. That list of recipients is giving me  
> some grief in the converter, so I'll have to go with my workarounds  
> for now (e.g. treating the incoming messages as a simple JSONObject)  
> and can help more with this after you have a chance to look it over.  
> One other issue is that, when returning a message to the client, there  
> needs to be some way to include the sender information. Another field  
> could be added to Message, or this could be handled in an impl- 
> specific way.
> Let me know please if you have any questions or would like me to try  
> something else. You can see the server-side code as I commit it here  
> (I hope to wrap up message support today, though with some workarounds):
> https://socialsite.dev.java.net/source/browse/socialsite/trunk/src/java/com/sun/socialsite/web/rest/core/
> Cheers,
> Bobby

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


[jira] Commented: (SHINDIG-629) partial client-side code for Message support

Posted by "Robert Bissett (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-629?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12678487#action_12678487 ] 

Robert Bissett commented on SHINDIG-629:
----------------------------------------


Good to hear -- thanks!

Cheers,
Bobby




> partial client-side code for Message support
> --------------------------------------------
>
>                 Key: SHINDIG-629
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-629
>             Project: Shindig
>          Issue Type: New Feature
>          Components: Javascript 
>         Environment: All
>            Reporter: Robert Bissett
>             Fix For: trunk
>
>         Attachments: fix-629-bug.patch, jsonmessage.js, rebased-jsonMessage.patch
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> Am filing issue to submit some JavaScript code to go along with initial support for Message posting. See http://codereview.appspot.com/5702 for related work.
> From shindig-dev@incubator.apache.org, the discussion thread starts here: http://tinyurl.com/4h9mlw
> Description of files to attach: 
> I've attached my simple jsonmessage.js file (mostly it just adds a  
> toJsonObject method) and related diffs. With these changes, I create a  
> message in the gadget with:
>    var req = opensocial.newDataRequest();
>    var message = opensocial.newMessage(msg);
>    message.setField(opensocial.Message.Field.TYPE,
>      opensocial.Message.Type.PRIVATE_MESSAGE);
>    message.setField(opensocial.Message.Field.TITLE, subject);
>    // not part of api, but in RPC proposal
>    var recipients = [ tempToId ];
>    message.setField("recipients", recipients);
> and create a JsonRpcRequestItem with a param:
>      rpc.params.message = message.toJsonObject();
> On the server side, I can get the Message object (almost) in my  
> MessageHandler with:
>          Message incomingMessage =
>              reqitem.getTypedParameter("message", Message.class);
> ...except that I'm running into an error in the bean json converter  
> due to the list of recipients I've added (following the proposal to  
> add recipients in an array in the message request).
> Here's a description of the diffs.
> jsonrpccontainer.js
> - Added newMessage() function in order to return the new jsonmessage  
> object.
> feature.xml
> - Added jsonmessage.js file so that it's loaded.
> message.js
> - Changed the text of the Type fields to match Message.java on the  
> server, otherwise the json could not be converted to a pojo.
> org.apache.shindig.social.opensocial.model.Message
> - This is a minor change, but it's an API change so it's a bigger  
> deal. To match the rest/rpc proposal, I added a list of recipients to  
> the class so that they can be pulled out in the message handler. I see  
> that's a todo in your handler; the recipients could be another param  
> in the post body, but I don't think that works well in the rest case  
> without clashing with the messaging URI template.
> org.apache.shindig.social.core.model.MessageImpl
> - Added List<String> of recipients to match interface. Just made the  
> minimum change to compile.
> I hope some of this is helpful. That list of recipients is giving me  
> some grief in the converter, so I'll have to go with my workarounds  
> for now (e.g. treating the incoming messages as a simple JSONObject)  
> and can help more with this after you have a chance to look it over.  
> One other issue is that, when returning a message to the client, there  
> needs to be some way to include the sender information. Another field  
> could be added to Message, or this could be handled in an impl- 
> specific way.
> Let me know please if you have any questions or would like me to try  
> something else. You can see the server-side code as I commit it here  
> (I hope to wrap up message support today, though with some workarounds):
> https://socialsite.dev.java.net/source/browse/socialsite/trunk/src/java/com/sun/socialsite/web/rest/core/
> Cheers,
> Bobby

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


[jira] Resolved: (SHINDIG-629) partial client-side code for Message support

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

Paul Lindner resolved SHINDIG-629.
----------------------------------

       Resolution: Duplicate
    Fix Version/s: trunk

dupe of SHINDIG-745.

Much of the code made it into the final version. Thanks for the contribution!


> partial client-side code for Message support
> --------------------------------------------
>
>                 Key: SHINDIG-629
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-629
>             Project: Shindig
>          Issue Type: New Feature
>          Components: Javascript 
>         Environment: All
>            Reporter: Robert Bissett
>             Fix For: trunk
>
>         Attachments: fix-629-bug.patch, jsonmessage.js, rebased-jsonMessage.patch
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> Am filing issue to submit some JavaScript code to go along with initial support for Message posting. See http://codereview.appspot.com/5702 for related work.
> From shindig-dev@incubator.apache.org, the discussion thread starts here: http://tinyurl.com/4h9mlw
> Description of files to attach: 
> I've attached my simple jsonmessage.js file (mostly it just adds a  
> toJsonObject method) and related diffs. With these changes, I create a  
> message in the gadget with:
>    var req = opensocial.newDataRequest();
>    var message = opensocial.newMessage(msg);
>    message.setField(opensocial.Message.Field.TYPE,
>      opensocial.Message.Type.PRIVATE_MESSAGE);
>    message.setField(opensocial.Message.Field.TITLE, subject);
>    // not part of api, but in RPC proposal
>    var recipients = [ tempToId ];
>    message.setField("recipients", recipients);
> and create a JsonRpcRequestItem with a param:
>      rpc.params.message = message.toJsonObject();
> On the server side, I can get the Message object (almost) in my  
> MessageHandler with:
>          Message incomingMessage =
>              reqitem.getTypedParameter("message", Message.class);
> ...except that I'm running into an error in the bean json converter  
> due to the list of recipients I've added (following the proposal to  
> add recipients in an array in the message request).
> Here's a description of the diffs.
> jsonrpccontainer.js
> - Added newMessage() function in order to return the new jsonmessage  
> object.
> feature.xml
> - Added jsonmessage.js file so that it's loaded.
> message.js
> - Changed the text of the Type fields to match Message.java on the  
> server, otherwise the json could not be converted to a pojo.
> org.apache.shindig.social.opensocial.model.Message
> - This is a minor change, but it's an API change so it's a bigger  
> deal. To match the rest/rpc proposal, I added a list of recipients to  
> the class so that they can be pulled out in the message handler. I see  
> that's a todo in your handler; the recipients could be another param  
> in the post body, but I don't think that works well in the rest case  
> without clashing with the messaging URI template.
> org.apache.shindig.social.core.model.MessageImpl
> - Added List<String> of recipients to match interface. Just made the  
> minimum change to compile.
> I hope some of this is helpful. That list of recipients is giving me  
> some grief in the converter, so I'll have to go with my workarounds  
> for now (e.g. treating the incoming messages as a simple JSONObject)  
> and can help more with this after you have a chance to look it over.  
> One other issue is that, when returning a message to the client, there  
> needs to be some way to include the sender information. Another field  
> could be added to Message, or this could be handled in an impl- 
> specific way.
> Let me know please if you have any questions or would like me to try  
> something else. You can see the server-side code as I commit it here  
> (I hope to wrap up message support today, though with some workarounds):
> https://socialsite.dev.java.net/source/browse/socialsite/trunk/src/java/com/sun/socialsite/web/rest/core/
> Cheers,
> Bobby

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


[jira] Commented: (SHINDIG-629) partial client-side code for Message support

Posted by "Paul Lindner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-629?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12646847#action_12646847 ] 

Paul Lindner commented on SHINDIG-629:
--------------------------------------

Patch available for review here... 

http://codereview.appspot.com/8651

> partial client-side code for Message support
> --------------------------------------------
>
>                 Key: SHINDIG-629
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-629
>             Project: Shindig
>          Issue Type: New Feature
>          Components: OpenSocial  feature (Javascript)
>         Environment: All
>            Reporter: Robert Bissett
>         Attachments: fix-629-bug.patch, jsonmessage.js, rebased-jsonMessage.patch
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> Am filing issue to submit some JavaScript code to go along with initial support for Message posting. See http://codereview.appspot.com/5702 for related work.
> From shindig-dev@incubator.apache.org, the discussion thread starts here: http://tinyurl.com/4h9mlw
> Description of files to attach: 
> I've attached my simple jsonmessage.js file (mostly it just adds a  
> toJsonObject method) and related diffs. With these changes, I create a  
> message in the gadget with:
>    var req = opensocial.newDataRequest();
>    var message = opensocial.newMessage(msg);
>    message.setField(opensocial.Message.Field.TYPE,
>      opensocial.Message.Type.PRIVATE_MESSAGE);
>    message.setField(opensocial.Message.Field.TITLE, subject);
>    // not part of api, but in RPC proposal
>    var recipients = [ tempToId ];
>    message.setField("recipients", recipients);
> and create a JsonRpcRequestItem with a param:
>      rpc.params.message = message.toJsonObject();
> On the server side, I can get the Message object (almost) in my  
> MessageHandler with:
>          Message incomingMessage =
>              reqitem.getTypedParameter("message", Message.class);
> ...except that I'm running into an error in the bean json converter  
> due to the list of recipients I've added (following the proposal to  
> add recipients in an array in the message request).
> Here's a description of the diffs.
> jsonrpccontainer.js
> - Added newMessage() function in order to return the new jsonmessage  
> object.
> feature.xml
> - Added jsonmessage.js file so that it's loaded.
> message.js
> - Changed the text of the Type fields to match Message.java on the  
> server, otherwise the json could not be converted to a pojo.
> org.apache.shindig.social.opensocial.model.Message
> - This is a minor change, but it's an API change so it's a bigger  
> deal. To match the rest/rpc proposal, I added a list of recipients to  
> the class so that they can be pulled out in the message handler. I see  
> that's a todo in your handler; the recipients could be another param  
> in the post body, but I don't think that works well in the rest case  
> without clashing with the messaging URI template.
> org.apache.shindig.social.core.model.MessageImpl
> - Added List<String> of recipients to match interface. Just made the  
> minimum change to compile.
> I hope some of this is helpful. That list of recipients is giving me  
> some grief in the converter, so I'll have to go with my workarounds  
> for now (e.g. treating the incoming messages as a simple JSONObject)  
> and can help more with this after you have a chance to look it over.  
> One other issue is that, when returning a message to the client, there  
> needs to be some way to include the sender information. Another field  
> could be added to Message, or this could be handled in an impl- 
> specific way.
> Let me know please if you have any questions or would like me to try  
> something else. You can see the server-side code as I commit it here  
> (I hope to wrap up message support today, though with some workarounds):
> https://socialsite.dev.java.net/source/browse/socialsite/trunk/src/java/com/sun/socialsite/web/rest/core/
> Cheers,
> Bobby

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


[jira] Updated: (SHINDIG-629) partial client-side code for Message support

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

Rodrigo Gallardo updated SHINDIG-629:
-------------------------------------

    Attachment: rebased-jsonMessage.patch

This is the same patch as before, just rebased to the rpc/rest feature separation in svn revision 702319 

> partial client-side code for Message support
> --------------------------------------------
>
>                 Key: SHINDIG-629
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-629
>             Project: Shindig
>          Issue Type: New Feature
>          Components: OpenSocial  feature (Javascript)
>         Environment: All
>            Reporter: Robert Bissett
>         Attachments: fix-629-bug.patch, jsonmessage.js, rebased-jsonMessage.patch
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> Am filing issue to submit some JavaScript code to go along with initial support for Message posting. See http://codereview.appspot.com/5702 for related work.
> From shindig-dev@incubator.apache.org, the discussion thread starts here: http://tinyurl.com/4h9mlw
> Description of files to attach: 
> I've attached my simple jsonmessage.js file (mostly it just adds a  
> toJsonObject method) and related diffs. With these changes, I create a  
> message in the gadget with:
>    var req = opensocial.newDataRequest();
>    var message = opensocial.newMessage(msg);
>    message.setField(opensocial.Message.Field.TYPE,
>      opensocial.Message.Type.PRIVATE_MESSAGE);
>    message.setField(opensocial.Message.Field.TITLE, subject);
>    // not part of api, but in RPC proposal
>    var recipients = [ tempToId ];
>    message.setField("recipients", recipients);
> and create a JsonRpcRequestItem with a param:
>      rpc.params.message = message.toJsonObject();
> On the server side, I can get the Message object (almost) in my  
> MessageHandler with:
>          Message incomingMessage =
>              reqitem.getTypedParameter("message", Message.class);
> ...except that I'm running into an error in the bean json converter  
> due to the list of recipients I've added (following the proposal to  
> add recipients in an array in the message request).
> Here's a description of the diffs.
> jsonrpccontainer.js
> - Added newMessage() function in order to return the new jsonmessage  
> object.
> feature.xml
> - Added jsonmessage.js file so that it's loaded.
> message.js
> - Changed the text of the Type fields to match Message.java on the  
> server, otherwise the json could not be converted to a pojo.
> org.apache.shindig.social.opensocial.model.Message
> - This is a minor change, but it's an API change so it's a bigger  
> deal. To match the rest/rpc proposal, I added a list of recipients to  
> the class so that they can be pulled out in the message handler. I see  
> that's a todo in your handler; the recipients could be another param  
> in the post body, but I don't think that works well in the rest case  
> without clashing with the messaging URI template.
> org.apache.shindig.social.core.model.MessageImpl
> - Added List<String> of recipients to match interface. Just made the  
> minimum change to compile.
> I hope some of this is helpful. That list of recipients is giving me  
> some grief in the converter, so I'll have to go with my workarounds  
> for now (e.g. treating the incoming messages as a simple JSONObject)  
> and can help more with this after you have a chance to look it over.  
> One other issue is that, when returning a message to the client, there  
> needs to be some way to include the sender information. Another field  
> could be added to Message, or this could be handled in an impl- 
> specific way.
> Let me know please if you have any questions or would like me to try  
> something else. You can see the server-side code as I commit it here  
> (I hope to wrap up message support today, though with some workarounds):
> https://socialsite.dev.java.net/source/browse/socialsite/trunk/src/java/com/sun/socialsite/web/rest/core/
> Cheers,
> Bobby

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


[jira] Updated: (SHINDIG-629) partial client-side code for Message support

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

Robert Bissett updated SHINDIG-629:
-----------------------------------

    Attachment: jsonmessage.js

Initial implementation of json message object for sending messages.

> partial client-side code for Message support
> --------------------------------------------
>
>                 Key: SHINDIG-629
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-629
>             Project: Shindig
>          Issue Type: New Feature
>          Components: OpenSocial  feature (Javascript)
>         Environment: All
>            Reporter: Robert Bissett
>         Attachments: fix-629-bug.patch, jsonmessage.js
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> Am filing issue to submit some JavaScript code to go along with initial support for Message posting. See http://codereview.appspot.com/5702 for related work.
> From shindig-dev@incubator.apache.org, the discussion thread starts here: http://tinyurl.com/4h9mlw
> Description of files to attach: 
> I've attached my simple jsonmessage.js file (mostly it just adds a  
> toJsonObject method) and related diffs. With these changes, I create a  
> message in the gadget with:
>    var req = opensocial.newDataRequest();
>    var message = opensocial.newMessage(msg);
>    message.setField(opensocial.Message.Field.TYPE,
>      opensocial.Message.Type.PRIVATE_MESSAGE);
>    message.setField(opensocial.Message.Field.TITLE, subject);
>    // not part of api, but in RPC proposal
>    var recipients = [ tempToId ];
>    message.setField("recipients", recipients);
> and create a JsonRpcRequestItem with a param:
>      rpc.params.message = message.toJsonObject();
> On the server side, I can get the Message object (almost) in my  
> MessageHandler with:
>          Message incomingMessage =
>              reqitem.getTypedParameter("message", Message.class);
> ...except that I'm running into an error in the bean json converter  
> due to the list of recipients I've added (following the proposal to  
> add recipients in an array in the message request).
> Here's a description of the diffs.
> jsonrpccontainer.js
> - Added newMessage() function in order to return the new jsonmessage  
> object.
> feature.xml
> - Added jsonmessage.js file so that it's loaded.
> message.js
> - Changed the text of the Type fields to match Message.java on the  
> server, otherwise the json could not be converted to a pojo.
> org.apache.shindig.social.opensocial.model.Message
> - This is a minor change, but it's an API change so it's a bigger  
> deal. To match the rest/rpc proposal, I added a list of recipients to  
> the class so that they can be pulled out in the message handler. I see  
> that's a todo in your handler; the recipients could be another param  
> in the post body, but I don't think that works well in the rest case  
> without clashing with the messaging URI template.
> org.apache.shindig.social.core.model.MessageImpl
> - Added List<String> of recipients to match interface. Just made the  
> minimum change to compile.
> I hope some of this is helpful. That list of recipients is giving me  
> some grief in the converter, so I'll have to go with my workarounds  
> for now (e.g. treating the incoming messages as a simple JSONObject)  
> and can help more with this after you have a chance to look it over.  
> One other issue is that, when returning a message to the client, there  
> needs to be some way to include the sender information. Another field  
> could be added to Message, or this could be handled in an impl- 
> specific way.
> Let me know please if you have any questions or would like me to try  
> something else. You can see the server-side code as I commit it here  
> (I hope to wrap up message support today, though with some workarounds):
> https://socialsite.dev.java.net/source/browse/socialsite/trunk/src/java/com/sun/socialsite/web/rest/core/
> Cheers,
> Bobby

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


[jira] Updated: (SHINDIG-629) partial client-side code for Message support

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

Robert Bissett updated SHINDIG-629:
-----------------------------------

    Attachment: fix-629-bug.patch

Svn diff of changes needed to use json message object.

> partial client-side code for Message support
> --------------------------------------------
>
>                 Key: SHINDIG-629
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-629
>             Project: Shindig
>          Issue Type: New Feature
>          Components: OpenSocial  feature (Javascript)
>         Environment: All
>            Reporter: Robert Bissett
>         Attachments: fix-629-bug.patch, jsonmessage.js
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> Am filing issue to submit some JavaScript code to go along with initial support for Message posting. See http://codereview.appspot.com/5702 for related work.
> From shindig-dev@incubator.apache.org, the discussion thread starts here: http://tinyurl.com/4h9mlw
> Description of files to attach: 
> I've attached my simple jsonmessage.js file (mostly it just adds a  
> toJsonObject method) and related diffs. With these changes, I create a  
> message in the gadget with:
>    var req = opensocial.newDataRequest();
>    var message = opensocial.newMessage(msg);
>    message.setField(opensocial.Message.Field.TYPE,
>      opensocial.Message.Type.PRIVATE_MESSAGE);
>    message.setField(opensocial.Message.Field.TITLE, subject);
>    // not part of api, but in RPC proposal
>    var recipients = [ tempToId ];
>    message.setField("recipients", recipients);
> and create a JsonRpcRequestItem with a param:
>      rpc.params.message = message.toJsonObject();
> On the server side, I can get the Message object (almost) in my  
> MessageHandler with:
>          Message incomingMessage =
>              reqitem.getTypedParameter("message", Message.class);
> ...except that I'm running into an error in the bean json converter  
> due to the list of recipients I've added (following the proposal to  
> add recipients in an array in the message request).
> Here's a description of the diffs.
> jsonrpccontainer.js
> - Added newMessage() function in order to return the new jsonmessage  
> object.
> feature.xml
> - Added jsonmessage.js file so that it's loaded.
> message.js
> - Changed the text of the Type fields to match Message.java on the  
> server, otherwise the json could not be converted to a pojo.
> org.apache.shindig.social.opensocial.model.Message
> - This is a minor change, but it's an API change so it's a bigger  
> deal. To match the rest/rpc proposal, I added a list of recipients to  
> the class so that they can be pulled out in the message handler. I see  
> that's a todo in your handler; the recipients could be another param  
> in the post body, but I don't think that works well in the rest case  
> without clashing with the messaging URI template.
> org.apache.shindig.social.core.model.MessageImpl
> - Added List<String> of recipients to match interface. Just made the  
> minimum change to compile.
> I hope some of this is helpful. That list of recipients is giving me  
> some grief in the converter, so I'll have to go with my workarounds  
> for now (e.g. treating the incoming messages as a simple JSONObject)  
> and can help more with this after you have a chance to look it over.  
> One other issue is that, when returning a message to the client, there  
> needs to be some way to include the sender information. Another field  
> could be added to Message, or this could be handled in an impl- 
> specific way.
> Let me know please if you have any questions or would like me to try  
> something else. You can see the server-side code as I commit it here  
> (I hope to wrap up message support today, though with some workarounds):
> https://socialsite.dev.java.net/source/browse/socialsite/trunk/src/java/com/sun/socialsite/web/rest/core/
> Cheers,
> Bobby

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