Class RightsManagerUsersApi
- java.lang.Object
-
- com.xpn.xwiki.api.Api
-
- com.xpn.xwiki.plugin.rightsmanager.RightsManagerUsersApi
-
public class RightsManagerUsersApi extends Api
API for managing users.- Since:
- 1.1.2, 1.2M2
- Version:
- $Id: bed42a54ae09900e63f5f618f4784881f9999a01 $
-
-
Field Summary
Fields Modifier and Type Field Description 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.
-
Constructor Summary
Constructors Constructor Description RightsManagerUsersApi(XWikiContext context)
Create an instance of RightsManageRightsApi.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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, getAuthorizationManager, getContextualAuthorizationManager, getXWikiContext, hasAccess, hasAccessLevel, hasAdminRights, hasProgrammingRights, hasWikiAdminRights
-
-
-
-
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
ofString
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
ofString
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
ofString
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
ofString
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
ofString
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
ofString
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
ofString
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
ofString
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
ofString
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
ofString
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
ofString
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
ofString
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
ofString
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
ofString
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
ofString
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
ofString
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
ofString
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
ofString
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
ofString
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
String
containing user names.- Returns:
- a
List
ofString
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
ofDocument
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
ofDocument
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
ofDocument
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
ofDocument
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
ofDocument
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
ofDocument
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
ofDocument
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
ofDocument
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
ofDocument
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
ofDocument
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
ofDocument
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
ofDocument
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
ofDocument
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
ofDocument
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
ofDocument
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
ofDocument
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
ofDocument
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
ofDocument
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
ofDocument
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
ofDocument
containing user. - Throws:
XWikiException
- error when searching for users.
-
-