Author: tmortagne
Date: 2007-10-26 16:26:56 +0200 (Fri, 26 Oct 2007)
New Revision: 5521

Modified:
   
xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/user/api/XWikiGroupService.java
Log:
XWIKI-1826: Add @deprecated for rewritten methods of GroupService.

Modified: 
xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/user/api/XWikiGroupService.java
===================================================================
--- 
xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/user/api/XWikiGroupService.java
    2007-10-26 14:26:30 UTC (rev 5520)
+++ 
xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/user/api/XWikiGroupService.java
    2007-10-26 14:26:56 UTC (rev 5521)
@@ -34,142 +34,207 @@
  * @version $Id: $
  */
 public interface XWikiGroupService {
-    public void init(XWiki xwiki, XWikiContext context) throws XWikiException;
-    public void initCache(XWikiContext context) throws XWikiException;
-    public void initCache(int iCapacity, XWikiContext context) throws 
XWikiException;
-    public void flushCache();
-    public Collection listGroupsForUser(String username, XWikiContext context) 
throws XWikiException;
-    public void addUserToGroup(String user, String database, String group, 
XWikiContext context) throws XWikiException;
-    /**
-     * Remove user or group name from all groups.
-     * 
-     * @param userOrGroupWiki the name of the wiki of the member.
-     * @param userOrGroupSpace the name of the space of the member.
-     * @param userOrGroupName the name of the member.
-     * @param context the XWiki context.
-     * @throws XWikiException error when browsing groups.
-     */
-    public void removeUserOrGroupFromAllGroups(String userOrGroupWiki, String 
userOrGroupSpace,
-        String userOrGroupName, XWikiContext context) throws XWikiException;
-    
-    public List listMemberForGroup(String s, XWikiContext context) throws 
XWikiException;
-    public List listAllGroups(XWikiContext context) throws XWikiException;
+       public void init(XWiki xwiki, XWikiContext context) throws 
XWikiException;
 
-    /**
-     * Search for all users with provided constraints and in a provided order.
-     * 
-     * @param matchFields the field to math with values. It is a table of 
table with :
-     *            <ul>
-     *            <li>fiedname : the name of the field</li>
-     *            <li>fieldtype : for example StringProperty. If null the 
field is considered as
-     *            document field</li>
-     *            <li>pattern matching : based on HQL "like" command</li>
-     *            </ul>
-     * @param withdetails indicate if a [EMAIL PROTECTED] List} containing 
[EMAIL PROTECTED] String} names is returned or
-     *            [EMAIL PROTECTED] List} containing [EMAIL PROTECTED] 
com.xpn.xwiki.doc.XWikiDocument}.
-     * @param nb the maximum number od result to return.
-     * @param start the index of the first found user to return.
-     * @param order the fields to order from. It is a table of table with :
-     *            <ul>
-     *            <li>fieldname : the name of the field</li>
-     *            <li>fieldtype : for example StringProperty. If null the 
field is considered as
-     *            document field</li>
-     *            </ul>
-     * @param context the [EMAIL PROTECTED] XWikiContext}.
-     * @return the list of users.
-     * @throws XWikiException error when getting users.
-     */
-    List getAllMatchedUsers(Object[][] matchFields, boolean withdetails, int 
nb, int start,
-        Object[][] order, XWikiContext context) throws XWikiException;
+       public void initCache(XWikiContext context) throws XWikiException;
 
-    /**
-     * Search for all groups with provided constraints and in a provided order.
-     * 
-     * @param matchFields the field to math with values. It is a table of 
table with :
-     *            <ul>
-     *            <li>fiedname : the name of the field</li>
-     *            <li>fieldtype : for example StringProperty. If null the 
field is considered as
-     *            document field</li>
-     *            <li>pattern matching : based on HQL "like" command</li>
-     *            </ul>.
-     * @param withdetails indicate if a [EMAIL PROTECTED] List} containing 
[EMAIL PROTECTED] String} names is returned or
-     *            [EMAIL PROTECTED] List} containing [EMAIL PROTECTED] 
com.xpn.xwiki.doc.XWikiDocument}.
-     * @param nb the maximum number od result to return.
-     * @param start the index of the first found group to return.
-     * @param order the field to order from. It is a table of table with :
-     *            <ul>
-     *            <li>fieldname : the name of the field</li>
-     *            <li>fieldtype : for example StringProperty. If null the 
field is considered as
-     *            document field</li>
-     *            </ul>
-     * @param context the [EMAIL PROTECTED] XWikiContext}.
-     * @return the list of groups.
-     * @throws XWikiException error when getting groups.
+       public void initCache(int iCapacity, XWikiContext context)
+                       throws XWikiException;
+
+       public void flushCache();
+
+       /**
+        * @deprecated Use
+        *             [EMAIL PROTECTED] #getAllGroupsNamesForMember(String, 
int, int, XWikiContext)}.
+        */
+       public Collection listGroupsForUser(String username, XWikiContext 
context)
+                       throws XWikiException;
+
+       public void addUserToGroup(String user, String database, String group,
+                       XWikiContext context) throws XWikiException;
+
+       /**
+        * Remove user or group name from all groups.
+        * 
+        * @param userOrGroupWiki
+        *            the name of the wiki of the member.
+        * @param userOrGroupSpace
+        *            the name of the space of the member.
+        * @param userOrGroupName
+        *            the name of the member.
+        * @param context
+        *            the XWiki context.
+        * @throws XWikiException
+        *             error when browsing groups.
+        */
+       public void removeUserOrGroupFromAllGroups(String userOrGroupWiki,
+                       String userOrGroupSpace, String userOrGroupName,
+                       XWikiContext context) throws XWikiException;
+
+       /**
+     * @deprecated Use [EMAIL PROTECTED] #getAllMembersNamesForGroup(String, 
int, int, XWikiContext)}.
      */
-    List getAllMatchedGroups(Object[][] matchFields, boolean withdetails, int 
nb, int start,
-        Object[][] order, XWikiContext context) throws XWikiException;
+       public List listMemberForGroup(String s, XWikiContext context)
+                       throws XWikiException;
 
-    /**
-     * Return number of users with provided constraints.
-     * 
-     * @param matchFields the field to math with values. It is a table of 
table with :
-     *            <ul>
-     *            <li>fiedname : the name of the field</li>
-     *            <li>fieldtype : for example StringProperty. If null the 
field is considered as
-     *            document field</li>
-     *            <li>pattern matching : based on HQL "like" command</li>
-     *            </ul>.
-     * @param nb the maximum number of result to return.
-     * @param start the index of the first found user to return.
-     * @param context the [EMAIL PROTECTED] XWikiContext}.
-     * @return the of found users.
-     * @throws XWikiException error when getting number of users.
+       /**
+     * @deprecated Use [EMAIL PROTECTED] #getAllMatchedGroups(Object[][], 
boolean, int, int, Object[][], XWikiContext)}.
      */
-    int countAllMatchedUsers(Object[][] matchFields, int nb, int start, 
XWikiContext context)
-        throws XWikiException;
+       public List listAllGroups(XWikiContext context) throws XWikiException;
 
-    /**
-     * Return number of groups with provided constraints.
-     * 
-     * @param matchFields the field to math with values. It is a table of 
table with :
-     *            <ul>
-     *            <li>fiedname : the name of the field</li>
-     *            <li>fieldtype : for example StringProperty. If null the 
field is considered as
-     *            document field</li>
-     *            <li>pattern matching : based on HQL "like" command</li>
-     *            </ul>.
-     * @param nb the maximum number of result to return.
-     * @param start the index of the first found user to return.
-     * @param context the [EMAIL PROTECTED] XWikiContext}.
-     * @return the of found groups.
-     * @throws XWikiException error when getting number of groups.
-     */
-    int countAllMatchedGroups(Object[][] matchFields, int nb, int start, 
XWikiContext context)
-        throws XWikiException;
-    
-    /**
-     * Get all groups containing provided user.
-     * 
-     * @param member the name of the member (user or group).
-     * @param nb the maximum number of result to return.
-     * @param start the index of the first found member to return.
-     * @param context the XWiki context.
-     * @return the [EMAIL PROTECTED] Collection} of [EMAIL PROTECTED] String} 
containing group name.
-     * @throws XWikiException error when browsing groups.
-     */
-    public Collection getAllGroupsNamesForMember(String member, int nb, int 
start,
-        XWikiContext context) throws XWikiException;
-    
-    /**
-     * Get all users provided group contains.
-     * 
-     * @param group the name of the group.
-     * @param nb the maximum number of result to return.
-     * @param start the index of the first found user to return.
-     * @param context the XWiki context.
-     * @return the [EMAIL PROTECTED] Collection} of [EMAIL PROTECTED] String} 
containing user name.
-     * @throws XWikiException error when browsing groups.
-     */
-    public Collection getAllMembersNamesForGroup(String group, int nb, int 
start,
-        XWikiContext context) throws XWikiException;
+       /**
+        * Search for all users with provided constraints and in a provided 
order.
+        * 
+        * @param matchFields
+        *            the field to math with values. It is a table of table 
with :
+        *            <ul>
+        *            <li>fiedname : the name of the field</li>
+        *            <li>fieldtype : for example StringProperty. If null the 
field
+        *            is considered as document field</li>
+        *            <li>pattern matching : based on HQL "like" command</li>
+        *            </ul>
+        * @param withdetails
+        *            indicate if a [EMAIL PROTECTED] List} containing [EMAIL 
PROTECTED] String} names is
+        *            returned or [EMAIL PROTECTED] List} containing
+        *            [EMAIL PROTECTED] com.xpn.xwiki.doc.XWikiDocument}.
+        * @param nb
+        *            the maximum number od result to return.
+        * @param start
+        *            the index of the first found user to return.
+        * @param order
+        *            the fields to order from. It is a table of table with :
+        *            <ul>
+        *            <li>fieldname : the name of the field</li>
+        *            <li>fieldtype : for example StringProperty. If null the 
field
+        *            is considered as document field</li>
+        *            </ul>
+        * @param context
+        *            the [EMAIL PROTECTED] XWikiContext}.
+        * @return the list of users.
+        * @throws XWikiException
+        *             error when getting users.
+        */
+       List getAllMatchedUsers(Object[][] matchFields, boolean withdetails,
+                       int nb, int start, Object[][] order, XWikiContext 
context)
+                       throws XWikiException;
+
+       /**
+        * Search for all groups with provided constraints and in a provided 
order.
+        * 
+        * @param matchFields
+        *            the field to math with values. It is a table of table 
with :
+        *            <ul>
+        *            <li>fiedname : the name of the field</li>
+        *            <li>fieldtype : for example StringProperty. If null the 
field
+        *            is considered as document field</li>
+        *            <li>pattern matching : based on HQL "like" command</li>
+        *            </ul>.
+        * @param withdetails
+        *            indicate if a [EMAIL PROTECTED] List} containing [EMAIL 
PROTECTED] String} names is
+        *            returned or [EMAIL PROTECTED] List} containing
+        *            [EMAIL PROTECTED] com.xpn.xwiki.doc.XWikiDocument}.
+        * @param nb
+        *            the maximum number od result to return.
+        * @param start
+        *            the index of the first found group to return.
+        * @param order
+        *            the field to order from. It is a table of table with :
+        *            <ul>
+        *            <li>fieldname : the name of the field</li>
+        *            <li>fieldtype : for example StringProperty. If null the 
field
+        *            is considered as document field</li>
+        *            </ul>
+        * @param context
+        *            the [EMAIL PROTECTED] XWikiContext}.
+        * @return the list of groups.
+        * @throws XWikiException
+        *             error when getting groups.
+        */
+       List getAllMatchedGroups(Object[][] matchFields, boolean withdetails,
+                       int nb, int start, Object[][] order, XWikiContext 
context)
+                       throws XWikiException;
+
+       /**
+        * Return number of users with provided constraints.
+        * 
+        * @param matchFields
+        *            the field to math with values. It is a table of table 
with :
+        *            <ul>
+        *            <li>fiedname : the name of the field</li>
+        *            <li>fieldtype : for example StringProperty. If null the 
field
+        *            is considered as document field</li>
+        *            <li>pattern matching : based on HQL "like" command</li>
+        *            </ul>.
+        * @param nb
+        *            the maximum number of result to return.
+        * @param start
+        *            the index of the first found user to return.
+        * @param context
+        *            the [EMAIL PROTECTED] XWikiContext}.
+        * @return the of found users.
+        * @throws XWikiException
+        *             error when getting number of users.
+        */
+       int countAllMatchedUsers(Object[][] matchFields, int nb, int start,
+                       XWikiContext context) throws XWikiException;
+
+       /**
+        * Return number of groups with provided constraints.
+        * 
+        * @param matchFields
+        *            the field to math with values. It is a table of table 
with :
+        *            <ul>
+        *            <li>fiedname : the name of the field</li>
+        *            <li>fieldtype : for example StringProperty. If null the 
field
+        *            is considered as document field</li>
+        *            <li>pattern matching : based on HQL "like" command</li>
+        *            </ul>.
+        * @param nb
+        *            the maximum number of result to return.
+        * @param start
+        *            the index of the first found user to return.
+        * @param context
+        *            the [EMAIL PROTECTED] XWikiContext}.
+        * @return the of found groups.
+        * @throws XWikiException
+        *             error when getting number of groups.
+        */
+       int countAllMatchedGroups(Object[][] matchFields, int nb, int start,
+                       XWikiContext context) throws XWikiException;
+
+       /**
+        * Get all groups containing provided user.
+        * 
+        * @param member
+        *            the name of the member (user or group).
+        * @param nb
+        *            the maximum number of result to return.
+        * @param start
+        *            the index of the first found member to return.
+        * @param context
+        *            the XWiki context.
+        * @return the [EMAIL PROTECTED] Collection} of [EMAIL PROTECTED] 
String} containing group name.
+        * @throws XWikiException
+        *             error when browsing groups.
+        */
+       public Collection getAllGroupsNamesForMember(String member, int nb,
+                       int start, XWikiContext context) throws XWikiException;
+
+       /**
+        * Get all users provided group contains.
+        * 
+        * @param group
+        *            the name of the group.
+        * @param nb
+        *            the maximum number of result to return.
+        * @param start
+        *            the index of the first found user to return.
+        * @param context
+        *            the XWiki context.
+        * @return the [EMAIL PROTECTED] Collection} of [EMAIL PROTECTED] 
String} containing user name.
+        * @throws XWikiException
+        *             error when browsing groups.
+        */
+       public Collection getAllMembersNamesForGroup(String group, int nb,
+                       int start, XWikiContext context) throws XWikiException;
 }

_______________________________________________
notifications mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/notifications

Reply via email to