Interface GroupResources
-
public interface GroupResourcesThis 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 GroupcreateGroup(Group group)Create aGroup.voiddeleteGroup(long groupId)Delete aGroup.GroupgetGroup(long groupId)Get aGroup.PagedResult<Group>listGroups(PaginationParameters parameters)List all group.GroupMemberResourcesmemberResources()Represents the GroupMemberResources.GroupupdateGroup(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
Groups. 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- theGroupid- 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.CreateGroupBuilderto create the model for a newGroupIt mirrors to the following Smartsheet REST API method: POST /groups
- Parameters:
group- theGroupto create. UseGroup.CreateGroupBuilderto 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.CreateGroupBuilderto create the model for a newGroupIt mirrors to the following Smartsheet REST API method: PUT /group/{groupId}
- Parameters:
group- theGroupto create. UseGroup.CreateGroupBuilderto 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 SmartsheetExceptionDelete a
Group.It mirrors to the following Smartsheet REST API method: DELETE /group/{groupId}
- Parameters:
groupId- the id of theGroupto 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
-
-