Reference Source
public class | source

ResourcesSvcProvider

Extends:

devapt-core-common/dist/js/services/service_provider~ServiceProvider → ResourcesSvcProvider

Resources service provider class.

Constructor Summary

Public Constructor
public

constructor(arg_provider_name: string, arg_service_instance: Service, arg_context: string): nothing

Create a resources gateway service provider.

Member Summary

Public Members
public

exec: Executable

Service executable instance.

public

Class test flag.

Method Summary

Public Methods
public

fill_error(arg_response: ServiceResponse, arg_operands: array, arg_error: string, arg_tenant: string, arg_application: string, arg_collection: string, arg_resource: string): nothing

Populate a response with error message.

public abstract

Get provider operations names.

public

get_resource_json(arg_resource: Instance): object

Get resource settings.

public

produce(arg_request: ServiceRequest): Promise

Produce service datas on request.

Public Constructors

public constructor(arg_provider_name: string, arg_service_instance: Service, arg_context: string): nothing source

Create a resources gateway service provider.

Params:

NameTypeAttributeDescription
arg_provider_name string

consumer name.

arg_service_instance Service

service instance.

arg_context string

logging context label.

Return:

nothing

Public Members

public exec: Executable source

Service executable instance.

public is_resources_svc_provider: boolean source

Class test flag.

Public Methods

public fill_error(arg_response: ServiceResponse, arg_operands: array, arg_error: string, arg_tenant: string, arg_application: string, arg_collection: string, arg_resource: string): nothing source

Populate a response with error message.

Params:

NameTypeAttributeDescription
arg_response ServiceResponse

response instance.

arg_operands array

request operands.

arg_error string

error text.

arg_tenant string

tenant name.

arg_application string

application name.

arg_collection string

collection name.

arg_resource string

resource name.

Return:

nothing

public abstract get_operations_names(): array source

Get provider operations names.

Return:

array

public get_resource_json(arg_resource: Instance): object source

Get resource settings.

Params:

NameTypeAttributeDescription
arg_resource Instance

resource instance.

Return:

object

public produce(arg_request: ServiceRequest): Promise source

Produce service datas on request.

Params:

NameTypeAttributeDescription
arg_request ServiceRequest

service request instance.

Return:

Promise

promise of ServiceResponse instance.