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

name string

The name of the resource.

isCollection bool

Indicates if the resource is a collection.

handler ResourceHandler

The 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

name string

The name of the resource.

isCollection bool

Indicates if the resource is a collection.

handler ResourceHandler

The resource handler function that should be called when requests for this resource are received.

requiredCapability string

The 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

name string

The name of the resource.

isCollection bool

Indicates if the resource is a collection.

isDefaultCollection bool

Indicates if the resource is a default collection.

handler ResourceHandler

The 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

name string

The name of the resource.

isCollection bool

Indicates if the resource is a collection.

isDefaultCollection bool

Indicates if the resource is a default collection.

handler ResourceHandler

The resource handler function that should be called when requests for this resource are received.

requiredCapability string

The 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

List<RestOperation>

resources

The children resources of the resource.

public List<RestResource> resources

Field Value

List<RestResource>

Properties

RequiredCapability

The capability required in a configuration for a resource to be callable.

public string RequiredCapability { get; set; }

Property Value

string

isCollection

Indicates if the resource is a collection.

public bool isCollection { get; set; }

Property Value

bool

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

bool

name

The name of the resource.

public string name { get; set; }

Property Value

string

Methods

ToJsonObject()

Converts the resource into a JsonObject instance.

public JsonObject ToJsonObject()

Returns

JsonObject