public interface XWikiGroupService
Modifier and Type | Method and Description |
---|---|
void |
addUserToGroup(String user,
String database,
String group,
XWikiContext context)
Deprecated.
should never be used ! There is a listener taking care of that automatically.
|
int |
countAllGroupsNamesForMember(String member,
XWikiContext context)
Return the number of groups containing provided member.
|
int |
countAllMatchedGroups(Object[][] matchFields,
XWikiContext context)
Return number of groups with provided constraints.
|
default int |
countAllMatchedMembersNamesForGroup(String group,
String filter,
XWikiContext xcontext)
Filters the members of the specified group using the given text and counts the results.
|
int |
countAllMatchedUsers(Object[][] matchFields,
XWikiContext context)
Return number of users with provided constraints.
|
int |
countAllMembersNamesForGroup(String group,
XWikiContext context)
Return the number of members provided group contains.
|
void |
flushCache()
Deprecated.
since 10.8RC1, use GroupManager component instead
|
Collection<String> |
getAllGroupsNamesForMember(String member,
int nb,
int start,
XWikiContext context)
Get all groups containing provided member in the provided member wiki.
|
Collection<DocumentReference> |
getAllGroupsReferencesForMember(DocumentReference memberReference,
int limit,
int offset,
XWikiContext context)
Get all groups containing provided member in the current wiki.
|
List<?> |
getAllMatchedGroups(Object[][] matchFields,
boolean withdetails,
int nb,
int start,
Object[][] order,
XWikiContext context)
Search for all groups with provided constraints and in a provided order.
|
Collection<String> |
getAllMatchedMembersNamesForGroup(String group,
String matchField,
int nb,
int start,
Boolean orderAsc,
XWikiContext context)
Get members of provided group.
|
List<?> |
getAllMatchedUsers(Object[][] matchFields,
boolean withdetails,
int nb,
int start,
Object[][] order,
XWikiContext context)
Search for all users with provided constraints and in a provided order.
|
Collection<String> |
getAllMembersNamesForGroup(String group,
int nb,
int start,
XWikiContext context)
Get all members provided group contains.
|
void |
init(XWiki xwiki,
XWikiContext context) |
void |
initCache(int iCapacity,
XWikiContext context)
Deprecated.
since 10.8RC1, use GroupManager component instead
|
void |
initCache(XWikiContext context)
Deprecated.
since 10.8RC1, use GroupManager component instead
|
List<String> |
listAllGroups(XWikiContext context)
|
Collection<String> |
listGroupsForUser(String username,
XWikiContext context)
Deprecated.
|
List<String> |
listMemberForGroup(String s,
XWikiContext context)
Deprecated.
|
void |
removeUserOrGroupFromAllGroups(String userOrGroupWiki,
String userOrGroupSpace,
String userOrGroupName,
XWikiContext context)
Remove user or group name from all groups.
|
default void |
replaceMemberInAllGroups(DocumentReference memberSource,
DocumentReference memberTarget,
XWikiContext context)
Replace a given member reference by another one in all groups of the wiki.
|
void init(XWiki xwiki, XWikiContext context) throws XWikiException
XWikiException
@Deprecated void initCache(XWikiContext context) throws XWikiException
XWikiException
@Deprecated void initCache(int iCapacity, XWikiContext context) throws XWikiException
XWikiException
@Deprecated void flushCache()
@Deprecated Collection<String> listGroupsForUser(String username, XWikiContext context) throws XWikiException
getAllGroupsNamesForMember(String, int, int, XWikiContext)
.XWikiException
@Deprecated void addUserToGroup(String user, String database, String group, XWikiContext context) throws XWikiException
XWikiException
void removeUserOrGroupFromAllGroups(String userOrGroupWiki, String userOrGroupSpace, String userOrGroupName, XWikiContext context) throws XWikiException
userOrGroupWiki
- the name of the wiki of the member.userOrGroupSpace
- the name of the space of the member.userOrGroupName
- the name of the member.context
- the XWiki context.XWikiException
- error when browsing groups.default void replaceMemberInAllGroups(DocumentReference memberSource, DocumentReference memberTarget, XWikiContext context) throws XWikiException
memberSource
- the reference of the member that should be replacedmemberTarget
- the reference of the member that is used as replacementcontext
- the current contextXWikiException
- in case of problem when doing the replacement@Deprecated List<String> listMemberForGroup(String s, XWikiContext context) throws XWikiException
getAllMembersNamesForGroup(String, int, int, XWikiContext)
.XWikiException
@Deprecated List<String> listAllGroups(XWikiContext context) throws XWikiException
XWikiException
List<?> getAllMatchedUsers(Object[][] matchFields, boolean withdetails, int nb, int start, Object[][] order, XWikiContext context) throws XWikiException
matchFields
- the field to math with values. It is a table of table with :
withdetails
- indicate if a List
containing String
names is returned or List
containing XWikiDocument
.nb
- the maximum number of results to return. Infinite if 0.start
- the index of the first found user to return.order
- the fields to order from. It is a table of table with :
context
- the XWikiContext
.XWikiException
- error when getting users.List<?> getAllMatchedGroups(Object[][] matchFields, boolean withdetails, int nb, int start, Object[][] order, XWikiContext context) throws XWikiException
matchFields
- the field to math with values. It is a table of table with :
withdetails
- indicate if a List
containing String
names is returned or List
containing XWikiDocument
.nb
- the maximum number of result to return. Infinite if 0.start
- the index of the first found group to return.order
- the field to order from. It is a table of table with :
context
- the XWikiContext
.XWikiException
- error when getting groups.int countAllMatchedUsers(Object[][] matchFields, XWikiContext context) throws XWikiException
matchFields
- the field to math with values. It is a table of table with :
context
- the XWikiContext
.XWikiException
- error when getting number of users.int countAllMatchedGroups(Object[][] matchFields, XWikiContext context) throws XWikiException
matchFields
- the field to math with values. It is a table of table with :
context
- the XWikiContext
.XWikiException
- error when getting number of groups.Collection<String> getAllGroupsNamesForMember(String member, int nb, int start, XWikiContext context) throws XWikiException
Since 10.8RC1 it's recommended to use org.xwiki.user.group.GroupManager unless you want to bypass the cache.
member
- the name of the member (user or group).nb
- the maximum number of result to return.start
- the index of the first found member to return.context
- the XWiki context.Collection
of String
containing group name.XWikiException
- error when browsing groups.Collection<DocumentReference> getAllGroupsReferencesForMember(DocumentReference memberReference, int limit, int offset, XWikiContext context) throws XWikiException
Since 10.8RC1 it's recommended to use org.xwiki.user.group.GroupManager unless you want to bypass the cache.
memberReference
- the member. Can be either user or group.limit
- the maximum number of result to return.offset
- the index of the first found member to return.context
- the XWiki context.Collection
of DocumentReference
containing representing groups.XWikiException
- error when browsing groups.Collection<String> getAllMembersNamesForGroup(String group, int nb, int start, XWikiContext context) throws XWikiException
Since 10.8RC1 it's recommended to use org.xwiki.user.group.GroupManager unless you want to bypass the cache.
group
- the name of the group.nb
- the maximum number of result to return.start
- the index of the first found user to return.context
- the XWiki context.Collection
of String
containing member name.XWikiException
- error when browsing groups.Collection<String> getAllMatchedMembersNamesForGroup(String group, String matchField, int nb, int start, Boolean orderAsc, XWikiContext context) throws XWikiException
group
- the group.matchField
- a string to search in result to filter.nb
- the maximum number of result to return.start
- the index of the first found user to return.orderAsc
- if true, the result is ordered ascendent, if false it descendant. If null no order is applied.context
- the XWiki context.Collection
of String
containing member name.XWikiException
- error when browsing groups.default int countAllMatchedMembersNamesForGroup(String group, String filter, XWikiContext xcontext) throws XWikiException
group
- the group whose members are going to be countedfilter
- the text used to filter the group membersxcontext
- the XWiki contextXWikiException
- if counting the group members failsgetAllMatchedMembersNamesForGroup(String, String, int, int, Boolean, XWikiContext)
int countAllGroupsNamesForMember(String member, XWikiContext context) throws XWikiException
Since 10.8RC1 it's recommended to use org.xwiki.user.group.GroupManager unless you want to bypass the cache.
member
- the name of the member (user or group).context
- the XWiki context.XWikiException
- error when getting number of users.int countAllMembersNamesForGroup(String group, XWikiContext context) throws XWikiException
Since 10.8RC1 it's recommended to use org.xwiki.user.group.GroupManager unless you want to bypass the cache.
group
- the name of the group.context
- the XWiki context.XWikiException
- error when getting number of groups.Copyright © 2004–2021 XWiki. All rights reserved.