[Building Sakai] FW: Creating an Entity Provider from scratch issues

Steve Swinsburg steve.swinsburg at gmail.com
Wed Sep 11 18:02:21 PDT 2013


FYI, the calendar has an entityprovider in trunk, work which was undertaken
as part of Project Keitai - you could use it as a base to extend from
perhaps.

cheers,
Steve


On Thu, Sep 12, 2013 at 7:19 AM, Aaron Zeckoski <azeckoski at unicon.net>wrote:

> So the problem here is that this is a velocity tool which is not setup
> to know anything about spring. Just putting in a spring config file
> does as much as putting a random config file into any code might do
> (which is to say, likely nothing). In this case, since you are putting
> this into the calendar I suggest you use an init method of some kind
> in the tool (one should already exist that is doing other things on
> tool startup) to manually register your provider with the provider
> service.
>
> EntityProviderManager.registerEntityProvider(yourProviderObject);
>
> You will probably need to use the ComponentManager to fetch the
> org.sakaiproject.entitybroker.entityprovider.EntityProviderManager
> service.
>
> -AZ
>
>
>
> On Wed, Sep 11, 2013 at 5:08 PM, Fellows, Kenneth <KFellows at apus.edu>
> wrote:
> > Attached is a zip file take contains the calendar impl class for RESTFul
> events.
> >
> > -----Original Message-----
> > From: azeckoski at gmail.com [mailto:azeckoski at gmail.com] On Behalf Of
> Aaron Zeckoski
> > Sent: Wednesday, September 11, 2013 4:55 PM
> > To: Jackson, Chan
> > Cc: sakai-dev at collab.sakaiproject.org
> > Subject: Re: [Building Sakai] Creating an Entity Provider from scratch
> issues
> >
> > Yes. At a minimum you have to implement the method in:
> >
> https://source.sakaiproject.org/svn/entitybroker/trunk/api/src/java/org/sakaiproject/entitybroker/entityprovider/EntityProvider.java
> .
> >
> > You cannot register something which does not implement that interface.
> >
> > More typically you would implement the methods in:
> >
> https://source.sakaiproject.org/svn/entitybroker/trunk/api/src/java/org/sakaiproject/entitybroker/entityprovider/capabilities/RESTful.java
> >
> > Check out the example app which does the latter.
> > -AZ
> >
> > On Wed, Sep 11, 2013 at 4:44 PM, Jackson, Chan <CJackson at apus.edu>
> wrote:
> >> Is there certain specific methods that have to be implemented in order
> for the Entity broker to pick up the new ToolWidgetProviderImpl class that
> we're creating?
> >>
> >> -----Original Message-----
> >> From: azeckoski at gmail.com [mailto:azeckoski at gmail.com] On Behalf Of
> >> Aaron Zeckoski
> >> Sent: Wednesday, September 11, 2013 4:25 PM
> >> To: Jackson, Chan
> >> Cc: sakai-dev at collab.sakaiproject.org
> >> Subject: Re: [Building Sakai] Creating an Entity Provider from scratch
> >> issues
> >>
> >> The XML files are just spring bean config files. Having more of less of
> them would simply define more beans (and none of that is Sakai specific or
> related to EB specifically either). You could have only a single xml file
> (applicationContext.xml is the default one spring would look for but that
> is configurable) or you could have as many as you like but importing or
> configuring spring to use more.
> >>
> >> The key is to either extend the included abstract entity provider bean
> OR to register the bean manually (which is what the abstract one does for
> you). The sample entity-webapp is using the abstract bean.
> >>
> >> My suggestion is to take the sample code I wrote in link you have
> already found and use that as a starting point and then just customize it.
> >> https://source.sakaiproject.org/contrib/programmerscafe/entity-webapp/
> >> trunk/
> >>
> >> Alternatively, you can zip up and send the code over to us and someone
> might be able to review it and figure out what's wrong.
> >> -AZ
> >>
> >>
> >> On Wed, Sep 11, 2013 at 4:06 PM, Jackson, Chan <CJackson at apus.edu>
> wrote:
> >>> Hi all,
> >>>
> >>>
> >>>
> >>> We have been attempting to create RESTful CRUD functionalities for
> >>> tools such as the Calendar tool using the Entity Broker system but
> >>> haven't
> >>>
> >>> had much luck getting the new Entity Provider registered with the
> >>> Entity Broker system. We've followed the directions provided from
> >>>
> >>> https://confluence.sakaiproject.org/display/SAKDEV/Defining+EntityPro
> >>> v iders and we're a little unclear as to whether we need to have both
> >>> components.xml and/or
> >>>
> >>> applicationContext.xml.
> >>>
> >>>
> >>>
> >>> Additionally, we found and got the sample entity web app code
> >>> built/deployed from
> >>>
> >>> https://source.sakaiproject.org/contrib/programmerscafe/entity-webapp
> >>> / trunk/ Once again, when we try to compare what we're trying to
> >>> build/create from scratch, it seems
> >>>
> >>> like there is something else that we're missing in the process of
> >>> getting the Entity Provider registered. Is there any additional XML
> >>> files aside from the components.xml
> >>>
> >>> and applicationContext.xml files that we need to look into
> >>> configuring? We can provide additional details if needed.
> >>>
> >>>
> >>>
> >>> Thank you!
> >>>
> >>>
> >>>
> >>> Chan Jackson | Java Developer Consultant
> >>>
> >>>
> >>>
> >>> American Public University System
> >>> American Military University  |  American Public University
> >>> 661 S George Street, Charles Town, WV 25414 T 304-885-5260 | M
> >>> 304-261-2586 |  cjackson at apus.edu | www.apus.edu
> >>>
> >>>
> >>>
> >>> This message is private and confidential. If you have received it in
> >>> error, please notify the sender and remove it from your system.
> >>>
> >>>
> >>> _______________________________________________
> >>> sakai-dev mailing list
> >>> sakai-dev at collab.sakaiproject.org
> >>> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
> >>>
> >>> TO UNSUBSCRIBE: send email to
> >>> sakai-dev-unsubscribe at collab.sakaiproject.org
> >>> with a subject of "unsubscribe"
> >>
> >>
> >>
> >> --
> >> Aaron Zeckoski - Software Architect - http://tinyurl.com/azprofile
> >> This message is private and confidential. If you have received it in
> error, please notify the sender and remove it from your system.
> >
> >
> >
> > --
> > Aaron Zeckoski - Software Architect - http://tinyurl.com/azprofile
> > This message is private and confidential. If you have received it in
> error, please notify the sender and remove it from your system.
>
>
>
> --
> Aaron Zeckoski - Software Architect - http://tinyurl.com/azprofile
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>
> TO UNSUBSCRIBE: send email to
> sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of
> "unsubscribe"
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20130912/755ff904/attachment.html 


More information about the sakai-dev mailing list