Package org.xwiki.activeinstalls2.script
Class ActiveInstallsScriptService
- java.lang.Object
-
- org.xwiki.activeinstalls2.script.ActiveInstallsScriptService
-
- All Implemented Interfaces:
org.xwiki.script.service.ScriptService
@Component @Named("activeinstalls2") @Singleton public class ActiveInstallsScriptService extends Object implements org.xwiki.script.service.ScriptService
Provides Scripting APIs for the Active Installs module.- Since:
- 5.2M2
- Version:
- $Id: 93eabc04f3e1a817dd53cb923b8d9e28476deaff $
-
-
Constructor Summary
Constructors Constructor Description ActiveInstallsScriptService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
countInstalls(String jsonQuery)
Executes a Count query for Active Installs.List<org.xwiki.activeinstalls2.internal.data.Ping>
searchInstalls(String jsonQuery)
Executes a Search query for Active Installs.
-
-
-
Method Detail
-
countInstalls
public long countInstalls(String jsonQuery) throws Exception
Executes a Count query for Active Installs.- Parameters:
jsonQuery
- the Elastic Search JSON query used to search for installs.- Returns:
- the count number
- Throws:
Exception
- when an error happens while retrieving the data- Since:
- 14.4RC1
-
searchInstalls
public List<org.xwiki.activeinstalls2.internal.data.Ping> searchInstalls(String jsonQuery) throws Exception
Executes a Search query for Active Installs.- Parameters:
jsonQuery
- the Elastic Search JSON query used to search for installs. For example:{ "term": { "distributionVersion" : "5.2" } }
- Returns:
- the parsed JSON result coming from Elastic Search, as a list of
Ping
object. - Throws:
Exception
- when an error happens while retrieving the data- Since:
- 14.4RC1
-
-