Class RightsManagerGroupsApi
- java.lang.Object
-
- com.xpn.xwiki.api.Api
-
- com.xpn.xwiki.plugin.rightsmanager.RightsManagerGroupsApi
-
public class RightsManagerGroupsApi extends Api
API for managing groups.- Since:
- 1.1.2, 1.2M2
- Version:
- $Id: 85196f043c77762bed7e34435f41a003ccf1f1db $
-
-
Field Summary
Fields Modifier and Type Field Description static StringCONTEXT_LASTERRORCODEField name of the last error code inserted in context.static StringCONTEXT_LASTEXCEPTIONField name of the last api exception inserted in context.protected static org.slf4j.LoggerLOGGERThe logging toolkit.
-
Constructor Summary
Constructors Constructor Description RightsManagerGroupsApi(XWikiContext context)Create an instance of RightsManageRightsApi.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcountAllGlobalGroups()intcountAllGroups()intcountAllLocalGroups()intcountAllMatchedGlobalGroups(Map<?,?> matchFields)intcountAllMatchedGroups(Map<?,?> matchFields)intcountAllMatchedLocalGroups(Map<?,?> matchFields)intcountAllMatchedWikiGroups(String wikiName, Map<?,?> matchFields)Get the number of groups in the provided wiki.intcountAllWikiGroups(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, 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
-
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
ListofStringcontaining 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
ListofStringcontaining 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
ListofStringcontaining 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
ListofStringcontaining 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
ListofStringcontaining 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
ListofStringcontaining 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
ListofStringcontaining 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
ListofStringcontaining 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
ListofStringcontaining 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
ListofStringcontaining 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
ListofStringcontaining 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
ListofStringcontaining 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
ListofStringcontaining 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
ListofStringcontaining 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
ListofStringcontaining 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
ListofStringcontaining 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
ListofStringcontaining 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
ListofStringcontaining 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
ListofStringcontaining 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
ListofStringcontaining 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
ListofDocumentcontaining 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
ListofDocumentcontaining 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
ListofDocumentcontaining 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
ListofDocumentcontaining 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
ListofDocumentcontaining 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
ListofDocumentcontaining group. - Throws:
XWikiException- error when searching for groups.
-
getAllGlobalGroups
public List<Document> getAllGlobalGroups() throws XWikiException
Get all groups in the main wiki.- Returns:
- a
ListofDocumentcontaining 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
ListofDocumentcontaining 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
ListofDocumentcontaining 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
ListofDocumentcontaining 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
ListofDocumentcontaining 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
ListofDocumentcontaining 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
ListofDocumentcontaining 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
ListofDocumentcontaining 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
ListofDocumentcontaining 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
ListofDocumentcontaining group. - Throws:
XWikiException- error when searching for groups.
-
getAllLocalGroups
public List<Document> getAllLocalGroups() throws XWikiException
Get all groups in the current wiki.- Returns:
- a
ListofDocumentcontaining 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
ListofDocumentcontaining 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
ListofDocumentcontaining 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
ListofDocumentcontaining group. - Throws:
XWikiException- error when searching for groups.
-
-