Done and jira project created. Thanks -Vincent On 28 Jan 2016 at 12:59:16, [email protected] ([email protected](mailto:[email protected])) wrote:
Hi devs,
I’d like a new contrib project on xwiki-contrib to host the API I’m developing that offers antispam tools.
I’m going to create it but this is a heads up about this new project.
Right now it offers this Java API (with a corresponding script service):
@Role public interface AntiSpam { /** * Get references and last authors of all documents matching a given solr query string. * * @param solrQueryString the solr query string to search with (e.g. "mcafee") * @param nb the number of matching results to return * @param offset the start position in the full list of matching results * @return the list of references of matching documents and their last authors * @exception AntiSpamException if an error occurs such as a failure to find matching documents */ Pair, Set> getMatchingDocuments(String solrQueryString, int nb, int offset) throws AntiSpamException;
/** * Clean the passed documents of all changes made by the passed authors. * * @param documentReference the reference to the document to clean * @param authorReferences the reference to the authors for which to remove all changes from the document * @param skipActivityStream if true then don't generate events in the Activity Stream for the changes made to * the document * @exception AntiSpamException if an error occurs */ void cleanDocument(DocumentReference documentReference, Collection authorReferences, boolean skipActivityStream) throws AntiSpamException;
/** * Find all documents with the passed author. * * @param authorReference the author for which to return the list of modified documents (i.e the last author of * the returned documents) * @param nb the number of results to return * @param offset the start position in the full list of results * @return the list of references to documents for which the passed author was the last author * @exception AntiSpamException if an error occurs */ List getDocumentsForAuthor(DocumentReference authorReference, int nb, int offset) throws AntiSpamException; }
Thanks -Vincent