com.xpn.xwiki.plugin.rightsmanager
Class RightsManagerGroupsApi

java.lang.Object
  extended by com.xpn.xwiki.api.Api
      extended by com.xpn.xwiki.plugin.rightsmanager.RightsManagerGroupsApi

public class RightsManagerGroupsApi
extends Api

API for managing groups.

Since:
XWiki Core 1.1.2, XWiki Core 1.2M2
Version:
$Id: da14b5ecf6fdccb78cfac62033f489db77779dcf $

Field Summary
static String CONTEXT_LASTERRORCODE
          Field name of the last error code inserted in context.
static String CONTEXT_LASTEXCEPTION
          Field name of the last api exception inserted in context.
protected static org.slf4j.Logger LOGGER
          The logging toolkit.
 
Fields inherited from class com.xpn.xwiki.api.Api
context
 
Constructor Summary
RightsManagerGroupsApi(XWikiContext context)
          Create an instance of RightsManageRightsApi.
 
Method Summary
 int countAllGlobalGroups()
           
 int countAllGroups()
           
 int countAllLocalGroups()
           
 int countAllMatchedGlobalGroups(Map<?,?> matchFields)
           
 int countAllMatchedGroups(Map<?,?> matchFields)
           
 int countAllMatchedLocalGroups(Map<?,?> matchFields)
           
 int countAllMatchedWikiGroups(String wikiName, Map<?,?> matchFields)
          Get the number of groups in the provided wiki.
 int countAllWikiGroups(String wikiName)
          Get the number of groups in the provided wiki.
 List<Document> getAllGlobalGroups()
          Get all groups in the main wiki.
 List<Document> getAllGlobalGroups(int nb, int start)
          Get all groups in the main wiki.
 List<String> getAllGlobalGroupsNames()
          Get all groups names in the main wiki.
 List<String> getAllGlobalGroupsNames(int nb, int start)
          Get all groups names in the main wiki.
 List<Document> getAllGroups()
          Get all groups in the main wiki and the current wiki.
 List<Document> getAllGroups(int nb, int start)
          Get all groups in the main wiki and the current wiki.
 List<String> getAllGroupsNames()
          Get all groups names in the main wiki and the current wiki.
 List<String> getAllGroupsNames(int nb, int start)
          Get all groups names in the main wiki and the current wiki.
 List<Document> getAllLocalGroups()
          Get all groups in the current wiki.
 List<Document> getAllLocalGroups(int nb, int start)
          Get all groups in the current wiki.
 List<String> getAllLocalGroupsNames()
          Get all groups names in the current wiki.
 List<String> getAllLocalGroupsNames(int nb, int start)
          Get all groups names in the current wiki.
 List<Document> getAllMatchedGlobalGroups(Map<?,?> matchFields)
          Get all groups in the main wiki.
 List<Document> getAllMatchedGlobalGroups(Map<?,?> matchFields, int nb, int start)
          Get all groups in the main wiki.
 List<Document> getAllMatchedGlobalGroups(Map<?,?> matchFields, int nb, int start, List<?> order)
          Get all groups in the main wiki.
 List<String> getAllMatchedGlobalGroupsNames(Map<?,?> matchFields)
          Get all groups names in the main wiki.
 List<String> getAllMatchedGlobalGroupsNames(Map<?,?> matchFields, int nb, int start)
          Get all groups names in the main wiki.
 List<String> getAllMatchedGlobalGroupsNames(Map<?,?> matchFields, int nb, int start, List<?> order)
          Get all groups names in the main wiki.
 List<Document> getAllMatchedGroups(Map<?,?> matchFields)
          Get all groups in the main wiki and the current wiki.
 List<Document> getAllMatchedGroups(Map<?,?> matchFields, int nb, int start)
          Get all groups in the main wiki and the current wiki.
 List<Document> getAllMatchedGroups(Map<?,?> matchFields, int nb, int start, List<?> order)
          Get all groups in the main wiki and the current wiki.
 List<String> getAllMatchedGroupsNames(Map<?,?> matchFields)
          Get all groups names in the main wiki and the current wiki.
 List<String> getAllMatchedGroupsNames(Map<?,?> matchFields, int nb, int start)
          Get all groups names in the main wiki and the current wiki.
 List<String> getAllMatchedGroupsNames(Map<?,?> matchFields, int nb, int start, List<?> order)
          Get all groups names in the main wiki and the current wiki.
 List<Document> getAllMatchedLocalGroups(Map<?,?> matchFields)
          Get all groups in the current wiki.
 List<Document> getAllMatchedLocalGroups(Map<?,?> matchFields, int nb, int start)
          Get all groups in the current wiki.
 List<Document> getAllMatchedLocalGroups(Map<?,?> matchFields, int nb, int start, List<?> order)
          Get all groups in the current wiki.
 List<String> getAllMatchedLocalGroupsNames(Map<?,?> matchFields)
          Get all groups names in the current wiki.
 List<String> getAllMatchedLocalGroupsNames(Map<?,?> matchFields, int nb, int start)
          Get all groups names in the current wiki.
 List<String> getAllMatchedLocalGroupsNames(Map<?,?> matchFields, int nb, int start, List<?> order)
          Get all groups names in the current wiki.
 List<Document> getAllMatchedWikiGroups(String wikiName, Map<?,?> matchFields)
          Get all groups in the provided wiki.
 List<Document> getAllMatchedWikiGroups(String wikiName, Map<?,?> matchFields, int nb, int start)
          Get all groups in the provided wiki.
 List<Document> getAllMatchedWikiGroups(String wikiName, Map<?,?> matchFields, int nb, int start, List<?> order)
          Get all groups in the provided wiki.
 List<String> getAllMatchedWikiGroupsNames(String wikiName, Map<?,?> matchFields)
          Get all groups names in the provided wiki.
 List<String> getAllMatchedWikiGroupsNames(String wikiName, Map<?,?> matchFields, int nb, int start)
          Get all groups names in the provided wiki.
 List<String> getAllMatchedWikiGroupsNames(String wikiName, Map<?,?> matchFields, int nb, int start, List<?> order)
          Get all groups names in the provided wiki.
 List<Document> getAllWikiGroups(String wikiName)
          Get all groups in the provided wiki.
 List<Document> getAllWikiGroups(String wikiName, int nb, int start)
          Get all groups in the provided wiki.
 List<String> getAllWikiGroupsNames(String wikiName)
          Get all groups names in the provided wiki.
 List<String> getAllWikiGroupsNames(String wikiName, int nb, int start)
          Get all groups names in the provided wiki.
 
Methods inherited from class com.xpn.xwiki.api.Api
convert, convert, convert, convertAttachments, getXWikiContext, hasAccessLevel, hasAdminRights, hasProgrammingRights, hasWikiAdminRights
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONTEXT_LASTERRORCODE

public static final String CONTEXT_LASTERRORCODE
Field name of the last error code inserted in context.

See Also:
Constant Field Values

CONTEXT_LASTEXCEPTION

public static final String CONTEXT_LASTEXCEPTION
Field name of the last api exception inserted in context.

See Also:
Constant Field Values

LOGGER

protected static final org.slf4j.Logger LOGGER
The logging toolkit.

Constructor Detail

RightsManagerGroupsApi

public RightsManagerGroupsApi(XWikiContext context)
Create an instance of RightsManageRightsApi.

Parameters:
context - the XWiki context.
Method Detail

countAllGroups

public int countAllGroups()
                   throws XWikiException
Returns:
the number of groups in the current wiki.
Throws:
XWikiException - error when getting number of groups.

countAllMatchedGroups

public int countAllMatchedGroups(Map<?,?> matchFields)
                          throws XWikiException
Parameters:
matchFields - the fields to match. It is a Map with field name as key and for value :
  • "matching string" for document fields
  • or ["field type", "matching string"] for object fields
Returns:
the number of groups in the current wiki.
Throws:
XWikiException - error when getting number of groups.

countAllWikiGroups

public int countAllWikiGroups(String wikiName)
                       throws XWikiException
Get the number of groups in the provided wiki.

Parameters:
wikiName - the name of the wiki where to search for groups.
Returns:
the number of groups in the provided wiki.
Throws:
XWikiException - error when getting number of groups.

countAllMatchedWikiGroups

public int countAllMatchedWikiGroups(String wikiName,
                                     Map<?,?> matchFields)
                              throws XWikiException
Get the number of groups in the provided wiki.

Parameters:
wikiName - the name of the wiki where to search for groups.
matchFields - the fields to match. It is a Map with field name as key and for value :
  • "matching string" for document fields
  • or ["field type", "matching string"] for object fields
Returns:
the number of groups in the provided wiki.
Throws:
XWikiException - error when getting number of groups.

countAllGlobalGroups

public int countAllGlobalGroups()
                         throws XWikiException
Returns:
the number of groups in the main wiki.
Throws:
XWikiException - error when getting number of groups.

countAllMatchedGlobalGroups

public int countAllMatchedGlobalGroups(Map<?,?> matchFields)
                                throws XWikiException
Parameters:
matchFields - the fields to match. It is a Map with field name as key and for value :
  • "matching string" for document fields
  • or ["field type", "matching string"] for object fields
Returns:
the number of groups in the main wiki.
Throws:
XWikiException - error when getting number of groups.

countAllLocalGroups

public int countAllLocalGroups()
                        throws XWikiException
Returns:
the number of groups in the current wiki.
Throws:
XWikiException - error when getting number of groups.

countAllMatchedLocalGroups

public int countAllMatchedLocalGroups(Map<?,?> matchFields)
                               throws XWikiException
Parameters:
matchFields - the fields to match. It is a Map with field name as key and for value :
  • "matching string" for document fields
  • or ["field type", "matching string"] for object fields
Returns:
the number of groups in the current wiki.
Throws:
XWikiException - error when getting number of groups.

getAllGroupsNames

public List<String> getAllGroupsNames(int nb,
                                      int start)
                               throws XWikiException
Get all groups names in the main wiki and the current wiki.

Parameters:
nb - the maximum number of result to return.
start - the index of the first found group to return.
Returns:
a List of String containing group names.
Throws:
XWikiException - error when searching for groups.

getAllGroupsNames

public List<String> getAllGroupsNames()
                               throws XWikiException
Get all groups names in the main wiki and the current wiki.

Returns:
a List of String containing group names.
Throws:
XWikiException - error when searching for groups.

getAllMatchedGroupsNames

public List<String> getAllMatchedGroupsNames(Map<?,?> matchFields)
                                      throws XWikiException
Get all groups names in the main wiki and the current wiki.

Parameters:
matchFields - the fields to match. It is a Map with field name as key and for value :
  • "matching string" for document fields
  • or ["field type", "matching string"] for object fields
Returns:
a List of String containing group names.
Throws:
XWikiException - error when searching for groups.

getAllMatchedGroupsNames

public List<String> getAllMatchedGroupsNames(Map<?,?> matchFields,
                                             int nb,
                                             int start)
                                      throws XWikiException
Get all groups names in the main wiki and the current wiki.

Parameters:
matchFields - the fields to match. It is a Map with field name as key and for value :
  • "matching string" for document fields
  • or ["field type", "matching string"] for object fields
nb - the maximum number of result to return.
start - the index of the first found group to return.
Returns:
a List of String containing group names.
Throws:
XWikiException - error when searching for groups.

getAllMatchedGroupsNames

public List<String> getAllMatchedGroupsNames(Map<?,?> matchFields,
                                             int nb,
                                             int start,
                                             List<?> order)
                                      throws XWikiException
Get all groups names in the main wiki and the current wiki.

Parameters:
matchFields - the fields to match. It is a Map with field name as key and for value :
  • "matching string" for document fields
  • or ["field type", "matching string"] for object fields
nb - the maximum number of result to return.
start - the index of the first found group to return.
order - the fields to order from. It is a List containing :
  • "field name" for document fields
  • or ["filed name", "field type"] for object fields
Returns:
a List of String containing group names.
Throws:
XWikiException - error when searching for groups.

getAllGlobalGroupsNames

public List<String> getAllGlobalGroupsNames(int nb,
                                            int start)
                                     throws XWikiException
Get all groups names in the main wiki.

Parameters:
nb - the maximum number of result to return.
start - the index of the first found group to return.
Returns:
a List of String containing group names.
Throws:
XWikiException - error when searching for groups.

getAllGlobalGroupsNames

public List<String> getAllGlobalGroupsNames()
                                     throws XWikiException
Get all groups names in the main wiki.

Returns:
a List of String containing group names.
Throws:
XWikiException - error when searching for groups.

getAllMatchedGlobalGroupsNames

public List<String> getAllMatchedGlobalGroupsNames(Map<?,?> matchFields)
                                            throws XWikiException
Get all groups names in the main wiki.

Parameters:
matchFields - the fields to match. It is a Map with field name as key and for value :
  • "matching string" for document fields
  • or ["field type", "matching string"] for object fields
Returns:
a List of String containing group names.
Throws:
XWikiException - error when searching for groups.

getAllMatchedGlobalGroupsNames

public List<String> getAllMatchedGlobalGroupsNames(Map<?,?> matchFields,
                                                   int nb,
                                                   int start)
                                            throws XWikiException
Get all groups names in the main wiki.

Parameters:
matchFields - the fields to match. It is a Map with field name as key and for value :
  • "matching string" for document fields
  • or ["field type", "matching string"] for object fields
nb - the maximum number of result to return.
start - the index of the first found group to return.
Returns:
a List of String containing group names.
Throws:
XWikiException - error when searching for groups.

getAllMatchedGlobalGroupsNames

public List<String> getAllMatchedGlobalGroupsNames(Map<?,?> matchFields,
                                                   int nb,
                                                   int start,
                                                   List<?> order)
                                            throws XWikiException
Get all groups names in the main wiki.

Parameters:
matchFields - the fields to match. It is a Map with field name as key and for value :
  • "matching string" for document fields
  • or ["field type", "matching string"] for object fields
nb - the maximum number of result to return.
start - the index of the first found group to return.
order - the fields to order from. It is a List containing :
  • "field name" for document fields
  • or ["filed name", "field type"] for object fields
Returns:
a List of String containing group names.
Throws:
XWikiException - error when searching for groups.

getAllWikiGroupsNames

public List<String> getAllWikiGroupsNames(String wikiName,
                                          int nb,
                                          int start)
                                   throws XWikiException
Get all groups names in the provided wiki.

Parameters:
wikiName - the name of the wiki where to search.
nb - the maximum number of result to return.
start - the index of the first found group to return.
Returns:
a List of String containing group names.
Throws:
XWikiException - error when searching for groups.

getAllWikiGroupsNames

public List<String> getAllWikiGroupsNames(String wikiName)
                                   throws XWikiException
Get all groups names in the provided wiki.

Parameters:
wikiName - the name of the wiki where to search.
Returns:
a List of String containing group names.
Throws:
XWikiException - error when searching for groups.

getAllMatchedWikiGroupsNames

public List<String> getAllMatchedWikiGroupsNames(String wikiName,
                                                 Map<?,?> matchFields)
                                          throws XWikiException
Get all groups names in the provided wiki.

Parameters:
wikiName - the name of the wiki where to search.
matchFields - the fields to match. It is a Map with field name as key and for value :
  • "matching string" for document fields
  • or ["field type", "matching string"] for object fields
Returns:
a List of String containing group names.
Throws:
XWikiException - error when searching for groups.

getAllMatchedWikiGroupsNames

public List<String> getAllMatchedWikiGroupsNames(String wikiName,
                                                 Map<?,?> matchFields,
                                                 int nb,
                                                 int start)
                                          throws XWikiException
Get all groups names in the provided wiki.

Parameters:
wikiName - the name of the wiki where to search.
matchFields - the fields to match. It is a Map with field name as key and for value :
  • "matching string" for document fields
  • or ["field type", "matching string"] for object fields
nb - the maximum number of result to return.
start - the index of the first found group to return.
Returns:
a List of String containing group names.
Throws:
XWikiException - error when searching for groups.

getAllMatchedWikiGroupsNames

public List<String> getAllMatchedWikiGroupsNames(String wikiName,
                                                 Map<?,?> matchFields,
                                                 int nb,
                                                 int start,
                                                 List<?> order)
                                          throws XWikiException
Get all groups names in the provided wiki.

Parameters:
wikiName - the name of the wiki where to search.
matchFields - the fields to match. It is a Map with field name as key and for value :
  • "matching string" for document fields
  • or ["field type", "matching string"] for object fields
nb - the maximum number of result to return.
start - the index of the first found group to return.
order - the fields to order from. It is a List containing :
  • "field name" for document fields
  • or ["filed name", "field type"] for object fields
Returns:
a List of String containing group names.
Throws:
XWikiException - error when searching for groups.

getAllLocalGroupsNames

public List<String> getAllLocalGroupsNames(int nb,
                                           int start)
                                    throws XWikiException
Get all groups names in the current wiki.

Parameters:
nb - the maximum number of result to return.
start - the index of the first found group to return.
Returns:
a List of String containing group names.
Throws:
XWikiException - error when searching for groups.

getAllLocalGroupsNames

public List<String> getAllLocalGroupsNames()
                                    throws XWikiException
Get all groups names in the current wiki.

Returns:
a List of String containing group names.
Throws:
XWikiException - error when searching for groups.

getAllMatchedLocalGroupsNames

public List<String> getAllMatchedLocalGroupsNames(Map<?,?> matchFields)
                                           throws XWikiException
Get all groups names in the current wiki.

Parameters:
matchFields - the fields to match. It is a Map with field name as key and for value :
  • "matching string" for document fields
  • or ["field type", "matching string"] for object fields
Returns:
a List of String containing group names.
Throws:
XWikiException - error when searching for groups.

getAllMatchedLocalGroupsNames

public List<String> getAllMatchedLocalGroupsNames(Map<?,?> matchFields,
                                                  int nb,
                                                  int start)
                                           throws XWikiException
Get all groups names in the current wiki.

Parameters:
matchFields - the fields to match. It is a Map with field name as key and for value :
  • "matching string" for document fields
  • or ["field type", "matching string"] for object fields
nb - the maximum number of result to return.
start - the index of the first found group to return.
Returns:
a List of String containing group names.
Throws:
XWikiException - error when searching for groups.

getAllMatchedLocalGroupsNames

public List<String> getAllMatchedLocalGroupsNames(Map<?,?> matchFields,
                                                  int nb,
                                                  int start,
                                                  List<?> order)
                                           throws XWikiException
Get all groups names in the current wiki.

Parameters:
matchFields - the fields to match. It is a Map with field name as key and for value :
  • "matching string" for document fields
  • or ["field type", "matching string"] for object fields
nb - the maximum number of result to return.
start - the index of the first found group to return.
order - the fields to order from. It is a List containing :
  • "field name" for document fields
  • or ["filed name", "field type"] for object fields
Returns:
a List of String containing group names.
Throws:
XWikiException - error when searching for groups.

getAllGroups

public List<Document> getAllGroups(int nb,
                                   int start)
                            throws XWikiException
Get all groups in the main wiki and the current wiki.

Parameters:
nb - the maximum number of result to return.
start - the index of the first found group to return.
Returns:
a List of Document containing group.
Throws:
XWikiException - error when searching for groups.

getAllGroups

public List<Document> getAllGroups()
                            throws XWikiException
Get all groups in the main wiki and the current wiki.

Returns:
a List of Document containing group.
Throws:
XWikiException - error when searching for groups.

getAllMatchedGroups

public List<Document> getAllMatchedGroups(Map<?,?> matchFields)
                                   throws XWikiException
Get all groups in the main wiki and the current wiki.

Parameters:
matchFields - the fields to match. It is a Map with field name as key and for value :
  • "matching string" for document fields
  • or ["field type", "matching string"] for object fields
Returns:
a List of Document containing group.
Throws:
XWikiException - error when searching for groups.

getAllMatchedGroups

public List<Document> getAllMatchedGroups(Map<?,?> matchFields,
                                          int nb,
                                          int start)
                                   throws XWikiException
Get all groups in the main wiki and the current wiki.

Parameters:
matchFields - the fields to match. It is a Map with field name as key and for value :
  • "matching string" for document fields
  • or ["field type", "matching string"] for object fields
nb - the maximum number of result to return.
start - the index of the first found group to return.
Returns:
a List of Document containing group.
Throws:
XWikiException - error when searching for groups.

getAllMatchedGroups

public List<Document> getAllMatchedGroups(Map<?,?> matchFields,
                                          int nb,
                                          int start,
                                          List<?> order)
                                   throws XWikiException
Get all groups in the main wiki and the current wiki.

Parameters:
matchFields - the fields to match. It is a Map with field name as key and for value :
  • "matching string" for document fields
  • or ["field type", "matching string"] for object fields
nb - the maximum number of result to return.
start - the index of the first found group to return.
order - the fields to order from. It is a List containing :
  • "field name" for document fields
  • or ["filed name", "field type"] for object fields
Returns:
a List of Document containing group.
Throws:
XWikiException - error when searching for groups.

getAllGlobalGroups

public List<Document> getAllGlobalGroups(int nb,
                                         int start)
                                  throws XWikiException
Get all groups in the main wiki.

Parameters:
nb - the maximum number of result to return.
start - the index of the first found group to return.
Returns:
a List of Document containing group.
Throws:
XWikiException - error when searching for groups.

getAllGlobalGroups

public List<Document> getAllGlobalGroups()
                                  throws XWikiException
Get all groups in the main wiki.

Returns:
a List of Document containing group.
Throws:
XWikiException - error when searching for groups.

getAllMatchedGlobalGroups

public List<Document> getAllMatchedGlobalGroups(Map<?,?> matchFields)
                                         throws XWikiException
Get all groups in the main wiki.

Parameters:
matchFields - the fields to match. It is a Map with field name as key and for value :
  • "matching string" for document fields
  • or ["field type", "matching string"] for object fields
Returns:
a List of Document containing group.
Throws:
XWikiException - error when searching for groups.

getAllMatchedGlobalGroups

public List<Document> getAllMatchedGlobalGroups(Map<?,?> matchFields,
                                                int nb,
                                                int start)
                                         throws XWikiException
Get all groups in the main wiki.

Parameters:
matchFields - the fields to match. It is a Map with field name as key and for value :
  • "matching string" for document fields
  • or ["field type", "matching string"] for object fields
nb - the maximum number of result to return.
start - the index of the first found group to return.
Returns:
a List of Document containing group.
Throws:
XWikiException - error when searching for groups.

getAllMatchedGlobalGroups

public List<Document> getAllMatchedGlobalGroups(Map<?,?> matchFields,
                                                int nb,
                                                int start,
                                                List<?> order)
                                         throws XWikiException
Get all groups in the main wiki.

Parameters:
matchFields - the fields to match. It is a Map with field name as key and for value :
  • "matching string" for document fields
  • or ["field type", "matching string"] for object fields
nb - the maximum number of result to return.
start - the index of the first found group to return.
order - the fields to order from. It is a List containing :
  • "field name" for document fields
  • or ["filed name", "field type"] for object fields
Returns:
a List of Document containing group.
Throws:
XWikiException - error when searching for groups.

getAllWikiGroups

public List<Document> getAllWikiGroups(String wikiName,
                                       int nb,
                                       int start)
                                throws XWikiException
Get all groups in the provided wiki.

Parameters:
wikiName - the name of the wiki where to search.
nb - the maximum number of result to return.
start - the index of the first found group to return.
Returns:
a List of Document containing group.
Throws:
XWikiException - error when searching for groups.

getAllWikiGroups

public List<Document> getAllWikiGroups(String wikiName)
                                throws XWikiException
Get all groups in the provided wiki.

Parameters:
wikiName - the name of the wiki where to search.
Returns:
a List of Document containing group.
Throws:
XWikiException - error when searching for groups.

getAllMatchedWikiGroups

public List<Document> getAllMatchedWikiGroups(String wikiName,
                                              Map<?,?> matchFields)
                                       throws XWikiException
Get all groups in the provided wiki.

Parameters:
wikiName - the name of the wiki where to search.
matchFields - the fields to match. It is a Map with field name as key and for value :
  • "matching string" for document fields
  • or ["field type", "matching string"] for object fields
Returns:
a List of Document containing group.
Throws:
XWikiException - error when searching for groups.

getAllMatchedWikiGroups

public List<Document> getAllMatchedWikiGroups(String wikiName,
                                              Map<?,?> matchFields,
                                              int nb,
                                              int start)
                                       throws XWikiException
Get all groups in the provided wiki.

Parameters:
wikiName - the name of the wiki where to search.
matchFields - the fields to match. It is a Map with field name as key and for value :
  • "matching string" for document fields
  • or ["field type", "matching string"] for object fields
nb - the maximum number of result to return.
start - the index of the first found group to return.
Returns:
a List of Document containing group.
Throws:
XWikiException - error when searching for groups.

getAllMatchedWikiGroups

public List<Document> getAllMatchedWikiGroups(String wikiName,
                                              Map<?,?> matchFields,
                                              int nb,
                                              int start,
                                              List<?> order)
                                       throws XWikiException
Get all groups in the provided wiki.

Parameters:
wikiName - the name of the wiki where to search.
matchFields - the fields to match. It is a Map with field name as key and for value :
  • "matching string" for document fields
  • or ["field type", "matching string"] for object fields
nb - the maximum number of result to return.
start - the index of the first found group to return.
order - the fields to order from. It is a List containing :
  • "field name" for document fields
  • or ["filed name", "field type"] for object fields
Returns:
a List of Document containing group.
Throws:
XWikiException - error when searching for groups.

getAllLocalGroups

public List<Document> getAllLocalGroups(int nb,
                                        int start)
                                 throws XWikiException
Get all groups in the current wiki.

Parameters:
nb - the maximum number of result to return.
start - the index of the first found group to return.
Returns:
a List of Document containing group.
Throws:
XWikiException - error when searching for groups.

getAllLocalGroups

public List<Document> getAllLocalGroups()
                                 throws XWikiException
Get all groups in the current wiki.

Returns:
a List of Document containing group.
Throws:
XWikiException - error when searching for groups.

getAllMatchedLocalGroups

public List<Document> getAllMatchedLocalGroups(Map<?,?> matchFields)
                                        throws XWikiException
Get all groups in the current wiki.

Parameters:
matchFields - the fields to match. It is a Map with field name as key and for value :
  • "matching string" for document fields
  • or ["field type", "matching string"] for object fields
Returns:
a List of Document containing group.
Throws:
XWikiException - error when searching for groups.

getAllMatchedLocalGroups

public List<Document> getAllMatchedLocalGroups(Map<?,?> matchFields,
                                               int nb,
                                               int start)
                                        throws XWikiException
Get all groups in the current wiki.

Parameters:
matchFields - the fields to match. It is a Map with field name as key and for value :
  • "matching string" for document fields
  • or ["field type", "matching string"] for object fields
nb - the maximum number of result to return.
start - the index of the first found group to return.
Returns:
a List of Document containing group.
Throws:
XWikiException - error when searching for groups.

getAllMatchedLocalGroups

public List<Document> getAllMatchedLocalGroups(Map<?,?> matchFields,
                                               int nb,
                                               int start,
                                               List<?> order)
                                        throws XWikiException
Get all groups in the current wiki.

Parameters:
matchFields - the fields to match. It is a Map with field name as key and for value :
  • "matching string" for document fields
  • or ["field type", "matching string"] for object fields
nb - the maximum number of result to return.
start - the index of the first found group to return.
order - the fields to order from. It is a List containing :
  • "field name" for document fields
  • or ["filed name", "field type"] for object fields
Returns:
a List of Document containing group.
Throws:
XWikiException - error when searching for groups.


Copyright © 2004–2014 XWiki. All rights reserved.