Class RestResource
- Namespace
- ESRI.Server.SOESupport
- Assembly
- ESRI.Server.SOESupport.dll
A class that represents a REST resource.
public sealed class RestResource
- Inheritance
-
RestResource
- Inherited Members
Constructors
RestResource(string, bool, ResourceHandler)
Creates a new RestResource instance.
public RestResource(string name, bool isCollection, ResourceHandler handler)
Parameters
namestringThe name of the resource.
isCollectionboolIndicates if the resource is a collection.
handlerResourceHandlerThe resource handler function that should be called when requests for this resource are received.
RestResource(string, bool, ResourceHandler, string)
Creates a new RestResource instance.
public RestResource(string name, bool isCollection, ResourceHandler handler, string requiredCapability)
Parameters
namestringThe name of the resource.
isCollectionboolIndicates if the resource is a collection.
handlerResourceHandlerThe resource handler function that should be called when requests for this resource are received.
requiredCapabilitystringThe capability required in a configuration for this resource to be callable.
RestResource(string, bool, bool, ResourceHandler)
Creates a new RestResource instance.
public RestResource(string name, bool isCollection, bool isDefaultCollection, ResourceHandler handler)
Parameters
namestringThe name of the resource.
isCollectionboolIndicates if the resource is a collection.
isDefaultCollectionboolIndicates if the resource is a default collection.
handlerResourceHandlerThe resource handler function that should be called when requests for this resource are received.
RestResource(string, bool, bool, ResourceHandler, string)
Creates a new RestResource instance.
public RestResource(string name, bool isCollection, bool isDefaultCollection, ResourceHandler handler, string requiredCapability)
Parameters
namestringThe name of the resource.
isCollectionboolIndicates if the resource is a collection.
isDefaultCollectionboolIndicates if the resource is a default collection.
handlerResourceHandlerThe resource handler function that should be called when requests for this resource are received.
requiredCapabilitystringThe capability required in a configuration for this resource to be callable.
Fields
operations
The operations supported by the resource.
public List<RestOperation> operations
Field Value
resources
The children resources of the resource.
public List<RestResource> resources
Field Value
Properties
RequiredCapability
The capability required in a configuration for a resource to be callable.
public string RequiredCapability { get; set; }
Property Value
isCollection
Indicates if the resource is a collection.
public bool isCollection { get; set; }
Property Value
isDefaultCollection
Indicates if the resource is a default collection. Default collection is a collection resource that can allows collection item access by a short URL. For example: if we have 'layers' resource, it's usually allows item access by this URL: <base url>/layers/<itemID> If you make it a default collection, you will be able to access it by the short URL: <base url>/<itemID> There can only be one default collection per set of siblings. For example: if we have two siblings <base url>/layers and <base url>/tables, only one can be a default collection.
public bool isDefaultCollection { get; set; }
Property Value
name
The name of the resource.
public string name { get; set; }
Property Value
Methods
ToJsonObject()
Converts the resource into a JsonObject instance.
public JsonObject ToJsonObject()