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

/* *************************************************************************************************************************
Copyright (c) 2016-2019 by Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved.
File:OperationHandler
Purpose:Abstract operation handler class, with helper methods mainly
Author(s):pjudge
Created:2016-07-26
/* A reference to the Logger in use by an implementer




Method Summary
Options Name Purpose
BuildArguments (IWebRequest, Object, IHttpResponse, DataObjectService, MappedOperation) /* Builds the parameters for execution by an 'entity' @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 */
ClearArguments () /* Clears/empties the arguments after an operation's completion (success or failure) */
INTEGER Execute (IWebRequest, Object, IHttpResponse, DataObjectService, MappedOperation, Object) /* Executes the 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 @param DataObjectService The service being operated on @param MappedOperation The mapped operation @param P.L.Object The business entity (business logic service) @return integer A non-null status code use to deal with errors */
ExtractTableData (OperationArgument) /* Extracts temp-table or dataset data from a handle-based structure (which is how we work with them in the DOH and friends) into a MEMPTR ... we need to do this in this helper class since the operation decides whether to write BI data or not. @param OperationArgument The *output or return parameter argument*/
Progress.Lang.Object GetElementValue (MessageElement, Object, Class) /* Returns a value for a message element from the argvalue @param MessageElement The message element @param Progress.Lang.Object The argument value holder @param Progress.Lang.Class The type of the argument value */
GetInputValue (OperationArgument, Object, IWebRequest) /** Extract input values from the HTTP request and set against the argument. @param OperationArgument The current argument @param Object The incoming message body @param IWebRequest The incoming request */
InitDataStructure (OperationArgument) /* Creates/inits a temp-table or dataset for used as an argument. we pass in the value writer since we may (in some case) write schema once and then write data into that structure. @param OperationArgument The current argument */
Progress.Lang.Object ReadArgumentArray (Class, Object, integer) /* Reads a value from an argument array for a message element @param Progress.Lang.Class The argument type @param Progress.Lang.Object The returned argument (will be type-of() the arg type but not necessarily = @param integer The index to use @return Progress.Lang.Object The object value of the array element */
Progress.Lang.Object ReadArgumentProperty (Class, Object, character) /* Reads a value from an object argument property (returned by the Business Logic) for a message element @param Progress.Lang.Class The argument type @param Progress.Lang.Object The returned argument (will be type-of() the arg type but not necessarily EQ) @param character The property name to read @return Progress.Lang.Object The object value of the property */
ReadFieldValue (OperationArgument, MessageElement, IWebRequest, Object, ArgumentValueWriter) /* Reads the value of a named field from the body. @param OperationArgument The current argument being processed @param MessageElement The message element we are reading from @param IWebRequest The request message @param Progress.Lang.Object The message body (firld source) @param ArgumentValueWriter The writer used for this field */
Progress.Lang.Object ReadFormFieldValue (OperationArgument, character, MultipartEntity) /* Reads the value of a named field from the MULTIPART/FORM-DATA body. @param OperationArgument The current argument being processed @param character The field name to read @param MultipartEntity The message body @return Progress.Lang.Object The field value */
CHARACTER ReadHeaderValue (MessageElement, IWebRequest) /* Reads the value (base or or parameter) from a named header @param MessageElement The message element we are reading from @param IWebRequest The request message @return character The header value (base or parameter) */
Progress.Lang.Object ReadJsonFieldValue (OperationArgument, character, JsonObject) /* Reads the value of a named field from the JSON-OBJCET body. @param OperationArgument The current argument being processed @param character The field name to read @param JsonObject The message body @return Progress.Lang.Object The field value */
Progress.Lang.Object ReadXmlFieldValue (OperationArgument, character, Object) /* Reads the value of a named field from the MULTIPART/FORM-DATA body. @param OperationArgument The current argument being processed @param character The field name to read @param Progress.Lang.Object The message body @return Progress.Lang.Object The field value */
SetOutputValue (OperationArgument, IHttpResponse) /* Sets the output/return value from the target function into the HTTP response @param OperationArgument The current argument @param IHttpResponse The response being built */
SetTrackingChanges (OperationArgument, logical) /* Sets the value of a dataset's contained buffers' tracking-changes value. @param OperationArgument The argument containing the dataset @param logical TRUE to enable TRACKING-CHANGES */
WriteFieldValue (OperationArgument, character, Object, IHttpResponse) /* Writes a field name/value for the appropriate content type @param OperationArgument The value, etc for the argument @param character The field name element we're working with @param Progress.Lang.Object The element value for this field @param IHttpResponse The response being written */

Constructor Summary
Options Name Purpose
OperationHandler () /* Default Constructor */

Property Summary
Options Name Purpose
OpenEdge.Logging.ILogWriter Logger


Method Detail
Top

BuildArguments (IWebRequest, Object, IHttpResponse, DataObjectService, MappedOperation)

/* Builds the parameters for execution by an 'entity'
will be transformed from bytes into something useful; may also have an envelope removed.
Parameters:
poRequest OpenEdge.Web.IWebRequest
poMessageBody Progress.Lang.Object
poResponse OpenEdge.Net.HTTP.IHttpResponse
pService OpenEdge.Web.DataObject.DataObjectService
poOperation OpenEdge.Web.DataObject.MappedOperation
Top

ClearArguments ()

/* Clears/empties the arguments after an operation's completion (success or failure)
Top

INTEGER Execute (IWebRequest, Object, IHttpResponse, DataObjectService, MappedOperation, Object)

/* Executes the operation.
will be transformed from bytes into something useful; may also have an envelope removed.
Parameters:
poRequest OpenEdge.Web.IWebRequest
poMessageBody Progress.Lang.Object
poResponse OpenEdge.Net.HTTP.IHttpResponse
pService OpenEdge.Web.DataObject.DataObjectService
poOperation OpenEdge.Web.DataObject.MappedOperation
poBusinessEntity Progress.Lang.Object
Returns INTEGER
integer A non-null status code use to deal with errors
Top

ExtractTableData (OperationArgument)

/* Extracts temp-table or dataset data from a handle-based structure (which is how
we work with them in the DOH and friends) into a MEMPTR ... we need to do this
in this helper class since the operation decides whether to write BI data or not.
Parameters:
poArg OpenEdge.Web.DataObject.OperationArgument
Top

Progress.Lang.Object GetElementValue (MessageElement, Object, Class)

/* Returns a value for a message element from the argvalue
Parameters:
pMesgElem OpenEdge.Web.DataObject.MessageElement
pArgValue Progress.Lang.Object
pArgType Progress.Lang.Class
Returns Progress.Lang.Object
Top

GetInputValue (OperationArgument, Object, IWebRequest)

Purpose: Extract input values from the HTTP request and set against the argument.
Parameters:
poArg OpenEdge.Web.DataObject.OperationArgument
poMessageBody Progress.Lang.Object
pRequest OpenEdge.Web.IWebRequest
Top

InitDataStructure (OperationArgument)

/* Creates/inits a temp-table or dataset for used as an argument.
we pass in the value writer since we may (in some case) write
schema once and then write data into that structure.
Parameters:
poArg OpenEdge.Web.DataObject.OperationArgument
Top

Progress.Lang.Object ReadArgumentArray (Class, Object, integer)

/* Reads a value from an argument array for a message element
Parameters:
pArgType Progress.Lang.Class
pValueHolder Progress.Lang.Object
pIndex INTEGER
Returns Progress.Lang.Object
Progress.Lang.Object The object value of the array element
Top

Progress.Lang.Object ReadArgumentProperty (Class, Object, character)

/* Reads a value from an object argument property (returned by the Business Logic) for a message element
Parameters:
pArgType Progress.Lang.Class
pArgValue Progress.Lang.Object
pPropertyName CHARACTER
Returns Progress.Lang.Object
Progress.Lang.Object The object value of the property
Top

ReadFieldValue (OperationArgument, MessageElement, IWebRequest, Object, ArgumentValueWriter)

/* Reads the value of a named field from the body.
Parameters:
poArg OpenEdge.Web.DataObject.OperationArgument
pMsgElement OpenEdge.Web.DataObject.MessageElement
pRequest OpenEdge.Web.IWebRequest
poMessageBody Progress.Lang.Object
poValueWriter OpenEdge.Web.DataObject.Writer.ArgumentValueWriter
Top

Progress.Lang.Object ReadFormFieldValue (OperationArgument, character, MultipartEntity)

/* Reads the value of a named field from the MULTIPART/FORM-DATA body.
Parameters:
pArg OpenEdge.Web.DataObject.OperationArgument
pFieldName CHARACTER
pMessageBody OpenEdge.Net.MultipartEntity
Returns Progress.Lang.Object
Progress.Lang.Object The field value
Top

CHARACTER ReadHeaderValue (MessageElement, IWebRequest)

/* Reads the value (base or or parameter) from a named header
Parameters:
pMsgElement OpenEdge.Web.DataObject.MessageElement
pRequest OpenEdge.Web.IWebRequest
Returns CHARACTER
character The header value (base or parameter)
Top

Progress.Lang.Object ReadJsonFieldValue (OperationArgument, character, JsonObject)

/* Reads the value of a named field from the JSON-OBJCET body.
Parameters:
pArg OpenEdge.Web.DataObject.OperationArgument
pFieldName CHARACTER
pMessageBody Progress.Json.ObjectModel.JsonObject
Returns Progress.Lang.Object
Progress.Lang.Object The field value
Top

Progress.Lang.Object ReadXmlFieldValue (OperationArgument, character, Object)

/* Reads the value of a named field from the MULTIPART/FORM-DATA body.
Parameters:
pArg OpenEdge.Web.DataObject.OperationArgument
pFieldName CHARACTER
pMessageBody Progress.Lang.Object
Returns Progress.Lang.Object
Progress.Lang.Object The field value
Top

SetOutputValue (OperationArgument, IHttpResponse)

/* Sets the output/return value from the target function into the HTTP response
Parameters:
poArg OpenEdge.Web.DataObject.OperationArgument
pResponse OpenEdge.Net.HTTP.IHttpResponse
Top

SetTrackingChanges (OperationArgument, logical)

/* Sets the value of a dataset's contained buffers' tracking-changes value.
Parameters:
poArg OpenEdge.Web.DataObject.OperationArgument
plTrackChanges LOGICAL
Top

WriteFieldValue (OperationArgument, character, Object, IHttpResponse)

/* Writes a field name/value for the appropriate content type
Parameters:
poArg OpenEdge.Web.DataObject.OperationArgument
pFieldName CHARACTER
pFieldValue Progress.Lang.Object
pResponse OpenEdge.Net.HTTP.IHttpResponse


Constructor Detail
Top

OperationHandler ()

/* Default Constructor


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