A class that represents a REST resource.
Constructors
Name | Description |
---|---|
RestResource(String, Boolean, ResourceHandler) | Creates a new RestResource instance. |
RestResource(String, Boolean, ResourceHandler, String) | Creates a new RestResource instance. |
RestResource(String, Boolean, Boolean, ResourceHandler) | Creates a new RestResource instance. |
RestResource(String, Boolean, Boolean, ResourceHandler, String) | Creates a new RestResource instance. |
RestResource(String, Boolean, ResourceHandler) Constructor
Creates a new RestResource instance.
public RestResource(string name,
bool isCollection,
ResourceHandler handler)
Parameter | Description |
---|---|
name | The name of the resource. |
isCollection | Indicates if the resource is a collection. |
handler | The resource handler function that should be called when requests for this resource are received. |
RestResource(String, Boolean, ResourceHandler, String) Constructor
Creates a new RestResource instance.
public RestResource(string name,
bool isCollection,
ResourceHandler handler,
string requiredCapability)
Parameter | Description |
---|---|
name | The name of the resource. |
isCollection | Indicates if the resource is a collection. |
handler | The resource handler function that should be called when requests for this resource are received. |
requiredCapability: | The capability required in a configuration for this resource to be callable. |
RestResource(String, Boolean, Boolean, ResourceHandler) Constructor
Creates a new RestResource instance.
public RestResource(string name,
bool isCollection,
bool isDefaultCollection,
ResourceHandler handler)
Parameter | Description |
---|---|
name | The name of the resource. |
isCollection | Indicates if the resource is a collection. |
isDefaultCollection | Indicates if the resource is a default collection. |
handler | The resource handler function that should be called when requests for this resource are received. |
RestResource(String, Boolean, Boolean, ResourceHandler, String) Constructor
Creates a new RestResource instance.
public RestResource(string name,
bool isCollection,
bool isDefaultCollection,
ResourceHandler handler,
string requiredCapability)
Parameter | Description |
---|---|
name | The name of the resource. |
isCollection | Indicates if the resource is a collection. |
isDefaultCollection | Indicates if the resource is a default collection. |
handler | The resource handler function that should be called when requests for this resource are received. |
requiredCapability | The capability required in a configuration for this resource to be callable. |
Properties
Property | Property value | Description |
---|---|---|
RestResource.name | String | The resource name. |
RestResource.isCollection | Boolean | Indicates if the resource is a default collection. |
RestResource.isDefaultCollection | Boolean | 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 If you make it a default collection, you will be able to access it by the short URL: <base url There can only be one default collection per set of siblings. For example: if we have two siblings <base url and <base url , only one can be a default collection. |
RestResource.RequiredCapability | String | The capability required in a configuration for a resource to be callable. |
Fields
Field | Field value | Description |
---|---|---|
RestResource.operations | List<RestOperation> | The operations supported by the resource. |
RestResource.resources | List<RestResource> | The children resources of the resource. |
Methods
Name | Description |
---|---|
RestResource.ToJsonObject() | Converts the resource into a JsonObject instance. |
RestResource.ToJsonObject() Method
Converts the resource into a JsonObject instance.
public JsonObject ToJsonObject()