Interface IResourceService
Provides services for accessing resources in a repository
Assembly: OSGeo.MapGuide.MaestroAPI.dll
Syntax
public interface IResourceService : IService
Methods
|
Improve this Doc
View Source
CopyFolderWithReferences(String, String, LengthyOperationCallBack, LengthyOperationProgressCallBack)
Copies the specified folder to the specified path. Any resources referencing this folder
are updated to reference the resources's new location
Declaration
bool CopyFolderWithReferences(string oldResourceID, string newResourceID, LengthyOperationCallBack callback, LengthyOperationProgressCallBack progress)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
CopyResource(String, String, Boolean)
Copies the specified resource to the specified path
Declaration
void CopyResource(string oldResourceID, string newResourceID, bool overwrite)
Parameters
Type |
Name |
Description |
System.String |
oldResourceID |
|
System.String |
newResourceID |
|
System.Boolean |
overwrite |
|
|
Improve this Doc
View Source
DeleteResource(String)
Delete the specified resource. For folders, ensure the resource ID has a trailing slash "/"
Declaration
void DeleteResource(string resourceID)
Parameters
Type |
Name |
Description |
System.String |
resourceID |
|
|
Improve this Doc
View Source
DeleteResourceData(String, String)
Deletes the specified attached resource data
Declaration
void DeleteResourceData(string resourceID, string dataname)
Parameters
Type |
Name |
Description |
System.String |
resourceID |
|
System.String |
dataname |
|
|
Improve this Doc
View Source
DeserializeObject<T>(Stream)
Converts the specified XML stream to a strongly typed object
Declaration
T DeserializeObject<T>(Stream data)
Parameters
Type |
Name |
Description |
System.IO.Stream |
data |
|
Returns
Type Parameters
|
Improve this Doc
View Source
EnumerateResourceData(String)
Gets a listing of all resource data attached to the specified resource
Declaration
ResourceDataList EnumerateResourceData(string resourceID)
Parameters
Type |
Name |
Description |
System.String |
resourceID |
|
Returns
|
Improve this Doc
View Source
EnumerateResourceReferences(String)
Gets a listing of all resources dependent on the specified resource
Declaration
ResourceReferenceList EnumerateResourceReferences(string resourceID)
Parameters
Type |
Name |
Description |
System.String |
resourceID |
|
Returns
|
Improve this Doc
View Source
EnumerateUnmanagedData(String, String, Boolean, UnmanagedDataTypes)
Enumerates all unmanaged folders, meaning alias'ed folders
Declaration
UnmanagedDataList EnumerateUnmanagedData(string startpath, string filter, bool recursive, UnmanagedDataTypes type)
Parameters
Type |
Name |
Description |
System.String |
startpath |
The path to retrieve the data from
|
System.String |
filter |
A filter applied to the items
|
System.Boolean |
recursive |
True if the list should contains recursive results
|
UnmanagedDataTypes |
type |
The type of data to return
|
Returns
|
Improve this Doc
View Source
Gets the folder header of the specified resource
Declaration
ResourceFolderHeaderType GetFolderHeader(string resourceID)
Parameters
Type |
Name |
Description |
System.String |
resourceID |
|
Returns
|
Improve this Doc
View Source
GetRepositoryResources()
Gets a listing of resources in this repository. This performs a full listing
Declaration
ResourceList GetRepositoryResources()
Returns
|
Improve this Doc
View Source
GetRepositoryResources(Int32)
Gets a listing of resources in this repository
Declaration
ResourceList GetRepositoryResources(int depth)
Parameters
Type |
Name |
Description |
System.Int32 |
depth |
|
Returns
|
Improve this Doc
View Source
GetRepositoryResources(String)
Gets a listing of resources in this repository
Declaration
ResourceList GetRepositoryResources(string startingpoint)
Parameters
Type |
Name |
Description |
System.String |
startingpoint |
|
Returns
|
Improve this Doc
View Source
GetRepositoryResources(String, Int32)
Gets a listing of resources in this repository
Declaration
ResourceList GetRepositoryResources(string startingpoint, int depth)
Parameters
Type |
Name |
Description |
System.String |
startingpoint |
|
System.Int32 |
depth |
|
Returns
|
Improve this Doc
View Source
GetRepositoryResources(String, String)
Gets a listing of resources in this repository
Declaration
ResourceList GetRepositoryResources(string startingpoint, string type)
Parameters
Type |
Name |
Description |
System.String |
startingpoint |
|
System.String |
type |
|
Returns
|
Improve this Doc
View Source
GetRepositoryResources(String, String, Int32)
Gets a listing of resources in this repository
Declaration
ResourceList GetRepositoryResources(string startingpoint, string type, int depth)
Parameters
Type |
Name |
Description |
System.String |
startingpoint |
|
System.String |
type |
|
System.Int32 |
depth |
|
Returns
|
Improve this Doc
View Source
GetRepositoryResources(String, String, Int32, Boolean)
Gets a listing of resources in this repository
Declaration
ResourceList GetRepositoryResources(string startingpoint, string type, int depth, bool computeChildren)
Parameters
Type |
Name |
Description |
System.String |
startingpoint |
|
System.String |
type |
|
System.Int32 |
depth |
|
System.Boolean |
computeChildren |
|
Returns
|
Improve this Doc
View Source
GetResource(String)
Gets a typed resource object from the specified resource id
Declaration
IResource GetResource(string resourceID)
Parameters
Type |
Name |
Description |
System.String |
resourceID |
|
Returns
|
Improve this Doc
View Source
GetResourceData(String, String)
Gets the stream of the attached data of the specified resource
Declaration
Stream GetResourceData(string resourceID, string dataname)
Parameters
Type |
Name |
Description |
System.String |
resourceID |
|
System.String |
dataname |
|
Returns
Type |
Description |
System.IO.Stream |
|
|
Improve this Doc
View Source
Gets the document header of the specified resource
Declaration
ResourceDocumentHeaderType GetResourceHeader(string resourceID)
Parameters
Type |
Name |
Description |
System.String |
resourceID |
|
Returns
|
Improve this Doc
View Source
GetResourceXmlData(String)
Gets the raw XML stream of the specified resource id
Declaration
Stream GetResourceXmlData(string resourceID)
Parameters
Type |
Name |
Description |
System.String |
resourceID |
|
Returns
Type |
Description |
System.IO.Stream |
|
|
Improve this Doc
View Source
MoveResource(String, String, Boolean)
Moves the specified resources to the specified path
Declaration
void MoveResource(string oldResourceID, string newResourceID, bool overwrite)
Parameters
Type |
Name |
Description |
System.String |
oldResourceID |
|
System.String |
newResourceID |
|
System.Boolean |
overwrite |
|
|
Improve this Doc
View Source
MoveResourceWithReferences(String, String, LengthyOperationCallBack, LengthyOperationProgressCallBack)
Moves the specified resources to the specified path. Any resources referencing this resource
are updated to reference the resource's new location
Declaration
bool MoveResourceWithReferences(string oldResourceID, string newResourceID, LengthyOperationCallBack callback, LengthyOperationProgressCallBack progress)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
ResourceExists(String)
Gets whether the specified resource id exists
Declaration
bool ResourceExists(string resourceID)
Parameters
Type |
Name |
Description |
System.String |
resourceID |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
SaveResource(IResource)
Saves an object into the repository
Declaration
void SaveResource(IResource resource)
Parameters
|
Improve this Doc
View Source
SaveResourceAs(IResource, String)
Saves an object into the repository using the specified resource id.
Declaration
void SaveResourceAs(IResource resource, string resourceID)
Parameters
Type |
Name |
Description |
IResource |
resource |
The object to save
|
System.String |
resourceID |
The resourceId to save the object as
|
|
Improve this Doc
View Source
SerializeObject(Object, Stream)
Serializes the specified object to the specified stream
Declaration
void SerializeObject(object o, Stream stream)
Parameters
Type |
Name |
Description |
System.Object |
o |
|
System.IO.Stream |
stream |
|
|
Improve this Doc
View Source
Sets the header for the specified folder
Declaration
void SetFolderHeader(string resourceID, ResourceFolderHeaderType header)
Parameters
|
Improve this Doc
View Source
SetResourceData(String, String, ResourceDataType, Stream)
Sets the resource data of a specified resource
Declaration
void SetResourceData(string resourceid, string dataname, ResourceDataType datatype, Stream stream)
Parameters
Type |
Name |
Description |
System.String |
resourceid |
|
System.String |
dataname |
|
ResourceDataType |
datatype |
|
System.IO.Stream |
stream |
|
|
Improve this Doc
View Source
SetResourceData(String, String, ResourceDataType, Stream, Utility.StreamCopyProgressDelegate)
Sets the resource data of a specified resource
Declaration
void SetResourceData(string resourceID, string dataName, ResourceDataType dataType, Stream stream, Utility.StreamCopyProgressDelegate callback)
Parameters
|
Improve this Doc
View Source
Sets the header for the specified resource
Declaration
void SetResourceHeader(string resourceID, ResourceDocumentHeaderType header)
Parameters
|
Improve this Doc
View Source
SetResourceXmlData(String, Stream)
Sets the raw XML data of the specified resource
Declaration
void SetResourceXmlData(string resourceID, Stream stream)
Parameters
Type |
Name |
Description |
System.String |
resourceID |
|
System.IO.Stream |
stream |
|
|
Improve this Doc
View Source
Touch(String)
Forces a timestamp update of the specified resource. This is akin to
setting the resource's content using its existing content.
Declaration
void Touch(string resourceID)
Parameters
Type |
Name |
Description |
System.String |
resourceID |
|
|
Improve this Doc
View Source
Declaration
void UpdateRepository(string resourceID, ResourceFolderHeaderType header)
Parameters
|
Improve this Doc
View Source
UploadPackage(String, Utility.StreamCopyProgressDelegate)
Upload a MapGuide Package file to the server
Declaration
void UploadPackage(string fileName, Utility.StreamCopyProgressDelegate callback)
Parameters
Type |
Name |
Description |
System.String |
fileName |
Name of the file to upload
|
Utility.StreamCopyProgressDelegate |
callback |
A callback argument used to display progress. May be null.
|
Events
|
Improve this Doc
View Source
ResourceAdded
Raised when a resource is added
Declaration
event ResourceEventHandler ResourceAdded
Event Type
|
Improve this Doc
View Source
ResourceDeleted
Raised when a resource is deleted. Note if a folder is deleted, this will
only be raised for the folder and not its children. Also note that this is
raised on any move operations as the original source is for all intents and
purposes, deleted.
Declaration
event ResourceEventHandler ResourceDeleted
Event Type
|
Improve this Doc
View Source
ResourceUpdated
Raised when a resource is updated
Declaration
event ResourceEventHandler ResourceUpdated
Event Type