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

/* *************************************************************************************************************************
Copyright (c) 2016-2018 by Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved.
File:ServiceRegistryImpl
Purpose:Contains a registry for mapped services
Author(s):pjudge
Created:Wed May 18 13:06:41 EDT 2016
/* Event published when a a service has been de-registered




Method Summary
Options Name Purpose
DeregisterService (character, SemanticVersion) /* Removes a service registration. No-op of the service + version is not registered. @param character The name of the service to remove from the registry @param SemanticVersion The version to deregister */
FindServiceLatest (character, SemanticVersion, buffer) /* Helper method to find and position the Service buffer to the latest version of a given service. Caller must check availablity themselves. @param character The service name (normalised - no-/, not-empty) @param SemanticVersion The service version to start at. If none, start at v0.0.0 @param buffer The Service record to find. */
FindServiceRecord (character, SemanticVersion, buffer) /* Helper method to find and position the Service buffer to a given service+version. Caller must check availablity themselves. For unknown/unsure versions, use FindServiceLatest() @param character The service name @param SemanticVersion The service version @param buffer The Service record to find. */
OpenEdge.Web.DataObject.MappedOperation GetOperation (character, character) /* Returns details about the operation, for a service by name. If more than one operation exists with the same name, pick the first. @param character The service name @param character An optional name for the operation @return MappedOperation The operation map for this name */
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) /* Returns details about the operation, for a service by name. If more than one operation exists with the same name, pick the first. @param character The service name @param SemanticVersion The service version @param character An optional name for the operation @return MappedOperation The operation map for this name */
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 named schema for a latest version of a service. @param character The service name @param character The schema name @return handle An empty data structure (TT or PDS) */
HANDLE GetSchema (character, SemanticVersion, character) /* Returns a schema for a given service oepration. @param character The service name @param SemanticVersion The service version @param character The schema name @return handle An empty data structure (TT or PDS) */
HANDLE GetSchemas (character, SemanticVersion) /* Returns all of the schemas associated with the latest version of a service. @param character The service name @param SemanticVersion The service version @return handle[] An array of service schemas */
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 deregister @return DataObjectService A data service 'header' */
OpenEdge.Web.DataObject.DataObjectService GetService (character, SemanticVersion) /* Returns a versioned service. If this exact version is not found, then error @param character The name of the service to find @param SemanticVersion The service version to retrieve @return DataObjectService A data service */
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 The service options. @throws AssertionFailedError If the name is empty or null @throws AppError If the service is not registered */
OpenEdge.Web.DataObject.DataObjectService GetServices () /* Returns all registered services @return DataObjectService[] extent An array of registered services. indeterminate if none. */
OpenEdge.Core.SemanticVersion GetServiceVersions (character) /* Returns an array of versions for this service. @param character The service name @return SemanticVersion[] An array of service versions. Will always have at least 1 extent @throws AppError If the service is not registered */
LOGICAL HasOperation (character, character) /* Indicates whether a mapped operation exists with a given name @param character the service name @param character The operation name @return logical TRUE if the service exists */
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 HasOperation (character, SemanticVersion, character) /* Indicates whether a mapped operation exists with a given name @param character the service name @param SemanticVersion The service version @param character The operation name @return logical TRUE if the service exists */
LOGICAL HasOperation (character, SemanticVersion, character, MethodEnum) /* Indicates whether a mapped operation exists @param character the service name @param SemanticVersion The service version @param character The relative URI (to the service) @param MethodEnum The HTTP method @return logical TRUE if the service exists */
LOGICAL HasSchema (character, character) /* Indicates whether a schema exists with a given name @param character the service name @param character The schema name @return logical TRUE if the schema exists */
LOGICAL HasSchema (character, SemanticVersion, character) /* Indicates whether a schema exists with a given name @param character the service name @param SemanticVersion The service version @param character The schema name @return logical TRUE if the schema 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 */
LOGICAL HasService (character, SemanticVersion) /* Indicates whether a named, versioned service is available in the registry. @param character The name of the mapped service @param SemanticVersion The service version @return logical TRUE if the service exists */
OnServiceDeregistered (ServiceRegistryEventArgs) /* Publishes the ServiceDeregistered event @param ServiceRegistryEventArgs The event args */
OnServiceRegistered (ServiceRegistryEventArgs) /* Publishes the ServiceRegistered event @param ServiceRegistryEventArgs The event args */
PutOperation (character, SemanticVersion, MappedOperation) /* Adds a new operation map for a service. @param character The service name @param SemanticVersion The service version @param MappedOperation The operation map for this Method/URI */
PutSchema (character, SemanticVersion, character, handle) /* Saves a schema for a given service @param character The service name @param SemanticVersion The service version @param character The schema name @param handle An empty data structure (TT or PDS) */
PutServiceCatalog (character, SemanticVersion, JsonObject) /* Sets a catalog for a named service @param character The service name. @param SemanticVersion The service version @param 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 */
PutServiceOptions (character, SemanticVersion, ServiceOptions) /* Sets the service options for a named service @param character The service name. @param SemanticVersion The service version @param ServiceOptions The service options @throws AssertionFailedError If the name is empty or null @throws AppError If the requested service does not exist in the registry */
OpenEdge.Web.DataObject.DataObjectService RegisterService (character, SemanticVersion, ServiceOptions, JsonObject) /* Register a service @param character (mandatory) The service name @param SemanticVersion (mandatory) The service version @param ServiceOptions (optional) A set of options for the service @param JsonObject (optional) A catalog for the service. Not all services have catalogs @return DataObjectService The (registered) data service */
RegisterService (DataObjectService) /* Adds a service to this registry @param DataObjectService A data service object */
RemoveOperation (character, SemanticVersion, character, MethodEnum) /* Removes an operation mapping from the collection operation maps. No-op if none exists. @param character the service name @param SemanticVersion The service version @param character The relative URI @param MethodEnum The HTTP method */
RemoveSchema (character, SemanticVersion, character) /* Removes an operation schema from service No-op if none exists. @param character the service name @param SemanticVersion The service version @param character The schema name */

Constructor Summary
Options Name Purpose
ServiceRegistryImpl () /* Default constructor */

Event Summary
Options Name Purpose
ServiceDeregistered (Object, ServiceRegistryEventArgs) /* Event published when a a service has been de-registered @param Progress.Lang.Object The handler publishing the event @param HandlerErrorEventArgs Event args for this event */
ServiceRegistered (Object, ServiceRegistryEventArgs) /* Event published when a a service has been registered @param Progress.Lang.Object The handler publishing the event @param HandlerErrorEventArgs Event args for this event */

Property Summary
Options Name Purpose
OpenEdge.Logging.ILogWriter Logger


Method Detail
Top

DeregisterService (character, SemanticVersion)

/* Removes a service registration. No-op of the service + version is not
registered.
Parameters:
pServiceName CHARACTER
pVersion OpenEdge.Core.SemanticVersion
Top

FindServiceLatest (character, SemanticVersion, buffer)

/* Helper method to find and position the Service buffer to the latest version of a given service.
Caller must check availablity themselves.
Parameters:
pServiceName CHARACTER
pMinVersion OpenEdge.Core.SemanticVersion
pService buffer
Top

FindServiceRecord (character, SemanticVersion, buffer)

/* Helper method to find and position the Service buffer to a given service+version. Caller must check
availablity themselves.
For unknown/unsure versions, use FindServiceLatest()
Parameters:
pServiceName CHARACTER
pSemVer OpenEdge.Core.SemanticVersion
pService buffer
Top

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

/* Returns details about the operation, for a service by name. If more than one
operation exists with the same name, pick the first.
Parameters:
pServiceName CHARACTER
pOperationName CHARACTER
Returns OpenEdge.Web.DataObject.MappedOperation
MappedOperation The operation map for this name
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)

/* Returns details about the operation, for a service by name. If more than one
operation exists with the same name, pick the first.
Parameters:
pServiceName CHARACTER
pVersion OpenEdge.Core.SemanticVersion
pOperationName CHARACTER
Returns OpenEdge.Web.DataObject.MappedOperation
MappedOperation The operation map for this name
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 named schema for a latest version of a service.
Parameters:
pcServiceName CHARACTER
pcSchemaName CHARACTER
Returns HANDLE
handle An empty data structure (TT or PDS)
Top

HANDLE GetSchema (character, SemanticVersion, character)

/* Returns a schema for a given service oepration.
Parameters:
pServiceName CHARACTER
pVersion OpenEdge.Core.SemanticVersion
pSchemaName CHARACTER
Returns HANDLE
handle An empty data structure (TT or PDS)
Top

HANDLE GetSchemas (character, SemanticVersion)

/* Returns all of the schemas associated with the latest version of a service.
Parameters:
pServiceName CHARACTER
pVersion OpenEdge.Core.SemanticVersion
Returns HANDLE
handle[] An array of service schemas
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

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

/* Returns a versioned service. If this exact version is not found, then error
Parameters:
pServiceName CHARACTER
pVersion OpenEdge.Core.SemanticVersion
Returns OpenEdge.Web.DataObject.DataObjectService
DataObjectService A data service
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
@throws AssertionFailedError If the name is empty or null
@throws AppError If the service is not registered
Parameters:
pcServiceName CHARACTER
Returns OpenEdge.Web.DataObject.ServiceOptions
ServiceOptions The service options.
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

OpenEdge.Core.SemanticVersion GetServiceVersions (character)

/* Returns an array of versions for this service.
@throws AppError If the service is not registered
Parameters:
pServiceName CHARACTER
Returns OpenEdge.Core.SemanticVersion
SemanticVersion[] An array of service versions. Will always have at least 1 extent
Top

LOGICAL HasOperation (character, character)

/* Indicates whether a mapped operation exists with a given name
Parameters:
pServiceName CHARACTER
pOperationName CHARACTER
Returns LOGICAL
logical TRUE if the service exists
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 HasOperation (character, SemanticVersion, character)

/* Indicates whether a mapped operation exists with a given name
Parameters:
pServiceName CHARACTER
pVersion OpenEdge.Core.SemanticVersion
pOperationName CHARACTER
Returns LOGICAL
logical TRUE if the service exists
Top

LOGICAL HasOperation (character, SemanticVersion, character, MethodEnum)

/* Indicates whether a mapped operation exists
Parameters:
pServiceName CHARACTER
pVersion OpenEdge.Core.SemanticVersion
pServiceURI CHARACTER
pMethod OpenEdge.Net.HTTP.MethodEnum
Returns LOGICAL
logical TRUE if the service exists
Top

LOGICAL HasSchema (character, character)

/* Indicates whether a schema exists with a given name
Parameters:
pServiceName CHARACTER
pSchemaName CHARACTER
Returns LOGICAL
logical TRUE if the schema exists
Top

LOGICAL HasSchema (character, SemanticVersion, character)

/* Indicates whether a schema exists with a given name
Parameters:
pServiceName CHARACTER
pVersion OpenEdge.Core.SemanticVersion
pSchemaName CHARACTER
Returns LOGICAL
logical TRUE if the schema exists
Top

LOGICAL HasService (character)

/* Indicates whether a named service is available in the registry.
Parameters:
pServiceName 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

LOGICAL HasService (character, SemanticVersion)

/* Indicates whether a named, versioned service is available in the registry.
Parameters:
pServiceName CHARACTER
pVersion OpenEdge.Core.SemanticVersion
Returns LOGICAL
logical TRUE if the service exists
Top

OnServiceDeregistered (ServiceRegistryEventArgs)

/* Publishes the ServiceDeregistered event
Parameters:
poEventArgs OpenEdge.Web.DataObject.ServiceRegistryEventArgs
Top

OnServiceRegistered (ServiceRegistryEventArgs)

/* Publishes the ServiceRegistered event
Parameters:
poEventArgs OpenEdge.Web.DataObject.ServiceRegistryEventArgs
Top

PutOperation (character, SemanticVersion, MappedOperation)

/* Adds a new operation map for a service.
Parameters:
pServiceName CHARACTER
pVersion OpenEdge.Core.SemanticVersion
pMappedOperation OpenEdge.Web.DataObject.MappedOperation
Top

PutSchema (character, SemanticVersion, character, handle)

/* Saves a schema for a given service
Parameters:
pServiceName CHARACTER
pVersion OpenEdge.Core.SemanticVersion
pSchemaName CHARACTER
pSchema HANDLE
Top

PutServiceCatalog (character, SemanticVersion, JsonObject)

/* Sets 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:
pServiceName CHARACTER
pVersion OpenEdge.Core.SemanticVersion
pCatalog Progress.Json.ObjectModel.JsonObject
Top

PutServiceOptions (character, SemanticVersion, ServiceOptions)

/* Sets the service options 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:
pServiceName CHARACTER
pVersion OpenEdge.Core.SemanticVersion
pOptions OpenEdge.Web.DataObject.ServiceOptions
Top

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

/* Register a service
Parameters:
pServiceName CHARACTER
pVersion OpenEdge.Core.SemanticVersion
pOptions OpenEdge.Web.DataObject.ServiceOptions
pCatalog Progress.Json.ObjectModel.JsonObject
Returns OpenEdge.Web.DataObject.DataObjectService
DataObjectService The (registered) data service
Top

RegisterService (DataObjectService)

/* Adds a service to this registry
Parameters:
pService OpenEdge.Web.DataObject.DataObjectService
Top

RemoveOperation (character, SemanticVersion, character, MethodEnum)

/* Removes an operation mapping from the collection operation maps.
No-op if none exists.
Parameters:
pServiceName CHARACTER
pVersion OpenEdge.Core.SemanticVersion
pServiceURI CHARACTER
pMethod OpenEdge.Net.HTTP.MethodEnum
Top

RemoveSchema (character, SemanticVersion, character)

/* Removes an operation schema from service
No-op if none exists.
Parameters:
pServiceName CHARACTER
pVersion OpenEdge.Core.SemanticVersion
pSchemaName CHARACTER


Constructor Detail
Top

ServiceRegistryImpl ()

/* Default constructor


Event Detail
Top

ServiceDeregistered (Object, ServiceRegistryEventArgs)

/* Event published when a a service has been de-registered
Parameters:
poSender Progress.Lang.Object
poEventArgs OpenEdge.Web.DataObject.ServiceRegistryEventArgs
Top

ServiceRegistered (Object, ServiceRegistryEventArgs)

/* Event published when a a service has been registered
Parameters:
poSender Progress.Lang.Object
poEventArgs OpenEdge.Web.DataObject.ServiceRegistryEventArgs


Property Detail
Top

OpenEdge.Logging.ILogWriter Logger

Returns OpenEdge.Logging.ILogWriter


Copyright © 2022 Progress Software Corporation. All rights Reserved.

Progress® OpenEdge® Release 11.7.15