Application service module to manage resources in the application.

Syntax

Response = HTTP_Resource_Manager_Services(@Service, @Params)

Returns

The meaning of the response value depends on the service.

Parameters

ParameterDescription
@ServiceThe name of the service being requested. Required.
@ParamsGeneric parameters. Refer to a specific service to determine the actual parameters used.

Remarks 

HTTP_Resource_Manager_Services provides useful services to update or retrieve information regarding the resources supported by the application. These services abstract the way resources are accessed which will make it easier to modify the way resource data is stored in the system. For instance, resources are current stored in a single configuration record in the SYSENV table but in the future these might be relocated to a dedicated table. If this happens, only the service logic needs to be updated to avoid breaking higher level processes that need access to resource data.

Services

ServiceDescription

GetResourceProperty

Usage:
HTTP_Resource_Manager_Services('GetResourceProperty', URLEndpoint, PropertyName)

Comments:
Returns the value of the indicated resource property for the indicated URL endpoint.

Returns:
See comments.

SetResourceProperty


Usage:
HTTP_Resource_Manager_Services('SetResourceProperty', URLEndpoint, PropertyName, PropertyValue)

Comments:
Sets (or updates) the value of the indicated resource property for the indicated URL endpoint.

Returns:
N/A

GetResourceChildren


Usage:
HTTP_Resource_Manager_Services('GetResourceChildren', URLEndpoint, ChildType)

Comments:
Returns an @FM delimited list of URL endpoints matching the indicated child type that are children to the indicated URL endpoint.

Returns:
See comments.

GetResourceSignature

Usage:
HTTP_Resource_Manager_Services('GetResourceSignature', URLEndpoint, Method)

Comments:
Returns the API calling signature for the indicated URL endpoint. This is used by the RunWebAPI service (a member of HTTP_Services) when calling the Web API module.

Returns:
See comments.

GetEndpointResourceKeyID


Usage:
HTTP_Resource_Manager_Services('GetEndpointResourceKeyID', URLEndpoint, AllowNew)

Comments:
Returns the resource Key ID for the indicated URL endpoint. If AllowNew is true, a URL endpoint will be returned that best matches the available endpoints but it will not be cached.

Returns:
See comments.

GetResource

Usage:
HTTP_Resource_Manager_Services('GetResource', URLEndpoint)

Comments:
Returns an array of resource property names and values for the indicated URL endpoint.

Returns:
See comments.

SetResource


Usage:
HTTP_Resource_Manager_Services('SetResource', URLEndpoint, PropertyArray)

Comments:
Updates the array of resource property names and values for the indicated URL endpoint. Note, this replaces the existing property names and values. Other services should be used to update an existing array and then call this service when the array is updated. The PropertyArray must have at least one property name and value.

Returns:
N/A

IsValidEndpoint


Usage:
HTTP_Resource_Manager_Services('IsValidEndpoint', URLEndpoint)

Comments:
Returns a Boolean flag indicating if the indicated URL endpoint exists.

Returns:
See comments.

GetResourceList

Usage:
HTTP_Resource_Manager_Services('GetResourceList')

Comments:
Returns the resource list for the current application.

Returns:
See comments.

Params

The proper use of the generic arguments are defined in the definition of each service above.


  • No labels