GroupApi: Add all non-collection methods
Change-Id: Idba024e7226bf72241f978c90b414ae969f4bfe3
This commit is contained in:
@@ -15,9 +15,93 @@
|
||||
package com.google.gerrit.extensions.api.groups;
|
||||
|
||||
import com.google.gerrit.extensions.common.GroupInfo;
|
||||
import com.google.gerrit.extensions.common.GroupOptionsInfo;
|
||||
import com.google.gerrit.extensions.restapi.RestApiException;
|
||||
|
||||
public interface GroupApi {
|
||||
/** @return group info with no {@code ListGroupsOption}s set. */
|
||||
GroupInfo get() throws RestApiException;
|
||||
|
||||
/** @return group info with all {@code ListGroupsOption}s set. */
|
||||
GroupInfo detail() throws RestApiException;
|
||||
|
||||
/** @return group name. */
|
||||
String name() throws RestApiException;
|
||||
|
||||
/**
|
||||
* Set group name.
|
||||
*
|
||||
* @param name new name.
|
||||
* @throws RestApiException
|
||||
*/
|
||||
void name(String name) throws RestApiException;
|
||||
|
||||
/** @return owning group info. */
|
||||
GroupInfo owner() throws RestApiException;
|
||||
|
||||
/**
|
||||
* Set group owner.
|
||||
*
|
||||
* @param owner identifier of new group owner.
|
||||
* @throws RestApiException
|
||||
*/
|
||||
void owner(String owner) throws RestApiException;
|
||||
|
||||
/** @return group description. */
|
||||
String description() throws RestApiException;
|
||||
|
||||
/**
|
||||
* Set group decsription.
|
||||
*
|
||||
* @param description new description.
|
||||
* @throws RestApiException
|
||||
*/
|
||||
void description(String description) throws RestApiException;
|
||||
|
||||
/** @return group options. */
|
||||
GroupOptionsInfo options() throws RestApiException;
|
||||
|
||||
/**
|
||||
* Set group options.
|
||||
*
|
||||
* @param options new options.
|
||||
* @throws RestApiException
|
||||
*/
|
||||
void options(GroupOptionsInfo options) throws RestApiException;
|
||||
|
||||
/**
|
||||
* Add members to a group.
|
||||
*
|
||||
* @param members list of member identifiers, in any format accepted by
|
||||
* {@link com.google.gerrit.extensions.api.accounts.Accounts#id(String)}
|
||||
* @throws RestApiException
|
||||
*/
|
||||
void addMembers(String... members) throws RestApiException;
|
||||
|
||||
/**
|
||||
* Remove members from a group.
|
||||
*
|
||||
* @param members list of member identifiers, in any format accepted by
|
||||
* {@link com.google.gerrit.extensions.api.accounts.Accounts#id(String)}
|
||||
* @throws RestApiException
|
||||
*/
|
||||
void removeMembers(String... members) throws RestApiException;
|
||||
|
||||
/**
|
||||
* Add groups to be included in this one.
|
||||
*
|
||||
* @param members list of group identifiers, in any format accepted by
|
||||
* {@link Groups#id(String)}
|
||||
* @throws RestApiException
|
||||
*/
|
||||
void addGroups(String... groups) throws RestApiException;
|
||||
|
||||
/**
|
||||
* Remove included groups from this one.
|
||||
*
|
||||
* @param members list of group identifiers, in any format accepted by
|
||||
* {@link Groups#id(String)}
|
||||
* @throws RestApiException
|
||||
*/
|
||||
void removeGroups(String... groups) throws RestApiException;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user