|
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 */
|
|
|
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 */
|
|
|
INTEGER DeregisterAllServices (MappedOperation, IWebRequest, IHttpResponse)
|
/* Deregisters all known services
@param MappedOperation The mapped operation
@param IWebRequest The request that resulting in the exception
@param IHttpResponse The current response object, if any
@return integer A non-null status code use to deal with errors */
|
|
|
INTEGER DeregisterService (MappedOperation, IWebRequest, IHttpResponse)
|
/* Deregisters asingle known services
@param MappedOperation The mapped operation
@param IWebRequest The request that resulting in the exception
@param IHttpResponse The current response object, if any
@return integer A non-null status code use to deal with errors */
|
|
|
Destroy ()
|
/* Destroy/Shutdown/Anti-Initializer */
|
|
|
INTEGER Execute (IWebRequest, Object, IHttpResponse, 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 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 (IWebRequest)
|
/* Returns a mapped operation for this request
@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 */
|
|
|
INTEGER GetCatalog (character, IWebRequest, Object, IHttpResponse)
|
/* Retrieves a catalog for a named service. First tries to run a mapped
operation, then looks in the serviceregistry
@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 */
|
|
|
Progress.Lang.Object GetEntity (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 (TargetTypeEnum)
|
/* Factory method for retrieving an operation handler
@param TargetTypeEnum The operation type for which to find a handler
@return IOperationHandler A handler, if one exists */
|
|
|
INTEGER HandleException (DataObjectEventArgs)
|
/* Handles an exception that has been raised in an event handler used to process
the request.
@param DataObjectEventArgs A valid event args object
@return integer A non-null status code use to deal with errors */
|
|
|
INTEGER HandleException (Error, IWebRequest, IHttpResponse, Object, 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
@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 */
|
|
|
Progress.Lang.Object InvokeEntity (MappedOperation, IWebRequest)
|
/* Returns a useable instance of a business entity/logic class
@param character The (internal) id of the mapped operation
@return Progress.Lang.Object the business entity instance */
|
|
|
INTEGER ListServices (MappedOperation, IWebRequest, Object, IHttpResponse)
|
/* Lists 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 */
|
|
|
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 */
|
|
|
INTEGER PerformOperation (IWebRequest, Object, IHttpResponse, 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)
|
/* Removes all the cached entity instances for a given service
@param character The service name */
|
|
|
LOGICAL RemoveEntity (character, character)
|
/* Removes a cached entity instance for a given service & operation
@param character The service name
@param character The entity name */
|
|
|
LOGICAL SetEntity (character, character, Object)
|
/* Caches an entity instance for a given service & operation
@param character The service name
@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 */
|
|
|
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. */
|