Package com.xwiki.macros.script
Class ContributorsScriptService
- java.lang.Object
-
- com.xwiki.macros.script.ContributorsScriptService
-
- All Implemented Interfaces:
org.xwiki.script.service.ScriptService
@Component @Named("contributors") @Singleton @Unstable public class ContributorsScriptService extends Object implements org.xwiki.script.service.ScriptServiceTools to manipulate the data needed for the contributors macro.- Since:
- 1.27.4
- Version:
- $Id$
-
-
Constructor Summary
Constructors Constructor Description ContributorsScriptService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Map<String,Object>>sortContributors(Collection<Map<String,Object>> contributors, String key, boolean reverse, int limit)Sort the list of contributors by the given key.
-
-
-
Method Detail
-
sortContributors
public List<Map<String,Object>> sortContributors(Collection<Map<String,Object>> contributors, String key, boolean reverse, int limit)
Sort the list of contributors by the given key.- Parameters:
contributors- list of contributorskey- which key to use when sortingreverse- if the list should be reversedlimit- how many elements the list should have after sorting, if the parameter is missing the full list is returned- Returns:
- list of sorted contributors
-
-