You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by daviesd <da...@oclc.org> on 2012/06/06 18:52:12 UTC

GroupId

Some changes were made to GroupId between 2.5-beta1 and 2.5-beta2 that are
affecting me.

GroupId.Type changed from this

   all, friends, self, deleted, groupId;

To this

   objectId(0), self(1), friends(2), all(3);

We had extended AppDataService to support a groupId of @institution
(something that is relevant in our domain)

            osapi.appdata.get({
                userId: '@me',
                groupId : '@institution',
                appId : '@app'} )

However, I have concerns as to how this will work now, because I¹m fighting
through a unit test that does this

    groupId = GroupId.fromJson("@institution")

And it¹s throwing a IllegalArgumentException.

Can some one point me in the right direction as to how I¹m suppose to handle
something like this?

Thanks,
doug


Re: GroupId

Posted by Ryan J Baxter <rj...@us.ibm.com>.
Doug I hope to get a chance to look at a possible solution tomorrow. 

-Ryan




From:   daviesd <da...@oclc.org>
To:     <de...@shindig.apache.org>, 
Date:   06/09/2012 12:49 AM
Subject:        Re: GroupId



I had not opened one.  I was waiting for Ryan's response to my follow-up.

doug


On 6/8/12 9:16 PM, "Henry Saputra" <he...@gmail.com> wrote:

> Hi Doug, do you have a JIRA opened for this issue?
> 
> - Henry
> 
> On Wed, Jun 6, 2012 at 9:52 AM, daviesd <da...@oclc.org> wrote:
>> Some changes were made to GroupId between 2.5-beta1 and 2.5-beta2 that 
are
>> affecting me.
>> 
>> GroupId.Type changed from this
>> 
>> ? all, friends, self, deleted, groupId;
>> 
>> To this
>> 
>> ? objectId(0), self(1), friends(2), all(3);
>> 
>> We had extended AppDataService to support a groupId of @institution
>> (something that is relevant in our domain)
>> 
>> ? ? ? ? ? ?osapi.appdata.get({
>> ? ? ? ? ? ? ? ?userId: '@me',
>> ? ? ? ? ? ? ? ?groupId : '@institution',
>> ? ? ? ? ? ? ? ?appId : '@app'} )
>> 
>> However, I have concerns as to how this will work now, because I¹m 
fighting
>> through a unit test that does this
>> 
>> ? ?groupId = GroupId.fromJson("@institution")
>> 
>> And it¹s throwing a IllegalArgumentException.
>> 
>> Can some one point me in the right direction as to how I¹m suppose to 
handle
>> something like this?
>> 
>> Thanks,
>> doug
>> 
> 




Re: GroupId

Posted by Ryan J Baxter <rj...@us.ibm.com>.
Doug here is the review and the JIRA.

http://codereview.appspot.com/6305079/ 
https://issues.apache.org/jira/browse/SHINDIG-1796 

-Ryan





From:   Ryan J Baxter/Westford/IBM
To:     dev@shindig.apache.org, 
Date:   06/09/2012 07:36 PM
Subject:        Re: GroupId


Doug I hope to get a chance to look at a possible solution tomorrow. 

-Ryan





From:   daviesd <da...@oclc.org>
To:     <de...@shindig.apache.org>, 
Date:   06/09/2012 12:49 AM
Subject:        Re: GroupId



I had not opened one.  I was waiting for Ryan's response to my follow-up.

doug


On 6/8/12 9:16 PM, "Henry Saputra" <he...@gmail.com> wrote:

> Hi Doug, do you have a JIRA opened for this issue?
> 
> - Henry
> 
> On Wed, Jun 6, 2012 at 9:52 AM, daviesd <da...@oclc.org> wrote:
>> Some changes were made to GroupId between 2.5-beta1 and 2.5-beta2 that 
are
>> affecting me.
>> 
>> GroupId.Type changed from this
>> 
>> ? all, friends, self, deleted, groupId;
>> 
>> To this
>> 
>> ? objectId(0), self(1), friends(2), all(3);
>> 
>> We had extended AppDataService to support a groupId of @institution
>> (something that is relevant in our domain)
>> 
>> ? ? ? ? ? ?osapi.appdata.get({
>> ? ? ? ? ? ? ? ?userId: '@me',
>> ? ? ? ? ? ? ? ?groupId : '@institution',
>> ? ? ? ? ? ? ? ?appId : '@app'} )
>> 
>> However, I have concerns as to how this will work now, because I¹m 
fighting
>> through a unit test that does this
>> 
>> ? ?groupId = GroupId.fromJson("@institution")
>> 
>> And it¹s throwing a IllegalArgumentException.
>> 
>> Can some one point me in the right direction as to how I¹m suppose to 
handle
>> something like this?
>> 
>> Thanks,
>> doug
>> 
> 




Re: GroupId

Posted by daviesd <da...@oclc.org>.
I had not opened one.  I was waiting for Ryan's response to my follow-up.

doug


On 6/8/12 9:16 PM, "Henry Saputra" <he...@gmail.com> wrote:

> Hi Doug, do you have a JIRA opened for this issue?
> 
> - Henry
> 
> On Wed, Jun 6, 2012 at 9:52 AM, daviesd <da...@oclc.org> wrote:
>> Some changes were made to GroupId between 2.5-beta1 and 2.5-beta2 that are
>> affecting me.
>> 
>> GroupId.Type changed from this
>> 
>> ? all, friends, self, deleted, groupId;
>> 
>> To this
>> 
>> ? objectId(0), self(1), friends(2), all(3);
>> 
>> We had extended AppDataService to support a groupId of @institution
>> (something that is relevant in our domain)
>> 
>> ? ? ? ? ? ?osapi.appdata.get({
>> ? ? ? ? ? ? ? ?userId: '@me',
>> ? ? ? ? ? ? ? ?groupId : '@institution',
>> ? ? ? ? ? ? ? ?appId : '@app'} )
>> 
>> However, I have concerns as to how this will work now, because I¹m fighting
>> through a unit test that does this
>> 
>> ? ?groupId = GroupId.fromJson("@institution")
>> 
>> And it¹s throwing a IllegalArgumentException.
>> 
>> Can some one point me in the right direction as to how I¹m suppose to handle
>> something like this?
>> 
>> Thanks,
>> doug
>> 
> 



Re: GroupId

Posted by Henry Saputra <he...@gmail.com>.
Hi Doug, do you have a JIRA opened for this issue?

- Henry

On Wed, Jun 6, 2012 at 9:52 AM, daviesd <da...@oclc.org> wrote:
> Some changes were made to GroupId between 2.5-beta1 and 2.5-beta2 that are
> affecting me.
>
> GroupId.Type changed from this
>
>   all, friends, self, deleted, groupId;
>
> To this
>
>   objectId(0), self(1), friends(2), all(3);
>
> We had extended AppDataService to support a groupId of @institution
> (something that is relevant in our domain)
>
>            osapi.appdata.get({
>                userId: '@me',
>                groupId : '@institution',
>                appId : '@app'} )
>
> However, I have concerns as to how this will work now, because I¹m fighting
> through a unit test that does this
>
>    groupId = GroupId.fromJson("@institution")
>
> And it¹s throwing a IllegalArgumentException.
>
> Can some one point me in the right direction as to how I¹m suppose to handle
> something like this?
>
> Thanks,
> doug
>

Re: GroupId

Posted by daviesd <da...@oclc.org>.
Ryan,

Yes, it would make sense for our use case, but I can also see how it doesn't
fit in with the spec exactly.  I'm not 100% sure what an Object-Id is
suppose to be, but I guess we could fall borderline into that category as
well.

In our case specifying @institution tells the shindig apis to use the
institution id that we have encoded into our custom security token.  This is
an identifier for all the users of a particular library in our case.
Following the @ convention just felt right from the gadget writer
perspective.  We use this in our appdata layer to provide storage for group
type data.

Let us know what you think.

doug


On 6/6/12 8:49 PM, "Ryan J Baxter" <rj...@us.ibm.com> wrote:

> Yeah we did a lot of work around Groups to actually support them in
> Shindig.  Along the way we found that the Group Id implementation didn't
> exactly follow the spec.
> 
> Doug are you basically extending GroupId with your own custom "@" id?  We
> didn't consider this case, we basically support the @ ids from the spec
> and then object id, so it makes sense that if you pass another id we throw
> that exception.  I think we might have to come up with a way that we can
> allow consumers to extend this...would that make sense for your use case?
> 
> -Ryan
> 
> 
> 
> 
> From:   Henry Saputra <he...@gmail.com>
> To:     dev@shindig.apache.org,
> Date:   06/06/2012 01:48 PM
> Subject:        Re: GroupId
> 
> 
> 
> The change was part of the commits for SHINDIG-1780.
> 
> Ryan could probably help with this.
> 
> - Henry
> 
> On Wed, Jun 6, 2012 at 9:52 AM, daviesd <da...@oclc.org> wrote:
>> Some changes were made to GroupId between 2.5-beta1 and 2.5-beta2 that
> are
>> affecting me.
>> 
>> GroupId.Type changed from this
>> 
>>   all, friends, self, deleted, groupId;
>> 
>> To this
>> 
>>   objectId(0), self(1), friends(2), all(3);
>> 
>> We had extended AppDataService to support a groupId of @institution
>> (something that is relevant in our domain)
>> 
>>            osapi.appdata.get({
>>                userId: '@me',
>>                groupId : '@institution',
>>                appId : '@app'} )
>> 
>> However, I have concerns as to how this will work now, because I¹m
> fighting
>> through a unit test that does this
>> 
>>    groupId = GroupId.fromJson("@institution")
>> 
>> And it¹s throwing a IllegalArgumentException.
>> 
>> Can some one point me in the right direction as to how I¹m suppose to
> handle
>> something like this?
>> 
>> Thanks,
>> doug
>> 
> 
> 



Re: GroupId

Posted by Ryan J Baxter <rj...@us.ibm.com>.
Yeah we did a lot of work around Groups to actually support them in 
Shindig.  Along the way we found that the Group Id implementation didn't 
exactly follow the spec.

Doug are you basically extending GroupId with your own custom "@" id?  We 
didn't consider this case, we basically support the @ ids from the spec 
and then object id, so it makes sense that if you pass another id we throw 
that exception.  I think we might have to come up with a way that we can 
allow consumers to extend this...would that make sense for your use case?

-Ryan




From:   Henry Saputra <he...@gmail.com>
To:     dev@shindig.apache.org, 
Date:   06/06/2012 01:48 PM
Subject:        Re: GroupId



The change was part of the commits for SHINDIG-1780.

Ryan could probably help with this.

- Henry

On Wed, Jun 6, 2012 at 9:52 AM, daviesd <da...@oclc.org> wrote:
> Some changes were made to GroupId between 2.5-beta1 and 2.5-beta2 that 
are
> affecting me.
>
> GroupId.Type changed from this
>
>   all, friends, self, deleted, groupId;
>
> To this
>
>   objectId(0), self(1), friends(2), all(3);
>
> We had extended AppDataService to support a groupId of @institution
> (something that is relevant in our domain)
>
>            osapi.appdata.get({
>                userId: '@me',
>                groupId : '@institution',
>                appId : '@app'} )
>
> However, I have concerns as to how this will work now, because I¹m 
fighting
> through a unit test that does this
>
>    groupId = GroupId.fromJson("@institution")
>
> And it¹s throwing a IllegalArgumentException.
>
> Can some one point me in the right direction as to how I¹m suppose to 
handle
> something like this?
>
> Thanks,
> doug
>



Re: GroupId

Posted by Henry Saputra <he...@gmail.com>.
The change was part of the commits for SHINDIG-1780.

Ryan could probably help with this.

- Henry

On Wed, Jun 6, 2012 at 9:52 AM, daviesd <da...@oclc.org> wrote:
> Some changes were made to GroupId between 2.5-beta1 and 2.5-beta2 that are
> affecting me.
>
> GroupId.Type changed from this
>
>   all, friends, self, deleted, groupId;
>
> To this
>
>   objectId(0), self(1), friends(2), all(3);
>
> We had extended AppDataService to support a groupId of @institution
> (something that is relevant in our domain)
>
>            osapi.appdata.get({
>                userId: '@me',
>                groupId : '@institution',
>                appId : '@app'} )
>
> However, I have concerns as to how this will work now, because I¹m fighting
> through a unit test that does this
>
>    groupId = GroupId.fromJson("@institution")
>
> And it¹s throwing a IllegalArgumentException.
>
> Can some one point me in the right direction as to how I¹m suppose to handle
> something like this?
>
> Thanks,
> doug
>