IAssetsStorage
Interface defining base functionality for asset storage operations in the WebReportDesigner system.
Definition
Namespace:Telerik.WebReportDesigner.Services
Assembly:Telerik.WebReportDesigner.Services.dll
Syntax:
public interface IAssetsStorage
Derived Classes:
Methods
Creates a new folder in the specified parent location.
Task<ResourceFolderModel> CreateFolderAsync(CreateFolderModel model)
The model containing the create operation data
Returns:Task<ResourceFolderModel>
The ResourceFolderModel of the newly created folder
Establishes a new directory structure within the storage system, enabling hierarchical organization of assets and supporting the folder creation operations in the Assets Manager.
Deletes the resource at the specified URI.
Task DeleteAsync(string uri)
The unique resource identifier (URI)
Returns:Task
Removes the resource from the storage system permanently, supporting cleanup operations and manual resource management through the Assets Manager interface.
Deletes the folder at the specified URI.
Task DeleteFolderAsync(string uri)
The unique resource identifier (URI)
Returns:Task
Removes the folder and all its contents from the storage system, providing cleanup functionality for the Assets Manager and automated maintenance operations.
GetAsync(string)
Task<byte[]>
Finds a resource by its name and returns its contents as a byte array.
Task<byte[]> GetAsync(string resourceName)
The name of the resource to retrieve.
Returns:Task<byte[]>
Task<TResult>, where TResult is byte[], containing the resource bytes.
Must throw a ReportNotFoundException when the requested resourceName represents a report definition and was not found. Must throw a ResourceNotFoundException when the requested resourceName represents a resource and was not found.
Retrieves the folder model at the specified URI or returns null if not found.
Task<ResourceFolderModel> GetFolderAsync(string uri)
The unique resource identifier (URI).
Returns:Task<ResourceFolderModel>
The ResourceFolderModel of the obtained folder.
Provides folder metadata including name, parent relationships, and subfolder indicators for UI components that require folder information without loading the complete contents.
GetFolderContentsAsync(string)
Task<IEnumerable<ResourceModelBase>>
Retrieves all resources contained in the specified folder.
Task<IEnumerable<ResourceModelBase>> GetFolderContentsAsync(string uri)
The unique resource identifier (URI) of the folder
Returns:Task<IEnumerable<ResourceModelBase>>
A list of all resources found in the folder as an enumerable of ResourceModelBase
Returns both files and subfolders within the specified directory, enabling hierarchical navigation and content listing in the Assets Manager interface.
Retrieves the resource model at the specified URI or returns null if not found.
Task<ResourceFileModel> GetModelAsync(string uri)
The unique resource identifier (URI) of the resource.
Returns:Task<ResourceFileModel>
ResourceFileModel, containing the information about the resource.
Provides complete resource metadata including size, timestamps, and path information for displaying in the Assets Manager and supporting resource management operations.
Renames an existing resource to a new name.
Task<ResourceFileModel> RenameAsync(RenameResourceModel model)
The model containing the rename operation data
Returns:Task<ResourceFileModel>
ResourceFileModel, containing the information about the renamed resource.
Updates the resource name while preserving its content and location, maintaining proper file extension validation and preventing naming conflicts within the storage system.
Renames an existing folder to a new name.
Task<ResourceFolderModel> RenameFolderAsync(RenameFolderModel model)
The model containing the rename operation data
Returns:Task<ResourceFolderModel>
The ResourceFolderModel of the renamed folder
Updates the folder name while preserving its location and contents, maintaining all references and hierarchical relationships within the storage system.
Saves raw data as a new resource and returns its model information.
Task<ResourceFileModel> SaveAsync(SaveResourceModel model, byte[] resource)
The model containing the save operation data.
resourcebyte[]The contents of the resource.
Returns:Task<ResourceFileModel>
ResourceFileModel, containing the information about the saved resource.
Persists the resource data to the storage system and creates the necessary directory structure if it doesn't exist, supporting upload operations and programmatic resource creation.