New Webservices to read the user Activity

Description

Here is a new webservice set called Activity that allows to query the user events. This can be very useful to control the user activity externally to Sakai.

-getUserActivityByType returns all the events of a type from a user

http://localhost:8080/sakai-ws/rest/activity/getUserActivityByType?sessionid=ed446383-8e95-48c9-9a62-d71cbe619fa1&eid=admin&eventType=annc.new

-getUserLogonActivity returns all the logins of a user

http://localhost:8080/sakai-ws/rest/activity/getUserLogonActivity?sessionid=ed446383-8e95-48c9-9a62-d71cbe619fa1&eid=admin

-getUserActivity and getUserActivityStringDates return the events of a user between 2 dates.

http://localhost:8080/sakai-ws/rest/activity/getUserActivityRestVersion?sessionid=ed446383-8e95-48c9-9a62-d71cbe619fa1&eid=admin&startDate=2013-09-10%2020:00:00&endDate=2018-09-10%2020:00:00

NOTE: There are 2 versions becuase when we call it as a REST, it needs to convert the string to dates (getUserActivityStringDates) and when calling it as a webservice, the parameters are directly dates.

There is an option to do this with only one webservice using this:
https://cirovladimir.wordpress.com/2012/09/18/apache-cxf-jax-rs-class-java-util-date-can-not-be-instantiated-using-a-constructor-with-a-single-string-argument/

But it needs to create the ParameterHandler and a lot of extra steps. If you consider that having 2 version (one for REST calls and another for the traditional calls) is fine, then this patch works.

is incorporated by

Activity

Show:

Diego del Blanco Orobitg October 6, 2015 at 1:08 PM

Diego del Blanco Orobitg October 5, 2015 at 9:30 AM

The pull request attached to this JIRA is not the one for this Jira, as said in the comments. So, this is not solved yet. The pull request for this is this one:

https://github.com/sakaiproject/sakai/pull/998

That has not addresses changes at this moment.

Diego del Blanco Orobitg September 24, 2015 at 7:34 PM

This is linked to a pull request (the number 1113) that is from another issue https://sakaiproject.atlassian.net/browse/SAK-29813#icft=SAK-29813 (it was linked her by mistake and now I can't view the way to remove it from this ticket). About this ticket, I will create a new pull request and then add the comment here when ready.

Diego del Blanco Orobitg August 14, 2015 at 3:07 PM

Fixed

Details

Priority

Affects versions

Fix versions

Components

Assignee

Reporter

Created August 14, 2015 at 3:04 PM
Updated March 23, 2022 at 3:03 PM
Resolved October 20, 2015 at 6:10 PM