Class FileSharedDataSourceStorage
File-based storage implementation for managing shared data source definition files in the WebReportDesigner system.
Inheritance
System.Object
FileSharedDataSourceStorage
Assembly: Telerik.WebReportDesigner.Services.dll
Syntax
public class FileSharedDataSourceStorage : FileDefinitionStorageBase, IHasBaseDir, ISharedDataSourceStorage, IResourceStorage, IAssetsStorage
Constructors
Initializes a new instance of the FileSharedDataSourceStorage class.
Declaration
public FileSharedDataSourceStorage(string baseDir)
Parameters
|
System.String
baseDir
The base directory where the SharedDataSource definitions are stored.
|
Initializes a new instance of the FileSharedDataSourceStorage class with specific definition folders.
Declaration
public FileSharedDataSourceStorage(string baseDir, string[] definitionFolders)
Parameters
|
System.String
baseDir
The base directory where the SharedDataSource subfolders are stored.
|
|
System.String[]
definitionFolders
The folders where the SharedDataSource definitions are stored. Pass an empty string array to include all the folders.
|
Initializes a new instance of the FileSharedDataSourceStorage class with folder exclusions.
Declaration
public FileSharedDataSourceStorage(string baseDir, string[] definitionFolders, string[] excludedFolders)
Parameters
|
System.String
baseDir
The base directory where the SharedDataSource definitions are stored.
|
|
System.String[]
definitionFolders
The folders where the SharedDataSource definitions are stored. Pass an empty string array to include all the folders.
|
|
System.String[]
excludedFolders
Relative folder paths to be excluded when retrieving folder contents. Wildcards are not supported.
|
Properties
Gets the array of allowed shared data source file extensions.
Declaration
protected override string[] FileExtensions { get; }
Property Value
Overrides
Methods
Finds a shared data source resource by its URI and returns the information about it with description.
Declaration
public override Task<ResourceFileModel> GetModelAsync(string uri)
Parameters
|
System.String
uri
The unique resource identifier (URI)
|
Returns
|
System.Threading.Tasks.Task<ResourceFileModel>
A task representing the asynchronous operation with the SharedDataSourceModel containing resource information.
|
Overrides
Implements
Determines if the provided resource extension is valid for shared data sources.
Declaration
protected override bool IsExtensionValid(string resourceExtension)
Parameters
|
System.String
resourceExtension
The file extension to validate.
|
Returns
|
System.Boolean
True if the extension is valid for shared data sources, false otherwise.
|
Overrides
Moves a shared data source resource to a new parent location.
Declaration
public override ResourceFileModel Move(MoveResourceModel model)
Parameters
Returns
|
ResourceFileModel
The SharedDataSourceModel containing information about the moved resource.
|
Overrides
Implements
Overwrites an existing shared data source definition file with new content.
Declaration
public override ResourceFileModel Overwrite(OverwriteResourceModel model, byte[] resource)
Parameters
|
OverwriteResourceModel
model
The model containing overwrite operation data.
|
|
System.Byte[]
resource
The new shared data source definition content as a byte array.
|
Returns
|
ResourceFileModel
The SharedDataSourceModel containing information about the overwritten resource.
|
Overrides
Implements
Renames a shared data source definition file.
Declaration
public override Task<ResourceFileModel> RenameAsync(RenameResourceModel model)
Parameters
Returns
|
System.Threading.Tasks.Task<ResourceFileModel>
A task representing the asynchronous rename operation with the updated resource model.
|
Overrides
Implements
Saves shared data source content and returns the resource information with extracted description.
Declaration
public override Task<ResourceFileModel> SaveAsync(SaveResourceModel model, byte[] resource)
Parameters
|
SaveResourceModel
model
The model containing the save operation data
|
|
System.Byte[]
resource
The contents of the resource.
|
Returns
|
System.Threading.Tasks.Task<ResourceFileModel>
A task representing the asynchronous save operation with the SharedDataSourceModel containing resource information.
|
Overrides
Implements
Exceptions
Validates the provided shared data source definition identifier.
Declaration
protected override void ValidateDefinitionId(string definitionId)
Parameters
|
System.String
definitionId
The definition identifier to validate.
|
Overrides
Explicit Interface Implementations
Retrieves the shared data source model at the specified URI or returns null if not found.
Declaration
Task<SharedDataSourceModel> ISharedDataSourceStorage.GetModelAsync(string uri)
Parameters
|
System.String
uri
The unique resource identifier (URI) of the resource.
|
Returns
|
System.Threading.Tasks.Task<SharedDataSourceModel>
A task representing the asynchronous operation with the SharedDataSourceModel containing resource information.
|
Implements
Renames a shared data source by its model specification.
Declaration
Task<SharedDataSourceModel> ISharedDataSourceStorage.RenameAsync(RenameResourceModel model)
Parameters
Returns
|
System.Threading.Tasks.Task<SharedDataSourceModel>
A task representing the asynchronous rename operation with the SharedDataSourceModel containing resource information.
|
Implements
Creates a new or overwrites an existing shared data source definition file with the provided content.
Declaration
Task<SharedDataSourceModel> ISharedDataSourceStorage.SaveAsync(SaveResourceModel model, byte[] resource)
Parameters
|
SaveResourceModel
model
The model containing save operation data.
|
|
System.Byte[]
resource
The shared data source definition content as a byte array.
|
Returns
|
System.Threading.Tasks.Task<SharedDataSourceModel>
A task representing the asynchronous save operation with the SharedDataSourceModel containing resource information.
|
Implements