Namespace: OpenEdge.Web.DataObject
Class
ServiceRegistry
Parent classes:
Inherits: Progress.Lang.Object

/* *************************************************************************************************************************
Copyright (c) 2016-2018 by Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved.
File:ServiceRegistry
Purpose:Static implementation wrappeter around a service registry
Author(s):pjudge
Created:Wed May 18 13:06:41 EDT 2016
Notes:* static members let multiple DataObjectHandler instances use this
/* Holds the class that does loads from JSON into the registry




Method Summary
Options Name Purpose
OpenEdge.Web.DataObject.MappedOperation GetOperation (character, character, MethodEnum) /* Returns details about the operation @param character The serviceName @param character The relative URI @param MethodEnum The HTTP method @return MappedOperation The operation map for this Method/URI */
OpenEdge.Web.DataObject.MappedOperation GetOperation (character, SemanticVersion, character, MethodEnum) /* Returns details about the operation @param character The serviceName @param SemanticVersion The service version @param character The relative URI @param MethodEnum The HTTP method @return MappedOperation The operation map for this Method/URI */
OpenEdge.Web.DataObject.MappedOperation GetOperations (character, SemanticVersion) /* Returns an array or operations for the service @param character The serviceName @param SemanticVersion The service version @return MappedOperation[] The operations for this service */
HANDLE GetSchema (character, character) /* Returns a schema for a given service oepration. @param character The service name @param character The schema name @return handle An empty data structure (TT or PDS) */
OpenEdge.Web.DataObject.DataObjectService GetService (character) /* Returns a the latest version of a service @param character The name of the service to remove from the registry @return DataObjectService A data service 'header' */
OpenEdge.Web.DataObject.DataObjectService GetService (character, character) /* Returns a service object @param character The name of the service to remove from the registry @param character The service version to retrieve @return DataObjectService A data service 'header' */
Progress.Json.ObjectModel.JsonObject GetServiceCatalog (character) /* Returns a catalog for a named service @param character The service name. @return JsonObject A JSDO catalog. If no exist or none can be found, return null. @throws AssertionFailedError If the name is empty or null @throws AppError If the requested service does not exist in the registry */
OpenEdge.Web.DataObject.ServiceOptions GetServiceOptions (character) /* Returns the service options for a named service @param character The service name. @return ServiceOptions A JSDO object containing options. If no exist or none can be found, return an empty JSON object. @throws AssertionFailedError If the name is empty or null */
OpenEdge.Web.DataObject.DataObjectService GetServices () /* Returns all registered services @return DataObjectService[] extent An array of registered services. indeterminate if none. */
LOGICAL HasOperation (character, character, MethodEnum) /* Indicates whether a mapped operation exists @param character the service name @param character The relative URI (to the service) @param MethodEnum The HTTP method @return logical TRUE if the service exists */
LOGICAL HasService (character) /* Indicates whether a named service is available in the registry. @param character The name of the mapped service @return logical TRUE if the service exists */
LOGICAL HasService (character, character) /* Indicates whether a named service is available in the registry. @param character The name of the mapped service @param character The service version @return logical TRUE if the service exists */
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 */
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. @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. @param character The name of the mapped service @param character A version of the service to load @param character The name of the webapp currently executed @return logical TRUE if the service exists */

Constructor Summary
Options Name Purpose
ServiceRegistry () /* Default constructor. Private to prevent instantiation */

Property Summary
Options Name Purpose
OpenEdge.Web.DataObject.ServiceRegistryLoader Loader
OpenEdge.Web.DataObject.IServiceRegistry Registry
CHARACTER ROOT_SERVICE_NAME
CHARACTER ROOT_SERVICE_URI


Method Detail
Top

OpenEdge.Web.DataObject.MappedOperation GetOperation (character, character, MethodEnum)

/* Returns details about the operation
Parameters:
pcServiceName CHARACTER
pcServiceURI CHARACTER
poMethod OpenEdge.Net.HTTP.MethodEnum
Returns OpenEdge.Web.DataObject.MappedOperation
MappedOperation The operation map for this Method/URI
Top

OpenEdge.Web.DataObject.MappedOperation GetOperation (character, SemanticVersion, character, MethodEnum)

/* Returns details about the operation
Parameters:
pServiceName CHARACTER
pVersion OpenEdge.Core.SemanticVersion
pServiceURI CHARACTER
pMethod OpenEdge.Net.HTTP.MethodEnum
Returns OpenEdge.Web.DataObject.MappedOperation
MappedOperation The operation map for this Method/URI
Top

OpenEdge.Web.DataObject.MappedOperation GetOperations (character, SemanticVersion)

/* Returns an array or operations for the service
Parameters:
pServiceName CHARACTER
pVersion OpenEdge.Core.SemanticVersion
Returns OpenEdge.Web.DataObject.MappedOperation
MappedOperation[] The operations for this service
Top

HANDLE GetSchema (character, character)

/* Returns a schema for a given service oepration.
Parameters:
pcServiceName CHARACTER
pcSchemaName CHARACTER
Returns HANDLE
handle An empty data structure (TT or PDS)
Top

OpenEdge.Web.DataObject.DataObjectService GetService (character)

/* Returns a the latest version of a service
Parameters:
pServiceName CHARACTER
Returns OpenEdge.Web.DataObject.DataObjectService
DataObjectService A data service 'header'
Top

OpenEdge.Web.DataObject.DataObjectService GetService (character, character)

/* Returns a service object
Parameters:
pServiceName CHARACTER
pVersion CHARACTER
Returns OpenEdge.Web.DataObject.DataObjectService
DataObjectService A data service 'header'
Top

Progress.Json.ObjectModel.JsonObject GetServiceCatalog (character)

/* Returns a catalog for a named service
@throws AssertionFailedError If the name is empty or null
@throws AppError If the requested service does not exist in the registry
Parameters:
pcServiceName CHARACTER
Returns Progress.Json.ObjectModel.JsonObject
JsonObject A JSDO catalog. If no exist or none can be found, return null.
Top

OpenEdge.Web.DataObject.ServiceOptions GetServiceOptions (character)

/* Returns the service options for a named service
found, return an empty JSON object.
@throws AssertionFailedError If the name is empty or null
Parameters:
pcServiceName CHARACTER
Returns OpenEdge.Web.DataObject.ServiceOptions
ServiceOptions A JSDO object containing options. If no exist or none can be
Top

OpenEdge.Web.DataObject.DataObjectService GetServices ()

/* Returns all registered services
Returns OpenEdge.Web.DataObject.DataObjectService
DataObjectService[] extent An array of registered services. indeterminate if none.
Top

LOGICAL HasOperation (character, character, MethodEnum)

/* Indicates whether a mapped operation exists
Parameters:
pcServiceName CHARACTER
pcServiceURI CHARACTER
poMethod OpenEdge.Net.HTTP.MethodEnum
Returns LOGICAL
logical TRUE if the service exists
Top

LOGICAL HasService (character)

/* Indicates whether a named service is available in the registry.
Parameters:
pcServiceName CHARACTER
Returns LOGICAL
logical TRUE if the service exists
Top

LOGICAL HasService (character, character)

/* Indicates whether a named service is available in the registry.
Parameters:
pServiceName CHARACTER
pVersion CHARACTER
Returns LOGICAL
logical TRUE if the service exists
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

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
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.
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.
Parameters:
pcServiceName CHARACTER
pVersion CHARACTER
pcWebAppPath CHARACTER
Returns LOGICAL
logical TRUE if the service exists


Constructor Detail
Top

ServiceRegistry ()

/* Default constructor. Private to prevent instantiation


Property Detail
Top

OpenEdge.Web.DataObject.ServiceRegistryLoader Loader

Returns OpenEdge.Web.DataObject.ServiceRegistryLoader
Top

OpenEdge.Web.DataObject.IServiceRegistry Registry

Returns OpenEdge.Web.DataObject.IServiceRegistry
Top

CHARACTER ROOT_SERVICE_NAME

Returns CHARACTER
Top

CHARACTER ROOT_SERVICE_URI

Returns CHARACTER


Copyright © 2022 Progress Software Corporation. All rights Reserved.

Progress® OpenEdge® Release 11.7.15