Interface FolderResources
-
public interface FolderResourcesThis interface provides methods to access Folder resources.
Thread Safety: Implementation of this interface must be thread safe.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description FoldercopyFolder(long folderId, ContainerDestination containerDestination, java.util.EnumSet<FolderCopyInclusion> includes, java.util.EnumSet<FolderRemapExclusion> skipRemap)Creates a copy of the specified Folder.FoldercopyFolder(long folderId, ContainerDestination containerDestination, java.util.EnumSet<FolderCopyInclusion> includes, java.util.EnumSet<FolderRemapExclusion> skipRemap, java.util.EnumSet<CopyExclusion> excludes)Creates a copy of the specified Folder.FoldercreateFolder(long parentFolderId, Folder folder)Create a folder.voiddeleteFolder(long folderId)Delete a folder.FoldergetFolder(long folderId, java.util.EnumSet<SourceInclusion> includes)Deprecated, for removal: This API element is subject to removal in a future version.TokenPaginatedResult<java.lang.Object>getFolderChildren(long folderId, java.util.EnumSet<ChildrenResourceType> childrenResourceTypes, java.util.EnumSet<GetFolderChildrenInclusion> includes, java.lang.String lastKey, java.lang.Integer maxItems)Get children of a folder.FoldergetFolderMetadata(long folderId, java.util.EnumSet<GetFolderMetadataInclusion> includes)Get metadata of a folder.PagedResult<Folder>listFolders(long parentFolderId, PaginationParameters parameters)Deprecated, for removal: This API element is subject to removal in a future version.FoldermoveFolder(long folderId, ContainerDestination containerDestination)Moves the specified Folder to another location.FolderupdateFolder(Folder folder)Update a folder.
-
-
-
Method Detail
-
getFolder
@Deprecated(since="3.4.0", forRemoval=true) Folder getFolder(long folderId, java.util.EnumSet<SourceInclusion> includes) throws SmartsheetExceptionDeprecated, for removal: This API element is subject to removal in a future version.Get a folder.
It mirrors to the following Smartsheet REST API method: GET /folder/{id}
- Parameters:
folderId- the folder idincludes- the include parameters- Returns:
- the folder (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
-
updateFolder
Folder updateFolder(Folder folder) throws SmartsheetException
Update a folder.
- Parameters:
folder- the folder to update- Returns:
- the updated folder (note that if there is no such folder, this method will throw Resource Not Found Exception 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
-
deleteFolder
void deleteFolder(long folderId) throws SmartsheetExceptionDelete a folder.
It mirrors to the following Smartsheet REST API method: DELETE /folder{id}
- Parameters:
folderId- the folder id- 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
-
listFolders
@Deprecated(since="3.4.0", forRemoval=true) PagedResult<Folder> listFolders(long parentFolderId, PaginationParameters parameters) throws SmartsheetExceptionDeprecated, for removal: This API element is subject to removal in a future version.List child folders of a given folder.
It mirrors to the following Smartsheet REST API method: GET /folder/{id}/folders
- Parameters:
parentFolderId- the parent folder idparameters- the parameters for pagination- Returns:
- the child folders (note that an empty list will be returned if no child folder is found).
- 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
-
createFolder
Folder createFolder(long parentFolderId, Folder folder) throws SmartsheetException
Create a folder.
It mirrors to the following Smartsheet REST API method: POST /folder/{id}/folders
- Parameters:
parentFolderId- the parent folder idfolder- the folder to create- Returns:
- the created folder
- 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
-
copyFolder
Folder copyFolder(long folderId, ContainerDestination containerDestination, java.util.EnumSet<FolderCopyInclusion> includes, java.util.EnumSet<FolderRemapExclusion> skipRemap) throws SmartsheetException
Creates a copy of the specified Folder.
It mirrors to the following Smartsheet REST API method: POST /folders/{folderId}/copy
Exceptions: IllegalArgumentException : if folder is null InvalidRequestException : if there is any problem with the REST API request AuthorizationException : if there is any problem with the REST API authorization(access token) ServiceUnavailableException : if the REST API service is not available (possibly due to rate limiting) SmartsheetRestException : if there is any other REST API related error occurred during the operation SmartsheetException : if there is any other error occurred during the operation
- Parameters:
folderId- the folder idcontainerDestination- describes the destination containerincludes- optional parameters to includeskipRemap- optional parameters to exclude- Returns:
- the folder
- Throws:
SmartsheetException- the smartsheet exception
-
copyFolder
Folder copyFolder(long folderId, ContainerDestination containerDestination, java.util.EnumSet<FolderCopyInclusion> includes, java.util.EnumSet<FolderRemapExclusion> skipRemap, java.util.EnumSet<CopyExclusion> excludes) throws SmartsheetException
Creates a copy of the specified Folder.
It mirrors to the following Smartsheet REST API method: POST /folders/{folderId}/copy
Exceptions: IllegalArgumentException : if folder is null InvalidRequestException : if there is any problem with the REST API request AuthorizationException : if there is any problem with the REST API authorization(access token) ServiceUnavailableException : if the REST API service is not available (possibly due to rate limiting) SmartsheetRestException : if there is any other REST API related error occurred during the operation SmartsheetException : if there is any other error occurred during the operation
- Parameters:
folderId- the folder idcontainerDestination- describes the destination containerincludes- optional parameters to includeskipRemap- optional parameters to NOT re-map in the new folderexcludes- optional parameters to exclude- Returns:
- the folder
- Throws:
SmartsheetException- the smartsheet exception
-
moveFolder
Folder moveFolder(long folderId, ContainerDestination containerDestination) throws SmartsheetException
Moves the specified Folder to another location.
It mirrors to the following Smartsheet REST API method: POST /folders/{folderId}/move
Exceptions: IllegalArgumentException : if folder is null InvalidRequestException : if there is any problem with the REST API request AuthorizationException : if there is any problem with the REST API authorization(access token) ServiceUnavailableException : if the REST API service is not available (possibly due to rate limiting) SmartsheetRestException : if there is any other REST API related error occurred during the operation SmartsheetException : if there is any other error occurred during the operation
- Parameters:
folderId- the folder idcontainerDestination- describes the destination container- Returns:
- the folder
- Throws:
SmartsheetException- the smartsheet exception
-
getFolderMetadata
Folder getFolderMetadata(long folderId, java.util.EnumSet<GetFolderMetadataInclusion> includes) throws SmartsheetException
Get metadata of a folder.
It mirrors to the following Smartsheet REST API method: GET /folders/{folderId}/metadata
- Parameters:
folderId- the folder idincludes- the include parameters (optional)- Returns:
- the folder metadata (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
-
getFolderChildren
TokenPaginatedResult<java.lang.Object> getFolderChildren(long folderId, java.util.EnumSet<ChildrenResourceType> childrenResourceTypes, java.util.EnumSet<GetFolderChildrenInclusion> includes, java.lang.String lastKey, java.lang.Integer maxItems) throws SmartsheetException
Get children of a folder.
It mirrors to the following Smartsheet REST API method: GET /folders/{folderId}/children
- Parameters:
folderId- the folder idchildrenResourceTypes- the resource type to filter by (optional)includes- the include parameters (optional)lastKey- the last key for pagination (optional)maxItems- the maximum number of items to return (optional)- Returns:
- the paginated children response
- 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
-
-