|
Options |
Name |
Purpose |
|
|
AddResponseEnvelope (IHttpResponse, MappedOperation)
|
/* Adds a 'response' or similar envelope to the body. At this point the incoming body should be
in 'entity' format (ie non pure bytes).
@param IHttpResponse The outgoing message
@param MappedOperation Metadata about what to do with this request */
|
|
|
AddResponseEnvelope (IHttpResponse, MappedOperation, character)
|
/* Adds a 'response' or similar envelope to the body. At this point the incoming body should be
in 'entity' format (ie non pure bytes).
@param IHttpResponse The outgoing message
@param MappedOperation Metadata about what to do with this request
@param character The envelope to use. Nulls not allowed; blanks are a no-op */
|
|
|
AuthorizeOperationHandler (Object, AuthorizeOperationEventArgs)
|
/* Event handler for the event published when an error is encountered
@param Progress.Lang.Object The handler publishing the event
@param HandlerErrorEventArgs Event args for this event */
|
|
|
OpenEdge.Net.HTTP.IHttpResponse CreateDefaultResponse ()
|
/* Creates a default HTTP Response object.
This is in its own method in case of overriding.
@return IHttpResponse The default HTTP response */
|
|
|
OpenEdge.Net.HTTP.IHttpResponse CreateOperationResponse (MappedOperation)
|
/* Creates an HTTP Response object for an operation and populates it with
default values from that operation.
@param MappedOperation A valid operation to perform
@return IHttpResponse The HTTP response containing the result of the operation */
|
|
|
Destroy ()
|
/* Destroy/Shutdown/Anti-Initializer */
|
|
|
DiscoverServiceHandler (Object, ServiceDiscoveryEventArgs)
|
/* Event handler for service discovery
@param Progress.Lang.Object The handler publishing the event
@param ServiceLookupEventArgs Event args for this event */
|
|
|
INTEGER Execute (IWebRequest, Object, IHttpResponse, DataObjectService, MappedOperation, Object)
|
/* Executes the operation.
We don't care about the entity in this handler (since we are the handler)
@param IWebRequest The request that resulting in the exception
@param P.L.Object The message body of the incoming request. Typically
will be transformed from bytes into something useful; may also have an envelope removed.
@param IHttpResponse The current response object, if any
@param DataObjectService The service
@param MappedOperation The mapped operation
@param P.L.Object The business logic/entity
@return integer A non-null status code use to deal with errors */
|
|
|
Progress.Lang.Object ExtractMessageBody (IWebRequest, MappedOperation)
|
/* Retrieves the actual data from an request. Strips the envelop ('request' or similar)
@param IWebRequest The incoming request `
@param OperationArgument Metadata about what to do with this request
@return Progress.Lang.Object The extracted body */
|
|
|
OpenEdge.Web.DataObject.MappedOperation FindOperation (DataObjectService, IWebRequest)
|
/* Returns a mapped operation for this service and request
@param DataObjectService The service in which to find the operation
@param IWebRequest The incoming request
@return MappedOperation A valid operation to use for this request. Should not be null, throw instead
@throws AssertionFailedError Thrown on poor/missing inputs
@throws SendExceptionError Thrown if the operation could not be found */
|
|
|
OpenEdge.Web.DataObject.DataObjectService FindService (IWebRequest)
|
/* Returns a service for this request
@param IWebRequest The incoming request
@return DataObjectService A valid service to use for this request. Should not be null, throw instead
@throws AssertionFailedError Thrown on poor/missing inputs
@throws SendExceptionError Thrown if the operation could not be found */
|
|
|
Progress.Lang.Object GetEntity (character, character, character)
|
/* Retrieves a cached entity if one exits
@param character The service name
@param character The entity name (for an operation)
@return Progress.Lang.Object The cached entity, if one exists */
|
|
|
OpenEdge.Web.DataObject.IOperationHandler GetOperationHandler (character)
|
/* Factory method for retrieving an operation handler
@param character The operation type for which to find a handler
@return IOperationHandler A handler, if one exists */
|
|
|
INTEGER HandleException (Error, IWebRequest, IHttpResponse, Object, DataObjectService, MappedOperation)
|
/* Handles an exception that has been raised while dealing with the request.
The OE default is to return a status code; to customise, subscribe to the
OperationError event and change the ReturnStatusCode value.
If any errors occur in processing the exception, we log them and
fall back to static error pages. This method MUST always exectute
completely.
This method NEVER throws an error
@param Progress.Lang.Error The as-yet-unhandled exception
@param IWebRequest The request that resulting in the exception
@param IHttpResponse The current response object, if any
@param Progress.Lang.Object The 'business entity' object, if any
@param DataObjectService The service for which the error was raised
@param MappedOperation The operation for which the error was raised
@return integer A non-null status code use to deal with errors */
|
|
|
INTEGER HandleRequest ()
|
/* Processes a request. The primary entrypoint into the handler.
Is just a wrapper around the HandleRequest(IWebRequest) method.
@return integer The HTTP status code that PASOE may use to return static pages. Use 0 for DIY */
|
|
|
INTEGER HandleRequest (IWebRequest)
|
/* Processes a request. Uses an input parameter to allow for better testability/mocking.
@param IWebRequest The current request
@return integer The HTTP status code that PASOE may use to return static pages. Use 0 for DIY */
|
|
|
Initialize ()
|
/* Initializer/Startup */
|
|
|
InvokedHandler (Object, OperationInvocationEventArgs)
|
/* Event handler for the event published after the business logic function was called by the handler
@param Progress.Lang.Object The handler publishing the event
@param OperationInvocationEventArgs Event args for this event */
|
|
|
InvokingHandler (Object, OperationInvocationEventArgs)
|
/* Event handler for the event published before the business logic function is called by the handler
@param Progress.Lang.Object The handler publishing the event
@param OperationInvocationEventArgs Event args for this event */
|
|
|
INTEGER ListServices (MappedOperation, IWebRequest, Object, IHttpResponse)
|
/* Lists service names, versions and catalogs for all currently-registered services.
@param MappedOperation The mapped operation
@param IWebRequest The request that resulting in the exception
@param P.L.Object The message body of the incoming request. Typically
will be transformed from bytes into something useful; may also have an envelope removed.
@param IHttpResponse The current response object, if any
@return integer A non-null status code use to deal with errors */
|
|
|
LoadEntityHandler (Object, HandlerLoadEntityEventArgs)
|
/* Event handler invoke/load a piece of business logic (aka Business Entity).
@param Progress.Lang.Object The handler publishing the event
@param HandlerLoadEntityEventArgs Event args for this event */
|
|
|
OnAuthorizeOperation (AuthorizeOperationEventArgs)
|
/* Publishes the 'AuthorizeOperation' event with the provided args
@param AuthorizeOperationEventArgs The args for this event */
|
|
|
OnDiscoverService (ServiceDiscoveryEventArgs)
|
/* Publishes the 'ServiceDiscovery' event with the provided args
@param ServiceDiscoveryEventArgs The args for this event */
|
|
|
OnInvoked (OperationInvocationEventArgs)
|
/* Publishes the 'Invoked' event with the provided args
@param OperationInvocationEventArgs The args for this event */
|
|
|
OnInvoking (OperationInvocationEventArgs)
|
/* Publishes the 'Invoking' event with the provided args
@param OperationInvocationEventArgs The args for this event */
|
|
|
OnLoadEntity (HandlerLoadEntityEventArgs)
|
/* Publishes the 'LoadEntity' event with the provided args
@param HandlerErrorEventArgs The args for this event */
|
|
|
OnOperationError (HandlerErrorEventArgs)
|
/* Publishes the 'OperationError' event with the provided args
@param HandlerErrorEventArgs The args for this event */
|
|
|
OnUnloadEntity (HandlerLoadEntityEventArgs)
|
/* Publishes the 'UnloadEntity' event with the provided args
@param HandlerErrorEventArgs The args for this event */
|
|
|
OperationErrorHandler (Object, HandlerErrorEventArgs)
|
/* Event handler for the event published when an error is encountered.
If the HandlerErrorEventArgs:OperationError is of type SendExceptionError then
we use the SendExceptionError's StatusCode for the response; otherwise we return
an Internal Server Error (501).
@param Progress.Lang.Object The handler publishing the event
@param HandlerErrorEventArgs Event args for this event */
|
|
|
INTEGER PerformOperation (IWebRequest, Object, IHttpResponse, DataObjectService, MappedOperation)
|
/* Internal worker method to do the action defined by a mapped operation
@param IWebRequest The request that resulting in the exception
@param P.L.Object The message body of the incoming request. Typically
will be transformed from bytes into something useful; may also have an envelope removed.
@param IHttpResponse The current response object
@param MappedOperation The mapped operation
@return integer A non-null status code use to deal with errors */
|
|
|
RemoveAllEntities (character, character)
|
/* Removes all the cached entity instances for a given service
@param character The service name
@param character The service version. If * then all versions cleared */
|
|
|
LOGICAL RemoveEntity (character, character, character)
|
/* Removes a cached entity instance for a given service & operation
@param character The service name
@param character The service version
@param character The entity name */
|
|
|
LOGICAL SetEntity (character, character, character, Object)
|
/* Caches an entity instance for a given service & operation
@param character The service name
@param character The service version
@param character The entity name
@param Progress.Lang.Object The entity instance. may be null/unknown
@return logical Returns TRUE if the entity was alrady cached */
|
|
|
CHARACTER SplitServicePath (character)
|
/* Splits a URI path into a service and service-relative-uri. Can be used for
tokenised paths or 'real' paths.
@param character A path to split/parse
@return character[2] An array of strings from the path. The first extent is
the service name. The second extent is the service-relative URI */
|
|
|
UnloadEntityHandler (Object, HandlerLoadEntityEventArgs)
|
/* Event handler to unload a piece of business logic (aka Business Entity).
@param Progress.Lang.Object The handler publishing the event
@param HandlerLoadEntityEventArgs Event args for this event */
|
|
|
LOGICAL ValidateContentType (IWebRequest, character)
|
/* Ensures that the request's Accept header and the operation's
ContentType values are compatible, per https://tools.ietf.org/html/rfc7231#section-5.3.2
ContentType must be a complete type/subtype.
Accept may contain type/subtype, type/<star> or <star>/<star> values. If <star>/<star>
values appear the we can service the request.
@param IWebRequest The request that resulting in the exception
@param character The MIME type we're wanting to return (usally from the operation)
@return logical TRUE if the operation's ContentType is compatible with the request's Accept value */
|
|
|
WriteResponse (IHttpResponse)
|
/* Dumps a complete response to the output stream. Does not allow for
incremental Write() calls.
@param IHttpResponse The response being written. */
|