Hi Koos, I think there are three layers in the gadget store which determine whether certain gadgets are visible or not visible in the 'add gadget' popup of a users dashboard:
Tenant - Each tenant (company) may have its own gadgetstore. If for example one Amdatu application is used by several tenants (i.e. school A and school B) then each tenant should be able to define its own gadgetstore. School A for example might want to offer some game gadgets while School B absolutely doesn't want these gadgets to be available to students. So the gadgetstore must become tenant aware. User - Each user may configure its own dashboard, so gadgets displayed on the dashboard are stored per user (AppData). This is the use case I described before. Authorization - The administrator of a particular tenant might want to define authorization on adding gadgets to the dashboard. For example teachers may add the 'Display student results' gadget to their dashboard, but this gadget should not be available to students (and if a student would open the gadget, it should throw a non authorized exception, but that's up to the gadget implementation). This authorization mechanism should be implemented in the tenant REST service that returns the list of available gadgets. In your email you are describing the last use case (Authorization). Could you create a JIRA issue for it? Regards, Ivo From: amdatu-developers-bounces at amdatu.org [mailto:[email protected]] On Behalf Of Koos Gadellaa Sent: dinsdag 19 oktober 2010 10:45 To: amdatu-developers at amdatu.org Subject: Re: [Amdatu-developers] usage of gadgetstore Hi Ivo, First of all thank you for the quick reply. I wasn't aware of the setup in the /social/rest/appdata/@me/@self After having looked at it, I think it's something different. The appdata/@me/@self are the preferences of the user (which can include the 'enabled' gadgets on his dashboard). gadgetmanagement's RESTlet for gadgets/gadgetstore/mine is a facade of this. The gadgetstore isn't user-specific, as it uses /gadgets/all to lists all gadgets; not gadgets which can only be viewed by the user. I'd like to be able to have gadgets registered at the gadgetstore be user-dependent. For example, consider a simple dashboard with two users: banker and customer. The customer can customize his dashboard, maybe adding the 'buienradar' gadget, and the 'currentBalance', an app which displays his current balance. The same dashboard is also used by the banker. However, the banker can also add 'modifyBalance' gadget, to increase his own balance (banks can create money out of nowhere, right? ;) ) of course, only bankers should be allowed to do that, and we don't want customers in on that cool trick. So the modifyBalance may only be seen (and accessed, but that's up to the gadget). As a downside, he shouldn't be looking at the weather, so he might not be allowed to see/use the buienradar. Regards, Koos On 19 okt 2010, at 09:09, Ivo Ladage-van Doorn wrote: Hi Koos, The gadgetstore is already user-specific. That is, a list of 'enabled gadgets' are stored in the Person AppData as the OpenSocial spec defines. Amdatu comes with a Cassandra implementation of AppData storage. So the list of 'enabled gadgets' is associated with a OpenSocial Person and you can use appdata requests to /social/rest/appdata/@me/@self to manipulate that list (for examples, see application-bundles\dashboard-bundle\src\main\resources\static\js\lib\jquery.dashboard.js) For gadget management there are two services available: org.amdatu.application.gadgetmanagement.GadgetManagement provides crud operations for adding your own gadgets to the gadgetstore (however, delete/update are not supported yet) org.amdatu.application.gadgetmanagement.service.GadgetManagementServiceImpl implements a REST service for retrieving (categorized) gadgets. So rather than using appdata requests you could also use the rest service /rest/services/gadgetstore/gadgetstore/gadgets/mine to retrieve the gadgets associated with yourself. See also the javadoc on http://repository.amdatu.org/sites/apidocs/ Note that this javadoc is a complete list of all classes, most of the classes are irrelevant for you nor can you use them, but that is another discussion on the mailing list. Regards, Ivo From: amdatu-developers-bounces at amdatu.org<mailto:amdatu-developers-bounces at amdatu.org> [mailto:[email protected]] On Behalf Of Koos Gadellaa Sent: maandag 18 oktober 2010 18:34 To: amdatu-developers at amdatu.org<mailto:amdatu-developers at amdatu.org> Subject: [Amdatu-developers] usage of gadgetstore Hello, I'm using a personalized dashboard with some gadgets on it, and I'd like to use the gadgetstore. However, I'd rather not have all the amdatu-platform and demo samples in there; i.e. I want a personalized gadgetstore. Of course, ideally the gadgetstore could handle this itself: if it is tenant- and user-aware, any call to the gadgetstore calling for' gadgets would return only those gadgets which the current user is allowed to see. However, this quickly binds in with usermanagement, accessibility of gadgets based on user, and applications. And as far as I've heard, these parts havent been nailed down yet. Yet the question for me then becomes: will Amdatu have such functionality in its gadgetstore (preferebly somewhere in the near future), or is the gadgetstore only 'as a demo' (i.e. rip it and create your own). For if it is going to have such functionalty, I'm wondering if at least a high-level API could be defined. Such a high-level api could be as simple as saying that the gadgetstore is/will be/ should be user and tenant-aware. For me this would mean that for testing I could mock the gadgetstore and have it return the values I want. Whenever Amdatu then implements this feature, I can remove the mock. Of course, if time shows that such an api cannot hold (for whatever reason), I'd have to rewrite it, but until then I can hope that my dashboard is based on mostly amdatu-supplied components. Kind regards, Koos Gadellaa | Software Engineer +31 6 317 658 01 My world is: ever expanding Luminis KIS B.V. Prins Willem Alexanderlaan 715 7311 ST Apeldoorn +31 88 586 46 25 http://kis.luminis.eu http://www.luminis.eu KvK (CoC) 09 14 31 09 BTW (VAT) NL8135.18.556.B.01 <ATT00001..c> Beste, Met vriendelijke groeten, Koos Gadellaa | Software Engineer +31 6 317 658 01 My world is: ever expanding Luminis KIS B.V. Prins Willem Alexanderlaan 715 7311 ST Apeldoorn +31 88 586 46 25 http://kis.luminis.eu http://www.luminis.eu KvK (CoC) 09 14 31 09 BTW (VAT) NL8135.18.556.B.01 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.amdatu.org/pipermail/amdatu-developers/attachments/20101019/12ce3bce/attachment-0001.html

