Search Results for

    Show / Hide Table of Contents

    Interface IResourceService

    Provides services for accessing resources in a repository

    Namespace: OSGeo.MapGuide.MaestroAPI.Services
    Assembly: OSGeo.MapGuide.MaestroAPI.dll
    Syntax
    public interface IResourceService : IService
    Remarks

    Note that IServerConnection provides built-in access to resource and feature services. Using the OSGeo.MapGuide.MaestroAPI.IServerConnection.GetService method is not necessary

    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
    Type Name Description
    System.String oldResourceID
    System.String newResourceID
    LengthyOperationCallBack callback
    LengthyOperationProgressCallBack progress
    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 Description
    T
    Type Parameters
    Name Description
    T
    | 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
    Type Description
    ResourceDataList
    | 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
    Type Description
    ResourceReferenceList
    | 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
    Type Description
    UnmanagedDataList

    A list of unmanaged data

    | Improve this Doc View Source

    GetFolderHeader(String)

    Gets the folder header of the specified resource

    Declaration
    ResourceFolderHeaderType GetFolderHeader(string resourceID)
    Parameters
    Type Name Description
    System.String resourceID
    Returns
    Type Description
    ResourceFolderHeaderType
    | Improve this Doc View Source

    GetRepositoryResources()

    Gets a listing of resources in this repository. This performs a full listing

    Declaration
    ResourceList GetRepositoryResources()
    Returns
    Type Description
    ResourceList
    | 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
    Type Description
    ResourceList
    | 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
    Type Description
    ResourceList
    | 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
    Type Description
    ResourceList
    | 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
    Type Description
    ResourceList
    | 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
    Type Description
    ResourceList
    | 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
    Type Description
    ResourceList
    | 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
    Type Description
    IResource
    | 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

    GetResourceHeader(String)

    Gets the document header of the specified resource

    Declaration
    ResourceDocumentHeaderType GetResourceHeader(string resourceID)
    Parameters
    Type Name Description
    System.String resourceID
    Returns
    Type Description
    ResourceDocumentHeaderType
    Remarks

    This operation does not work with session-based resources.

    | 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
    Type Name Description
    System.String oldResourceID
    System.String newResourceID
    LengthyOperationCallBack callback
    LengthyOperationProgressCallBack progress
    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
    Type Name Description
    IResource resource
    | 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

    Remarks

    The resourceID parameter only instructs this method where to save the resource to. It does not modify the IResource.ResourceID property of the input resource does not get updated as a result of this operation.

    | 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

    SetFolderHeader(String, ResourceFolderHeaderType)

    Sets the header for the specified folder

    Declaration
    void SetFolderHeader(string resourceID, ResourceFolderHeaderType header)
    Parameters
    Type Name Description
    System.String resourceID
    ResourceFolderHeaderType header
    | 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
    Remarks

    For the HTTP implementation of this API, the input stream must be seekable

    | 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
    Type Name Description
    System.String resourceID
    System.String dataName
    ResourceDataType dataType
    System.IO.Stream stream
    Utility.StreamCopyProgressDelegate callback
    Remarks

    For the HTTP implementation of this API, the input stream must be seekable

    | Improve this Doc View Source

    SetResourceHeader(String, ResourceDocumentHeaderType)

    Sets the header for the specified resource

    Declaration
    void SetResourceHeader(string resourceID, ResourceDocumentHeaderType header)
    Parameters
    Type Name Description
    System.String resourceID
    ResourceDocumentHeaderType header
    | 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

    UpdateRepository(String, ResourceFolderHeaderType)

    Updates the repository

    Declaration
    void UpdateRepository(string resourceID, ResourceFolderHeaderType header)
    Parameters
    Type Name Description
    System.String resourceID
    ResourceFolderHeaderType header
    | 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
    Type Description
    ResourceEventHandler
    | 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
    Type Description
    ResourceEventHandler
    | Improve this Doc View Source

    ResourceUpdated

    Raised when a resource is updated

    Declaration
    event ResourceEventHandler ResourceUpdated
    Event Type
    Type Description
    ResourceEventHandler
    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2009 - 2022 Jackie Ng