Interface GroupResources
-
public interface GroupResources
This interface provides methods to access Group resources
Thread Safety: Implementation of this interface must be thread safe.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Group
createGroup(Group group)
Create aGroup
.void
deleteGroup(long groupId)
Delete aGroup
.Group
getGroup(long groupId)
Get aGroup
.PagedResult<Group>
listGroups(PaginationParameters parameters)
List all group.GroupMemberResources
memberResources()
Represents the GroupMemberResources.Group
updateGroup(Group group)
Update aGroup
.
-
-
-
Method Detail
-
listGroups
PagedResult<Group> listGroups(PaginationParameters parameters) throws SmartsheetException
List all group.
It mirrors to the following Smartsheet REST API method: GET /groups
- Parameters:
parameters
- the paging parameters object- Returns:
- A list of all
Group
s. Note that the groups do not contain the membership details. You must get each group individually for group membership. - Throws:
java.lang.IllegalArgumentException
- if any argument is null or empty stringInvalidRequestException
- if there is any problem with the REST API requestAuthorizationException
- if there is any problem with the REST API authorization (access token)ResourceNotFoundException
- if the resource cannot be foundServiceUnavailableException
- if the REST API service is not available (possibly due to rate limiting)SmartsheetException
- if there is any other error during the operation
-
getGroup
Group getGroup(long groupId) throws SmartsheetException
Get a
Group
.It mirrors to the following Smartsheet REST API method: GET /group/{id}
- Parameters:
groupId
- theGroup
id- Returns:
- the
Group
(note that if there is no such resource, this method will throw ResourceNotFoundException rather than returning null) - Throws:
java.lang.IllegalArgumentException
- if any argument is null or empty stringInvalidRequestException
- if there is any problem with the REST API requestAuthorizationException
- if there is any problem with the REST API authorization (access token)ResourceNotFoundException
- if the resource cannot be foundServiceUnavailableException
- if the REST API service is not available (possibly due to rate limiting)SmartsheetException
- if there is any other error during the operation
-
createGroup
Group createGroup(Group group) throws SmartsheetException
Create a
Group
. UseGroup.CreateGroupBuilder
to create the model for a newGroup
It mirrors to the following Smartsheet REST API method: POST /groups
- Parameters:
group
- theGroup
to create. UseGroup.CreateGroupBuilder
to create this model.- Returns:
- the newly created
Group
- Throws:
java.lang.IllegalArgumentException
- if any argument is null or empty stringInvalidRequestException
- if there is any problem with the REST API requestAuthorizationException
- if there is any problem with the REST API authorization (access token)ResourceNotFoundException
- if the resource cannot be foundServiceUnavailableException
- if the REST API service is not available (possibly due to rate limiting)SmartsheetException
- if there is any other error during the operation
-
updateGroup
Group updateGroup(Group group) throws SmartsheetException
Update a
Group
. UseGroup.CreateGroupBuilder
to create the model for a newGroup
It mirrors to the following Smartsheet REST API method: PUT /group/{groupId}
- Parameters:
group
- theGroup
to create. UseGroup.CreateGroupBuilder
to create this model.- Returns:
- the newly created
Group
- Throws:
java.lang.IllegalArgumentException
- if any argument is null or empty stringInvalidRequestException
- if there is any problem with the REST API requestAuthorizationException
- if there is any problem with the REST API authorization (access token)ResourceNotFoundException
- if the resource cannot be foundServiceUnavailableException
- if the REST API service is not available (possibly due to rate limiting)SmartsheetException
- if there is any other error during the operation
-
deleteGroup
void deleteGroup(long groupId) throws SmartsheetException
Delete a
Group
.It mirrors to the following Smartsheet REST API method: DELETE /group/{groupId}
- Parameters:
groupId
- the id of theGroup
to delete.- Throws:
java.lang.IllegalArgumentException
- if any argument is null or empty stringInvalidRequestException
- if there is any problem with the REST API requestAuthorizationException
- if there is any problem with the REST API authorization (access token)ResourceNotFoundException
- if the resource cannot be foundServiceUnavailableException
- if the REST API service is not available (possibly due to rate limiting)SmartsheetException
- if there is any other error during the operation
-
memberResources
GroupMemberResources memberResources() throws SmartsheetException
Represents the GroupMemberResources.
It will be initialized in constructor and will not change afterwards.
- Returns:
- members object
- Throws:
SmartsheetException
- if there is any other error during the operation
-
-