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

/* *************************************************************************************************************************
Copyright (c) 2016 by Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved.
File:OperationHandler
Purpose:Abstract oepration handler class, with helper methods mainly
Author(s):pjudge
Created:2016-07-26




Method Summary
Options Name Purpose
BuildArguments (IWebRequest, Object, IHttpResponse, 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 ()
INTEGER Execute (IWebRequest, Object, IHttpResponse, 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 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*/
GetInputValue (OperationArgument, integer, Object)
GetInputValue (OperationArgument, Object)
HANDLE GetSchemaClone (OperationArgument) /* Gets a data structure/schema for use in this operation. We want to use a shadow of the schema cache since at some point the schema cache may be shared among sessions and then we'd get into a world of pain with data. The buffer numbers of the tables that have/need TRACKING-CHANGES are written as a CSV into the dataset's PRIVATE-DATA. @param OperationArgument The current operation @return handle A useable temp-table or dataset */
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 */
ReadFieldValue (OperationArgument, integer, Object, ArgumentValueWriter) /* Reads the value of a named field from the body. @param OperationArgument The current argument being processed @param integer In ordinal or the current argument @param ArgumentValueWriter The writer used for this field */
SetOutputValue (OperationArgument)
SetTrackingChanges (OperationArgument, logical) /* Sets the value of a dataset's contained buffers' tracking-changes value. The dataset's PRIVATE-DATA contains a CSV list of buffer numbers that may have the flag set to true. @param OperationArgument The argument containing the dataset @param logical TRUE to enable TRACKING-CHANGES */
WriteFieldValue (OperationArgument, integer) /* Writes a field name/value for the appropriate content type @param OperationArgument The value, etc for the argument @param integer Which element we're working with */

Constructor Summary
Options Name Purpose
OperationHandler ()

Property Summary
Options Name Purpose
Progress.Json.ObjectModel.ObjectModelParser JsonParser
OpenEdge.Logging.ILogWriter Logger


Method Detail
Top

BuildArguments (IWebRequest, Object, IHttpResponse, 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
poOperation OpenEdge.Web.DataObject.MappedOperation
Top

ClearArguments ()

Top

INTEGER Execute (IWebRequest, Object, IHttpResponse, 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
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

GetInputValue (OperationArgument, integer, Object)

Parameters:
poArg OpenEdge.Web.DataObject.OperationArgument
piIdx INTEGER
poMessageBody Progress.Lang.Object
Top

GetInputValue (OperationArgument, Object)

Parameters:
poArg OpenEdge.Web.DataObject.OperationArgument
poMessageBody Progress.Lang.Object
Top

HANDLE GetSchemaClone (OperationArgument)

/* Gets a data structure/schema for use in this operation.
We want to use a shadow of the schema cache since at some point the
schema cache may be shared among sessions and then we'd get into a world of pain
with data.
The buffer numbers of the tables that have/need TRACKING-CHANGES are written as
a CSV into the dataset's PRIVATE-DATA.
Parameters:
poArg OpenEdge.Web.DataObject.OperationArgument
Returns HANDLE
handle A useable temp-table or dataset
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

ReadFieldValue (OperationArgument, integer, Object, ArgumentValueWriter)

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

SetOutputValue (OperationArgument)

Parameters:
poArg OpenEdge.Web.DataObject.OperationArgument
Top

SetTrackingChanges (OperationArgument, logical)

/* Sets the value of a dataset's contained buffers' tracking-changes value.
The dataset's PRIVATE-DATA contains a CSV list of buffer numbers that
may have the flag set to true.
Parameters:
poArg OpenEdge.Web.DataObject.OperationArgument
plTrackChanges LOGICAL
Top

WriteFieldValue (OperationArgument, integer)

/* Writes a field name/value for the appropriate content type
Parameters:
poArg OpenEdge.Web.DataObject.OperationArgument
piIdx INTEGER


Constructor Detail
Top

OperationHandler ()



Property Detail
Top

Progress.Json.ObjectModel.ObjectModelParser JsonParser

Returns Progress.Json.ObjectModel.ObjectModelParser
Top

OpenEdge.Logging.ILogWriter Logger

Returns OpenEdge.Logging.ILogWriter


Copyright © 2017 Progress Software Corporation. All rights Reserved.

Progress® OpenEdge® Release 11.7