Namespace: OpenEdge.Web.DataObject
Class
ServiceRegistryLoader
Parent classes:
Inherits: Progress.Lang.Object
Implements: OpenEdge.Logging.ISupportLogging

/* *************************************************************************************************************************
Copyright (c) 2016-2019 by Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved.
File:ServiceRegistryLoader
Purpose:Loads DOH services from a JSON file
Author(s):pjudge
Created:Wed May 18 13:06:41 EDT 2016
/* We never add records to this, just




Method Summary
Options Name Purpose
AddRelations (handle, JsonArray) /* Adds relations between TTs in a dataset @param handle The dataset @param JsonArray An array of relations */
OpenEdge.Web.DataObject.OperationOptions CreateOperationOptions (JsonObject) /* Creates an Operations Options object from the JSON config. This method will always return an instance, even if an invalid object is passed in. @param JsonObject The JSON defining the options @return OperationOptions A usable options object. */
HANDLE CreateTempTable (character, JsonObject) /* Creates a temp-table from the JSON config in the mapping file @param character The temp-table name @param JsonObject The JSON containing the table definition @return handle A prepared table-handle */
LOGICAL LoadFromFile (character, character, handle) /* Loads a named service from a file @param character The service name to load @param character A version to load @param handle The FILE-INFO handle for the file @return logical TRUE if the named service was found */
LoadFromFile (handle) /* Loads all services from the file @param handle The FILE-INFO handle for the file. */
INTEGER LoadOperations (DataObjectService, JsonObject) /* Converts a JSON map into internal structures @param DataObjectService The service @param JsonObject The operation map @return integer The number of operations loaded */
LoadSchemaOptions (SchemaOption, JsonObject) /* Loads schema options for a given schema and its children @param SchemaOption The current option to populate @param JsonObject The config data from the MAP/GEN file */
INTEGER LoadSchemas (DataObjectService, JsonObject) /* Converts a JSON map into internal structures @param DataObjectService The service @param JsonObject The set of schema @return integer The number of schemas loaded */
LoadService (character, character, JsonObject) /* Loads and registers a single service name/version service from JSON @param character The service name @param JsonObject The service definition */
LoadServiceOptions (DataObjectService, JsonObject) /** Loads service options from JSON. @param DataObjectService The service @param JsonObject The service options */
LoadServiceWriters (DataObjectService, JsonArray) /** Loads service writers from JSON. @param DataObjectService The service @param JsonObject The service options */
RegisterAllFromFolder (character) /* Registers all services found in a given folder. Can be used at agent startup @param character An extant folder */
RegisterFromFile (character) /* Registers all services found in a given file. Can be used at agent startup @param character An extant file */
RegisterFromFile (character, character) /* Registers a named service found in a given file. Can be used at agent startup @param character A service name @param character An extant file */
OpenEdge.Web.DataObject.DataObjectService RegisterService (character, character, JsonObject, JsonObject, JsonObject) /* Register a service in this handler. @param character (mandatory) The service name. @param JsonObject (recommended) An operation map for the service. @param JsonObject (optional) A catalog for the service. Optional since it may exist on disk */
LOGICAL TryFindService (character, character) /* Indicates whether a named service is available. Will attempt to locate a service map if it is not yet registered, and will register it if one can be found. The search path for finding the service mapping files is 1. Look in the webapp's WEB-INF/openedge folder first 2. Look in the instance's /openedge folder next 3. Look in the rest of PROPATH @param character The name of the mapped service @param character The name of the webapp currently executed @return logical TRUE if the service exists */
LOGICAL TryFindService (character, character, character) /* Indicates whether a named service is available. Will attempt to locate a service map if it is not yet registered, and will register it if one can be found. The search path for finding the service mapping files is 1. Look in the webapp's WEB-INF/openedge folder first 2. Look in the instance's /openedge folder next 3. Look in the rest of PROPATH @param character The name of the mapped service @param character The version of the service @param character The name of the webapp currently executed @return logical TRUE if the service exists */

Constructor Summary
Options Name Purpose
ServiceRegistryLoader () /* Default constructor */
ServiceRegistryLoader (IServiceRegistry) /* Constructor @param IServiceRegistry The registry into which to load the services */

Property Summary
Options Name Purpose
OpenEdge.Logging.ILogWriter Logger
OpenEdge.Web.DataObject.IServiceRegistry Registry


Method Detail
Top

AddRelations (handle, JsonArray)

/* Adds relations between TTs in a dataset
Parameters:
pDataset HANDLE
pRelations Progress.Json.ObjectModel.JsonArray
Top

OpenEdge.Web.DataObject.OperationOptions CreateOperationOptions (JsonObject)

/* Creates an Operations Options object from the JSON config. This method will always return an instance,
even if an invalid object is passed in.
Parameters:
pData Progress.Json.ObjectModel.JsonObject
Returns OpenEdge.Web.DataObject.OperationOptions
OperationOptions A usable options object.
Top

HANDLE CreateTempTable (character, JsonObject)

/* Creates a temp-table from the JSON config in the mapping file
Parameters:
pcName CHARACTER
poTable Progress.Json.ObjectModel.JsonObject
Returns HANDLE
handle A prepared table-handle
Top

LOGICAL LoadFromFile (character, character, handle)

/* Loads a named service from a file
Parameters:
pcServiceName CHARACTER
pVersion CHARACTER
phFile HANDLE
Returns LOGICAL
logical TRUE if the named service was found
Top

LoadFromFile (handle)

/* Loads all services from the file
Parameters:
phFile HANDLE
Top

INTEGER LoadOperations (DataObjectService, JsonObject)

/* Converts a JSON map into internal structures
Parameters:
pService OpenEdge.Web.DataObject.DataObjectService
poOperations Progress.Json.ObjectModel.JsonObject
Returns INTEGER
integer The number of operations loaded
Top

LoadSchemaOptions (SchemaOption, JsonObject)

/* Loads schema options for a given schema and its children
Parameters:
pSchemaOption OpenEdge.Web.DataObject.SchemaOption
pData Progress.Json.ObjectModel.JsonObject
Top

INTEGER LoadSchemas (DataObjectService, JsonObject)

/* Converts a JSON map into internal structures
Parameters:
pService OpenEdge.Web.DataObject.DataObjectService
poSchemas Progress.Json.ObjectModel.JsonObject
Returns INTEGER
integer The number of schemas loaded
Top

LoadService (character, character, JsonObject)

/* Loads and registers a single service name/version service from JSON
Parameters:
pServiceName CHARACTER
pVersion CHARACTER
pService Progress.Json.ObjectModel.JsonObject
Top

LoadServiceOptions (DataObjectService, JsonObject)

Purpose: Loads service options from JSON.
Parameters:
pService OpenEdge.Web.DataObject.DataObjectService
pData Progress.Json.ObjectModel.JsonObject
Top

LoadServiceWriters (DataObjectService, JsonArray)

Purpose: Loads service writers from JSON.
Parameters:
pService OpenEdge.Web.DataObject.DataObjectService
pData Progress.Json.ObjectModel.JsonArray
Top

RegisterAllFromFolder (character)

/* Registers all services found in a given folder. Can be used at agent startup
Parameters:
pcFolder CHARACTER
Top

RegisterFromFile (character)

/* Registers all services found in a given file. Can be used at agent startup
Parameters:
pcFile CHARACTER
Top

RegisterFromFile (character, character)

/* Registers a named service found in a given file. Can be used at agent startup
Parameters:
pcServiceName CHARACTER
pcFile CHARACTER
Top

OpenEdge.Web.DataObject.DataObjectService RegisterService (character, character, JsonObject, JsonObject, JsonObject)

/* Register a service in this handler.
Parameters:
pcServiceName CHARACTER
pcVersion CHARACTER
poOperations Progress.Json.ObjectModel.JsonObject
poCatalog Progress.Json.ObjectModel.JsonObject
poSchemas Progress.Json.ObjectModel.JsonObject
Returns OpenEdge.Web.DataObject.DataObjectService
Top

LOGICAL TryFindService (character, character)

/* Indicates whether a named service is available. Will attempt to
locate a service map if it is not yet registered, and will register
it if one can be found. The search path for finding the service mapping
files is
1. Look in the webapp's WEB-INF/openedge folder first
2. Look in the instance's /openedge folder next
3. Look in the rest of PROPATH
Parameters:
pcServiceName CHARACTER
pcWebAppPath CHARACTER
Returns LOGICAL
logical TRUE if the service exists
Top

LOGICAL TryFindService (character, character, character)

/* Indicates whether a named service is available. Will attempt to
locate a service map if it is not yet registered, and will register
it if one can be found. The search path for finding the service mapping
files is
1. Look in the webapp's WEB-INF/openedge folder first
2. Look in the instance's /openedge folder next
3. Look in the rest of PROPATH
Parameters:
pServiceName CHARACTER
pVersion CHARACTER
pWebAppPath CHARACTER
Returns LOGICAL
logical TRUE if the service exists


Constructor Detail
Top

ServiceRegistryLoader ()

/* Default constructor
Top

ServiceRegistryLoader (IServiceRegistry)

/* Constructor
Parameters:
pRegistry OpenEdge.Web.DataObject.IServiceRegistry


Property Detail
Top

OpenEdge.Logging.ILogWriter Logger

Returns OpenEdge.Logging.ILogWriter
Top

OpenEdge.Web.DataObject.IServiceRegistry Registry

Returns OpenEdge.Web.DataObject.IServiceRegistry


Copyright © 2022 Progress Software Corporation. All rights Reserved.

Progress® OpenEdge® Release 11.7.15