Interface WorkspaceFolderResources


  • public interface WorkspaceFolderResources
    T

    his interface provides methods to access Folder resources that are associated to a workspace object.

    Thread Safety: Implementation of this interface must be thread safe.

    • Method Detail

      • listFolders

        PagedResult<Folder> listFolders​(long workspaceId,
                                        PaginationParameters parameters)
                                 throws SmartsheetException

        List folders of a given workspace.

        It mirrors to the following Smartsheet REST API method: GET /workspace/{id}/folders

        Parameters:
        workspaceId - the workspace id
        parameters - the pagination parameters
        Returns:
        the list of folders (note that an empty list will be returned if there are none)
        Throws:
        java.lang.IllegalArgumentException - if any argument is null or empty string
        InvalidRequestException - if there is any problem with the REST API request
        AuthorizationException - if there is any problem with the REST API authorization (access token)
        ResourceNotFoundException - if the resource cannot be found
        ServiceUnavailableException - if the REST API service is not available (possibly due to rate limiting)
        SmartsheetException - if there is any other error during the operation
      • createFolder

        Folder createFolder​(long workspaceId,
                            Folder folder)
                     throws SmartsheetException

        Create a folder in the workspace.

        It mirrors to the following Smartsheet REST API method: POST /workspace/{id}/folders

        Parameters:
        workspaceId - the workspace id
        folder - the folder to create
        Returns:
        the created folder
        Throws:
        java.lang.IllegalArgumentException - if any argument is null or empty string
        InvalidRequestException - if there is any problem with the REST API request
        AuthorizationException - if there is any problem with the REST API authorization (access token)
        ResourceNotFoundException - if the resource cannot be found
        ServiceUnavailableException - if the REST API service is not available (possibly due to rate limiting)
        SmartsheetException - if there is any other error during the operation