Interface IResourceStorage
Represents a resource storage.
Inherited Members
Namespace: Telerik.WebReportDesigner.Services
Assembly: Telerik.WebReportDesigner.Services.dll
Syntax
public interface IResourceStorage : IAssetsStorage
Methods
FolderExists(String)
Determines if the given folder uri
exists.
Declaration
bool FolderExists(string uri)
Parameters
System.String
uri
The unique resource identifier (URI) of the folder. |
Returns
System.Boolean
true, if the folder exists, else false |
FolderHasContents(String)
Determines if the given folder uri
has contents
Declaration
bool FolderHasContents(string uri)
Parameters
System.String
uri
The unique resource identifier (URI) of the folder |
Returns
System.Boolean
true, if the folder has contents, else false |
FolderNameExists(String)
Determines if the given folder folderName
exists.
Declaration
bool FolderNameExists(string folderName)
Parameters
System.String
folderName
The path to the folder using Name identifiers. |
Returns
System.Boolean
true, if the folder exists, else false |
GetAllByExtension(String[])
Returns the ids of the resource files that match the specified search extensions in the resource storage.
Declaration
IEnumerable<ResourceFileModel> GetAllByExtension(string[] extensions)
Parameters
System.String[]
extensions
|
Returns
System.Collections.Generic.IEnumerable<ResourceFileModel>
|
GetByUri(String)
Finds a resource by its uri
and returns its contents as byte array.
Declaration
byte[] GetByUri(string uri)
Parameters
System.String
uri
The unique resource identifier (URI) of the resource. |
Returns
System.Byte[]
|
GetFile(String)
Finds a resource by its URI and returns a model containing the download data.
Declaration
ResourceFileDataModel GetFile(string resourceUri)
Parameters
System.String
resourceUri
The URI of the resource. |
Returns
ResourceFileDataModel
ResourceFileDataModel, containg the information about the resource. |
GetFolderByName(String)
Gets the folder model at folderName
.
Declaration
ResourceFolderModel GetFolderByName(string folderName)
Parameters
System.String
folderName
The path to the folder using Name identifiers. |
Returns
ResourceFolderModel
The ResourceFolderModel of the obtained folder. |
GetModelByName(String)
Finds a resource by its name and returns the information about it.
Declaration
ResourceFileModel GetModelByName(string resourceName)
Parameters
System.String
resourceName
The full path to the resource using Name identifiers. |
Returns
ResourceFileModel
ResourceFileModel, containg the information about the resource. |
Move(MoveResourceModel)
Moves the given resource NewParentUri
Declaration
ResourceFileModel Move(MoveResourceModel model)
Parameters
MoveResourceModel
model
The model containing the move operation data |
Returns
ResourceFileModel
ResourceFileModel, containg the information about the file. |
MoveFolder(MoveFolderModel)
Moves a folder from the given OldUri to NewParentUri, including all of its content
Declaration
ResourceFolderModel MoveFolder(MoveFolderModel model)
Parameters
MoveFolderModel
model
The model containing the move operation data |
Returns
ResourceFolderModel
The ResourceFolderModel of the newly created folder |
Overwrite(OverwriteResourceModel, Byte[])
Overwrites the given resource contents with resource
Declaration
ResourceFileModel Overwrite(OverwriteResourceModel model, byte[] resource)
Parameters
OverwriteResourceModel
model
The model containing the overwrite operation data |
System.Byte[]
resource
The new contents of the resource |
Returns
ResourceFileModel
ResourceFileModel, containg the information about the file. |
ResourceExists(String)
Determines if a resource with the provided URI exists.
Declaration
bool ResourceExists(string uri)
Parameters
System.String
uri
The unique resource identifier (URI) of the resource. |
Returns
System.Boolean
true, if the resource exists, else false. |
ResourceNameExists(String)
Determines if a resource with the provided name exists.
Declaration
bool ResourceNameExists(string resourceName)
Parameters
System.String
resourceName
The full path to the resource using Name identifiers. |
Returns
System.Boolean
true, if the resource exists, else false. |
Save(String, Byte[])
Saves the new bytes of a resource name and returns the resource file's location.
Declaration
[Obsolete("Telerik.WebReportDesigner.Services.IResourceStorage.Save(string, byte[]) is now obsolete. Please use Telerik.WebReportDesigner.Services.IResourceStorage.Save(SaveResourceModel, byte[])", false)]
string Save(string resourceName, byte[] resource)
Parameters
System.String
resourceName
|
System.Byte[]
resource
|
Returns
System.String
|
Search(SearchResourcesModel)
Searches for resource in the given ResourceFolderUri
Declaration
IEnumerable<ResourceModelBase> Search(SearchResourcesModel model)
Parameters
SearchResourcesModel
model
The model containing the search operation data |
Returns
System.Collections.Generic.IEnumerable<ResourceModelBase>
The search results, both files and folders, as an enumerable of ResourceModelBase |