[xwiki-users] Fw : Re: Fw : Re: How can I get event object through a form
--- En date de : Mar 19.1.16, [email protected] <[email protected]> a écrit :
De: [email protected] <[email protected]> Objet: Re: [xwiki-users] Fw : Re: How can I get event object through a form À: "XWiki Users" <[email protected]> Date: Mardi 19 janvier 2016, 8h09 Also note that the AS has a buitin feature to delete old events, see your xwiki.cfg file:
....
xwiki.plugin.activitystream.daystokeepevents=0
Yes I know that and delete some event with API :-) My problem is the way to give some selected event object through a form with $request.getParameterValues() to delete these events.
If you still need to delete event manually you could check the code executed by the scheduler job.
I didn't found it either Scheduler.ActivityStreamCleaner is empty and anyway I suppose it is groovy code (look into xar source if needed).
Did you try using searchEvents and building an HQL that
Anyway I found table and field to use an hql query here: http://platform.xwiki.org/xwiki/bin/view/DevGuide/DatabaseSchema (I must use a ggogle glass+zoom to see field ;-) ) but my query with $services.query.hql($hql).execute() doesn't work with table name (rg.hibernate.hql.ast.QuerySyntaxException: activitystream_events is not mapped ). Then I tested with simple query: SELECT doc.XWD_TITLE FROM xwikidoc AS doc WHERE doc.XWD_FULLNAME = 'Main.WebHome' didn't work => Caused by: org.hibernate.hql.ast.QuerySyntaxException: xwikidoc is not mapped [select doc.XWD_TITLE FROM xwikidoc AS doc WHERE doc.XWD_FULLNAME = 'Main.WebHome'] SELECT doc.title FROM XWikiDocument AS doc WHERE doc.fullName = 'Main.WebHome' working fine With velocity+API we can not use hql query with true field/table name? If we can not then where I can found field/table mapping name for activitystream_events table? Thxs
On 19 Jan 2016 at 10:00:13, Pascal BASTIEN ([email protected](mailto:[email protected])) wrote:
--- En date de : Mar 19.1.16, [email protected] a écrit :
De: [email protected] Objet: Re: [xwiki-users] Fw : Re: How can I get event object through a form À: "XWiki Users" Date: Mardi 19 janvier 2016, 8h09 Also note that the AS has a buitin feature to delete old events, see your xwiki.cfg file:
....
xwiki.plugin.activitystream.daystokeepevents=0
Yes I know that and delete some event with API :-) My problem is the way to give some selected event object through a form with $request.getParameterValues() to delete these events.
If you still need to delete event manually you could check the code executed by the scheduler job.
I didn't found it either Scheduler.ActivityStreamCleaner is empty and anyway I suppose it is groovy code (look into xar source if needed).
The job is written in java: https://github.com/xwiki/xwiki-platform/blob/4303f79df9c0ef657a8f8f823fb76af... Thanks -Vincent
Did you try using searchEvents and building an HQL that
Anyway I found table and field to use an hql query here: http://platform.xwiki.org/xwiki/bin/view/DevGuide/DatabaseSchema (I must use a ggogle glass+zoom to see field ;-) ) but my query with $services.query.hql($hql).execute() doesn't work with table name (rg.hibernate.hql.ast.QuerySyntaxException: activitystream_events is not mapped ). Then I tested with simple query: SELECT doc.XWD_TITLE FROM xwikidoc AS doc WHERE doc.XWD_FULLNAME = 'Main.WebHome' didn't work => Caused by: org.hibernate.hql.ast.QuerySyntaxException: xwikidoc is not mapped [select doc.XWD_TITLE FROM xwikidoc AS doc WHERE doc.XWD_FULLNAME = 'Main.WebHome'] SELECT doc.title FROM XWikiDocument AS doc WHERE doc.fullName = 'Main.WebHome' working fine With velocity+API we can not use hql query with true field/table name? If we can not then where I can found field/table mapping name for activitystream_events table?
Thxs
participants (2)
-
Pascal BASTIEN -
vincent@massol.net