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

/* *************************************************************************************************************************
Copyright (c) 2016 by Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved.
File:ServiceRegistry
Purpose:Static implementation of the service registry
Author(s):pjudge
Created:Wed May 18 13:06:41 EDT 2016
Notes:* static members let multiple DataObjectHandler instances use this




Method Summary
Options Name Purpose
DeregisterService (character) /* Removes a service registration. @param character The name of the service to remove from the registry */
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 */
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) */
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 */
Progress.Json.ObjectModel.JsonObject GetServiceOptions (character) /* Returns the service options for a named service @param character The service name. @return JsonObject 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 */
INTEGER GetServices (character[]) /* Returns all registered service names @return character 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 */
OnServiceDeregistered (ServiceRegistryEventArgs) /* Publishes the ServiceDeregistered event @param ServiceRegistryEventArgs The event args */
OnServiceRegistered (ServiceRegistryEventArgs) /* Publishes the ServiceRegistered event @param ServiceRegistryEventArgs The event args */
PutOperation (character, MappedOperation) /* Adds a new operation map for a service. @param character The service name @param MappedOperation The operation map for this Method/URI */
PutSchema (character, character, handle) /* Saves a schema for a given service @param character The service name @param character The schema name @param handle An empty data structure (TT or PDS) */
PutServiceCatalog (character, JsonObject) /* Sets a catalog for a named service @param character The service name. @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, JsonObject) /* Sets the service options for a named service @param character The service name. @param JsonObject A JSON object containing options. @throws AssertionFailedError If the name is empty or null @throws AppError If the requested service does not exist in the registry */
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 */
RemoveOperation (character, character, MethodEnum) /* Removes an operation mapping from the collection operation maps. No-op if none exists. @param character the service name @param character The relative URI @param MethodEnum The HTTP method */
RemoveSchema (character, character) /* Removes an operation schema from service No-op if none exists. @param character the service name @param character The schema name */
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 */

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.Web.DataObject.ServiceRegistryImpl Instance
CHARACTER ROOT_SERVICE_NAME
CHARACTER ROOT_SERVICE_URI


Method Detail
Top

DeregisterService (character)

/* Removes a service registration.
Parameters:
pcServiceName CHARACTER
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

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

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

Progress.Json.ObjectModel.JsonObject 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 Progress.Json.ObjectModel.JsonObject
JsonObject A JSDO object containing options. If no exist or none can be
Top

INTEGER GetServices (character[])

/* Returns all registered service names
Parameters:
pcServices CHARACTER
Returns INTEGER
character 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

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, MappedOperation)

/* Adds a new operation map for a service.
Parameters:
pcServiceName CHARACTER
poMappedOperation OpenEdge.Web.DataObject.MappedOperation
Top

PutSchema (character, character, handle)

/* Saves a schema for a given service
Parameters:
pcServiceName CHARACTER
pcSchemaName CHARACTER
phSchema HANDLE
Top

PutServiceCatalog (character, 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:
pcServiceName CHARACTER
poCatalog Progress.Json.ObjectModel.JsonObject
Top

PutServiceOptions (character, JsonObject)

/* 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:
pcServiceName CHARACTER
poOptions Progress.Json.ObjectModel.JsonObject
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

RemoveOperation (character, character, MethodEnum)

/* Removes an operation mapping from the collection operation maps.
No-op if none exists.
Parameters:
pcServiceName CHARACTER
pcServiceURI CHARACTER
poMethod OpenEdge.Net.HTTP.MethodEnum
Top

RemoveSchema (character, character)

/* Removes an operation schema from service
No-op if none exists.
Parameters:
pcServiceName CHARACTER
pcSchemaName CHARACTER
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


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.Web.DataObject.ServiceRegistryImpl Instance

Returns OpenEdge.Web.DataObject.ServiceRegistryImpl
Top

CHARACTER ROOT_SERVICE_NAME

Returns CHARACTER
Top

CHARACTER ROOT_SERVICE_URI

Returns CHARACTER


Copyright © 2017 Progress Software Corporation. All rights Reserved.

Progress® OpenEdge® Release 11.7