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.ScriptService
Tools to manipulate the data needed for the contributors macro.
Since:
1.27.4
Version:
$Id$
  • Constructor Details

    • ContributorsScriptService

      public ContributorsScriptService()
  • Method Details

    • 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 contributors
      key - which key to use when sorting
      reverse - if the list should be reversed
      limit - how many elements the list should have after sorting, if the parameter is missing the full list is returned
      Returns:
      list of sorted contributors