OpenEdge.Web.CatalogWebHandler
- Last Updated: August 18, 2026
- 4 minute read
- OpenEdge
- Version 12.8
- Documentation
|
Method Summary
| Options | Name | Purpose | |
|---|---|---|---|
| Discovery () |
/**
* Discover and register available REST services for the current ABL application context.
*
* DISCOVERY LOGIC:
* ----------------
* 1. Extract the current webapp name from the incoming HTTP request (e.g., 'ROOT', 'webapp1', etc.)
*
* 2. Look up which ABL application relates to this webapp by consulting the configuration
* parsed from openedge.properties (happens regardless of WEB transport enabled status)
*
* 3. Build a list of paths to search for service mapping files (.gen/.map):
* a) CATALINA_BASE/openedge - Common location (always searched)
* b) CATALINA_BASE/ablapps/{ablApp}/openedge - Current ABL app location
* c) CATALINA_BASE/webapps/{webapp}/WEB-INF/openedge - For EACH webapp belonging
* to the current ABL app that has WEB transport enabled (enabled: true in config)
*
* 4. Register all services found in these paths with the ServiceRegistry
*
* RATIONALE:
* ----------
* - The incoming webapp determines the ABL application context (which AVM/session)
* - All webapps in the same ABL app share the same ServiceRegistry (in-memory)
* - We search ALL enabled webapps for that ABL app because services from any of
* them may be available in this shared registry
* - Disabled webapps are skipped because without WEB transport, mapping files
* won't be used/processed, so there's no point searching those locations
*
* EXAMPLE:
* --------
* Request comes in on /webapp1
* - webapp1 belongs to ABL app "oepas1"
* - oepas1 has webapps: ROOT (WEB enabled), webapp1 (WEB enabled), webapp2 (WEB disabled)
*
* Will search:
* - CATALINA_BASE/openedge
* - CATALINA_BASE/ablapps/oepas1/openedge
* - CATALINA_BASE/webapps/ROOT/WEB-INF/openedge
* - CATALINA_BASE/webapps/webapp1/WEB-INF/openedge
* - (CATALINA_BASE/webapps/webapp2/WEB-INF/openedge is skipped - WEB disabled)
*/
|
||
| CHARACTER GetAblAppForWebApp (character) |
/**
* Find the ABL application name for a given webapp.
* Looks up the webapp in the oAppWebappConfig JSON structure.
* Returns the ABL app name that owns this webapp, or empty string if not found.
* Note: Returns the ABL app regardless of whether the webapp is enabled.
*/
|
||
| CHARACTER GetContext () |
/**
* Get the context path (webapp) from the current web request
* Extracts CONTEXT_PATH from the CGI environment variables
* Returns '' as fallback if not available
*/
|
||
| CHARACTER GetCurrentWebApp () |
/**
* Get the current webapp name from the web request context.
* Extracts the webapp from the CONTEXT_PATH CGI variable.
* Returns the webapp name (e.g., 'ROOT', 'demo', 'api').
*/
|
||
| CHARACTER GetFullPathname (character) |
/**
* Get the full pathname of a file or directory
* Will return with '/' as the directory separator
* Paths are returned without trailing slashes
*/
|
||
| CHARACTER GetHostname () |
/**
* Get the hostname from the current web request
* Extracts SERVER_NAME from the CGI environment variables
* Returns 'localhost' as fallback if not available
*/
|
||
| Progress.Json.ObjectModel.JsonObject GetOpenApiCatalog () |
/**
* Return a JSON object with an Open API v3.0 formatted description of resource endpoints.
* This utilizes the static ServiceRegistry created at first use of the WEB-based service.
*/
|
||
| CHARACTER GetScheme () |
/**
* Get the scheme (protocol) from the current web request
* Checks HTTPS and REQUEST_SCHEME CGI environment variables
* Returns 'http' or 'https' based on the request
*/
|
||
| INTEGER HandleGet (IWebRequest) |
/* Default handler for the HTTP GET method
@param IWebRequest The request being serviced
@return integer An optional status code. A zero or null value means this
method will deal with all errors */
|
||
| INTEGER HandleNotAllowedMethod (IWebRequest) |
|
||
| INTEGER HandleNotImplemented (IWebRequest) |
|
||
| ScanCatalinaProperties () |
/**
* Scan catalina.properties for HTTP/HTTPS port configuration.
* Updates the iPort variable with the discovered port number.
*/
|
||
| ScanOpenEdgeProperties () |
/**
* Scan openedge.properties for ABL application and webapp configuration.
* Builds a JSON structure mapping ABL apps to their webapps with enabled status.
* Format: { "ablAppName": { "webapps": { "webappName": true/false } } }
*/
|
||
| WriteResponse (IHttpResponse) |
/** Writes the response using the WebResponseWriter.
This method allows us to unit test this handler (via gradle/batch).
@param IHttpResponse The response to write */
|
Constructor Summary
| Options | Name | Purpose | |
|---|---|---|---|
| CatalogWebHandler () |
|
Property Summary
| Options | Name | Purpose | |
|---|---|---|---|
| CHARACTER CatalinaBase |
|
Method Detail
Discovery ()
|
||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
CHARACTER GetAblAppForWebApp (character)
|
||||||||||||||||||
CHARACTER GetContext ()
|
||||||||||||||||||
CHARACTER GetCurrentWebApp ()
|
||||||||||||||||||
CHARACTER GetFullPathname (character)
|
||||||||||||||||||
CHARACTER GetHostname ()
|
||||||||||||||||||
Progress.Json.ObjectModel.JsonObject GetOpenApiCatalog ()
|
||||||||||||||||||
CHARACTER GetScheme ()
|
||||||||||||||||||
INTEGER HandleGet (IWebRequest)
|
||||||||||||||||||
INTEGER HandleNotAllowedMethod (IWebRequest)
|
||||||||||||||||||
INTEGER HandleNotImplemented (IWebRequest)
|
||||||||||||||||||
ScanCatalinaProperties ()
|
||||||||||||||||||
ScanOpenEdgeProperties ()
|
||||||||||||||||||
WriteResponse (IHttpResponse)
|
||||||||||||||||||
Constructor Detail
CatalogWebHandler () |
||||
|---|---|---|---|---|
Property Detail
CHARACTER CatalinaBase
|
||||||||
|---|---|---|---|---|---|---|---|---|