com.xpn.xwiki.plugin.rightsmanager
Class RightsManagerUsersApi

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

public class RightsManagerUsersApi
extends Api

API for managing users.

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

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
RightsManagerUsersApi(XWikiContext context)
          Create an instance of RightsManageRightsApi.
 
Method Summary
 int countAllGlobalUsers()
           
 int countAllLocalUsers()
           
 int countAllMatchedGlobalUsers(Map<?,?> matchFields)
           
 int countAllMatchedLocalUsers(Map<?,?> matchFields)
           
 int countAllMatchedUsers(Map<?,?> matchFields)
           
 int countAllMatchedWikiUsers(String wikiName, Map<?,?> matchFields)
          Get the number of users in the provided wiki.
 int countAllUsers()
           
 int countAllWikiUsers(String wikiName)
          Get the number of users in the provided wiki.
 List<Document> getAllGlobalUsers()
          Get all users in the main wiki.
 List<Document> getAllGlobalUsers(int nb, int start)
          Get all users in the main wiki.
 List<String> getAllGlobalUsersNames()
          Get all users names in the main wiki.
 List<String> getAllGlobalUsersNames(int nb, int start)
          Get all users names in the main wiki.
 List<Document> getAllLocalUsers()
          Get all users in the current wiki.
 List<Document> getAllLocalUsers(int nb, int start)
          Get all users in the current wiki.
 List<String> getAllLocalUsersNames()
          Get all users names in the current wiki.
 List<String> getAllLocalUsersNames(int nb, int start)
          Get all users names in the current wiki.
 List<Document> getAllMatchedGlobalUsers(Map<?,?> matchFields)
          Get all users in the main wiki.
 List<Document> getAllMatchedGlobalUsers(Map<?,?> matchFields, int nb, int start)
          Get all users in the main wiki.
 List<Document> getAllMatchedGlobalUsers(Map<?,?> matchFields, int nb, int start, List<?> order)
          Get all users in the main wiki.
 List<String> getAllMatchedGlobalUsersNames(Map<?,?> matchFields)
          Get all users names in the main wiki.
 List<String> getAllMatchedGlobalUsersNames(Map<?,?> matchFields, int nb, int start)
          Get all users names in the main wiki.
 List<String> getAllMatchedGlobalUsersNames(Map<?,?> matchFields, int nb, int start, List<?> order)
          Get all users names in the main wiki.
 List<Document> getAllMatchedLocalUsers(Map<?,?> matchFields)
          Get all users in the current wiki.
 List<Document> getAllMatchedLocalUsers(Map<?,?> matchFields, int nb, int start)
          Get all users in the current wiki.
 List<Document> getAllMatchedLocalUsers(Map<?,?> matchFields, int nb, int start, List<?> order)
          Get all users in the current wiki.
 List<String> getAllMatchedLocalUsersNames(Map<?,?> matchFields)
          Get all users names in the current wiki.
 List<String> getAllMatchedLocalUsersNames(Map<?,?> matchFields, int nb, int start)
          Get all users names in the current wiki.
 List<String> getAllMatchedLocalUsersNames(Map<?,?> matchFields, int nb, int start, List<?> order)
          Get all users names in the current wiki.
 List<Document> getAllMatchedUsers(Map<?,?> matchFields)
          Get all users in the main wiki and the current wiki.
 List<Document> getAllMatchedUsers(Map<?,?> matchFields, int nb, int start)
          Get all users in the main wiki and the current wiki.
 List<Document> getAllMatchedUsers(Map<?,?> matchFields, int nb, int start, List<?> order)
          Get all users in the main wiki and the current wiki.
 List<String> getAllMatchedUsersNames(Map<?,?> matchFields)
          Get all users names in the main wiki and the current wiki.
 List<String> getAllMatchedUsersNames(Map<?,?> matchFields, int nb, int start)
          Get all users names in the main wiki and the current wiki.
 List<String> getAllMatchedUsersNames(Map<?,?> matchFields, int nb, int start, List<?> order)
          Get all users names in the main wiki and the current wiki.
 List<Document> getAllMatchedWikiUsers(String wikiName, Map<?,?> matchFields)
          Get all users in the provided wiki.
 List<Document> getAllMatchedWikiUsers(String wikiName, Map<?,?> matchFields, int nb, int start)
          Get all users in the provided wiki.
 List<Document> getAllMatchedWikiUsers(String wikiName, Map<?,?> matchFields, int nb, int start, List<?> order)
          Get all users in the provided wiki.
 List<String> getAllMatchedWikiUsersNames(String wikiName, Map<?,?> matchFields)
          Get all users names in the provided wiki.
 List<String> getAllMatchedWikiUsersNames(String wikiName, Map<?,?> matchFields, int nb, int start)
          Get all users names in the provided wiki.
 List<String> getAllMatchedWikiUsersNames(String wikiName, Map<?,?> matchFields, int nb, int start, List<?> order)
          Get all users names in the provided wiki.
 List<Document> getAllUsers()
          Get all users in the main wiki and the current wiki.
 List<Document> getAllUsers(int nb, int start)
          Get all users in the main wiki and the current wiki.
 List<String> getAllUsersNames()
          Get all users names in the main wiki and the current wiki.
 List<String> getAllUsersNames(int nb, int start)
          Get all users names in the main wiki and the current wiki.
 List<Document> getAllWikiUsers(String wikiName)
          Get all users in the provided wiki.
 List<Document> getAllWikiUsers(String wikiName, int nb, int start)
          Get all users in the provided wiki.
 List<String> getAllWikiUsersNames(String wikiName)
          Get all users names in the provided wiki.
 List<String> getAllWikiUsersNames(String wikiName, int nb, int start)
          Get all users 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

RightsManagerUsersApi

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

Parameters:
context - the XWiki context.
Method Detail

countAllUsers

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

countAllMatchedUsers

public int countAllMatchedUsers(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 users in the current wiki.
Throws:
XWikiException - error when getting number of users.

countAllWikiUsers

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

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

countAllMatchedWikiUsers

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

Parameters:
wikiName - the name of the wiki where to search for users.
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 users in the provided wiki.
Throws:
XWikiException - error when getting number of users.

countAllGlobalUsers

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

countAllMatchedGlobalUsers

public int countAllMatchedGlobalUsers(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 users in the main wiki.
Throws:
XWikiException - error when getting number of users.

countAllLocalUsers

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

countAllMatchedLocalUsers

public int countAllMatchedLocalUsers(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 users in the current wiki.
Throws:
XWikiException - error when getting number of users.

getAllUsersNames

public List<String> getAllUsersNames(int nb,
                                     int start)
                              throws XWikiException
Get all users 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 user to return.
Returns:
a List of String containing user names.
Throws:
XWikiException - error when searching for users.

getAllUsersNames

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

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

getAllMatchedUsersNames

public List<String> getAllMatchedUsersNames(Map<?,?> matchFields)
                                     throws XWikiException
Get all users 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 user names.
Throws:
XWikiException - error when searching for users.

getAllMatchedUsersNames

public List<String> getAllMatchedUsersNames(Map<?,?> matchFields,
                                            int nb,
                                            int start)
                                     throws XWikiException
Get all users 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 user to return.
Returns:
a List of String containing user names.
Throws:
XWikiException - error when searching for users.

getAllMatchedUsersNames

public List<String> getAllMatchedUsersNames(Map<?,?> matchFields,
                                            int nb,
                                            int start,
                                            List<?> order)
                                     throws XWikiException
Get all users 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 user 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 user names.
Throws:
XWikiException - error when searching for users.

getAllGlobalUsersNames

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

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

getAllGlobalUsersNames

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

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

getAllMatchedGlobalUsersNames

public List<String> getAllMatchedGlobalUsersNames(Map<?,?> matchFields)
                                           throws XWikiException
Get all users 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 user names.
Throws:
XWikiException - error when searching for users.

getAllMatchedGlobalUsersNames

public List<String> getAllMatchedGlobalUsersNames(Map<?,?> matchFields,
                                                  int nb,
                                                  int start)
                                           throws XWikiException
Get all users 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 user to return.
Returns:
a List of String containing user names.
Throws:
XWikiException - error when searching for users.

getAllMatchedGlobalUsersNames

public List<String> getAllMatchedGlobalUsersNames(Map<?,?> matchFields,
                                                  int nb,
                                                  int start,
                                                  List<?> order)
                                           throws XWikiException
Get all users 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 user 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 user names.
Throws:
XWikiException - error when searching for users.

getAllWikiUsersNames

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

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

getAllWikiUsersNames

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

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

getAllMatchedWikiUsersNames

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

Parameters:
wikiName - the wiki where to search for users.
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 user names.
Throws:
XWikiException - error when searching for users.

getAllMatchedWikiUsersNames

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

Parameters:
wikiName - the wiki where to search for users.
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 user to return.
Returns:
a List of String containing user names.
Throws:
XWikiException - error when searching for users.

getAllMatchedWikiUsersNames

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

Parameters:
wikiName - the wiki where to search for users.
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 user 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 user names.
Throws:
XWikiException - error when searching for users.

getAllLocalUsersNames

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

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

getAllLocalUsersNames

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

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

getAllMatchedLocalUsersNames

public List<String> getAllMatchedLocalUsersNames(Map<?,?> matchFields)
                                          throws XWikiException
Get all users 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 user names.
Throws:
XWikiException - error when searching for users.

getAllMatchedLocalUsersNames

public List<String> getAllMatchedLocalUsersNames(Map<?,?> matchFields,
                                                 int nb,
                                                 int start)
                                          throws XWikiException
Get all users 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 user to return.
Returns:
a List of String containing user names.
Throws:
XWikiException - error when searching for users.

getAllMatchedLocalUsersNames

public List<String> getAllMatchedLocalUsersNames(Map<?,?> matchFields,
                                                 int nb,
                                                 int start,
                                                 List<?> order)
                                          throws XWikiException
Get all users 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 user 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
of String containing user names.
Returns:
a List of String containing user names.
Throws:
XWikiException - error when searching for users.

getAllUsers

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

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

getAllUsers

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

Returns:
a List of Document containing user.
Throws:
XWikiException - error when searching for users.

getAllMatchedUsers

public List<Document> getAllMatchedUsers(Map<?,?> matchFields)
                                  throws XWikiException
Get all users 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 user.
Throws:
XWikiException - error when searching for users.

getAllMatchedUsers

public List<Document> getAllMatchedUsers(Map<?,?> matchFields,
                                         int nb,
                                         int start)
                                  throws XWikiException
Get all users 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 user to return.
Returns:
a List of Document containing user.
Throws:
XWikiException - error when searching for users.

getAllMatchedUsers

public List<Document> getAllMatchedUsers(Map<?,?> matchFields,
                                         int nb,
                                         int start,
                                         List<?> order)
                                  throws XWikiException
Get all users 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 user 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 user.
Throws:
XWikiException - error when searching for users.

getAllGlobalUsers

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

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

getAllGlobalUsers

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

Returns:
a List of Document containing user.
Throws:
XWikiException - error when searching for users.

getAllMatchedGlobalUsers

public List<Document> getAllMatchedGlobalUsers(Map<?,?> matchFields)
                                        throws XWikiException
Get all users 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 user.
Throws:
XWikiException - error when searching for users.

getAllMatchedGlobalUsers

public List<Document> getAllMatchedGlobalUsers(Map<?,?> matchFields,
                                               int nb,
                                               int start)
                                        throws XWikiException
Get all users 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 user to return.
Returns:
a List of Document containing user.
Throws:
XWikiException - error when searching for users.

getAllMatchedGlobalUsers

public List<Document> getAllMatchedGlobalUsers(Map<?,?> matchFields,
                                               int nb,
                                               int start,
                                               List<?> order)
                                        throws XWikiException
Get all users 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 user 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 user.
Throws:
XWikiException - error when searching for users.

getAllWikiUsers

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

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

getAllWikiUsers

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

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

getAllMatchedWikiUsers

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

Parameters:
wikiName - the wiki where to search for users.
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 user.
Throws:
XWikiException - error when searching for users.

getAllMatchedWikiUsers

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

Parameters:
wikiName - the wiki where to search for users.
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 user to return.
Returns:
a List of Document containing user.
Throws:
XWikiException - error when searching for users.

getAllMatchedWikiUsers

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

Parameters:
wikiName - the wiki where to search for users.
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 user 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 user.
Throws:
XWikiException - error when searching for users.

getAllLocalUsers

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

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

getAllLocalUsers

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

Returns:
a List of Document containing user.
Throws:
XWikiException - error when searching for users.

getAllMatchedLocalUsers

public List<Document> getAllMatchedLocalUsers(Map<?,?> matchFields)
                                       throws XWikiException
Get all users 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 user.
Throws:
XWikiException - error when searching for users.

getAllMatchedLocalUsers

public List<Document> getAllMatchedLocalUsers(Map<?,?> matchFields,
                                              int nb,
                                              int start)
                                       throws XWikiException
Get all users 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 user to return.
Returns:
a List of Document containing user.
Throws:
XWikiException - error when searching for users.

getAllMatchedLocalUsers

public List<Document> getAllMatchedLocalUsers(Map<?,?> matchFields,
                                              int nb,
                                              int start,
                                              List<?> order)
                                       throws XWikiException
Get all users 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 user 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 user.
Throws:
XWikiException - error when searching for users.


Copyright © 2004–2014 XWiki. All rights reserved.