public class BoxGroup extends BoxCollaborator
Unless otherwise noted, the methods in this class can throw an unchecked BoxAPIException
(unchecked
meaning that the compiler won't force you to handle it) if an error occurs. If you wish to implement custom error
handling for errors related to the Box REST API, you should capture this exception explicitly.
Modifier and Type | Class and Description |
---|---|
class |
BoxGroup.Info
Contains information about a BoxGroup.
|
Constructor and Description |
---|
BoxGroup(BoxAPIConnection api,
String id)
Constructs a BoxGroup for a group with a given ID.
|
Modifier and Type | Method and Description |
---|---|
static BoxGroup.Info |
createGroup(BoxAPIConnection api,
String name)
Creates a new group with a specified name.
|
void |
delete()
Deletes this group.
|
static Iterable<BoxGroup.Info> |
getAllGroups(BoxAPIConnection api)
Gets an iterable of all the groups that the current user is a member of.
|
BoxGroup.Info |
getInfo()
Gets information about this group.
|
equals, getAPI, getID, hashCode
public BoxGroup(BoxAPIConnection api, String id)
api
- the API connection to be used by the group.id
- the ID of the group.public static BoxGroup.Info createGroup(BoxAPIConnection api, String name)
api
- the API connection to be used by the group.name
- the name of the new group.public static Iterable<BoxGroup.Info> getAllGroups(BoxAPIConnection api)
api
- the API connection to be used when retrieving the groups.public BoxGroup.Info getInfo()
public void delete()