Namespace: Consultingwerk.OERA
Class 
ServiceInterface Copy to Clipboard
Parent classes:
Inherits: Progress.Lang.Object

File:ServiceInterface
Purpose:The OERA ServiceInterface which is the suggested
method of accessing business logic
Author(s):Mike Fechner / Consultingwerk Ltd.
Created:Thu Mar 04 07:37:32 CET 2010
Notes:SCL-1483: Handling STOP conditions raised by the invoked
Business Entity / Business Service call by thrownig an
AppError. During the implementation, we have encountered
crashes of the AVM (exspecially when the FILL timed out),
so that we are considering this the safer approach
SCL-1815: Implemented the "Activation"
custom log entry type



Top Method Summary
Options Name Purpose
+ Activate () Executed when we begin handling a request
# CustomLogEntriesChangedHandler (EventArgs) Event handler for the CustomLogEntriesChanged event of the LogManager
+ Deactivate () Executed when we finish handling a request
+ EvaluateRequestAuthorizationProvider () (Re-)Evaluates the current IRequestAuthorizationProvider service
+ FetchData (character, IFetchDataRequest, dataset-handle) Reads data from a Business Entity
+ FetchDataset (character, dataset-handle) Returns an Empty Dataset (schema)
+ Consultingwerk.OERA.IBusinessEntity GetBusinessEntity (character) Returns the reference to the Business Entity instance
+ InvokeMethod (character, character, dataset-handle, longchar) Invokes a custom method of the BusinessEntity.
+ InvokeMethod (character, character, dataset-handle, Object) Invokes a custom method of the BusinessEntity.
+ Progress.Lang.Object InvokeTask (character, character) Invokes a method in a Task class.
+ Progress.Lang.Object InvokeTask (character, character, dataset-handle, dataset-handle, dataset-handle, dataset-handle, dataset-handle, Object) Invokes a method in a Task class.
+ Progress.Lang.Object InvokeTask (character, character, dataset-handle, dataset-handle, dataset-handle, dataset-handle, Object) Invokes a method in a Task class.
+ Progress.Lang.Object InvokeTask (character, character, dataset-handle, dataset-handle, dataset-handle, Object) Invokes a method in a Task class.
+ Progress.Lang.Object InvokeTask (character, character, dataset-handle, dataset-handle, Object) Invokes a method in a Task class.
+ Progress.Lang.Object InvokeTask (character, character, dataset-handle, Object) Invokes a method in a Task class.
+ Progress.Lang.Object InvokeTask (character, character, integer, dataset-handle, dataset-handle, dataset-handle, dataset-handle, dataset-handle, longchar) Invokes a method in a Task class.
+ Progress.Lang.Object InvokeTask (character, character, integer, dataset-handle, dataset-handle, dataset-handle, dataset-handle, dataset-handle, Object) Invokes a method in a Task class.
+ Progress.Lang.Object InvokeTask (character, character, Object) Invokes a method in a Task class.
# OnActivated (EventArgs) Raises the Activated event
# OnAfterActivated (EventArgs) Raises the AfterActivated event
# OnAfterDeactivated (EventArgs) Raises the AfterDeactivated event
# OnBeforeDeactivated (EventArgs) Raises the BeforeDeactivated event
# OnDeactivated (EventArgs) Raises the Deactivated event
# OnSessionCreated (EventArgs) Raises the SessionCreated event
+ RaiseSessionCreatedEvent () Raises the SessionCreated event
+ SaveChanges (character, dataset-handle) Saves modified (Create, Update, Delete) data to a Business Entity
+ SaveChanges (character, dataset-handle, Object) Saves modified (Create, Update, Delete) data to a Business Entity
+ StopBusinessEntity (character) Stops an Business Entity Instance
+ LOGICAL ValidateBusinessEntityName (character) Validates a Business Entity or Business Task Name

Top Constructor Summary
Options Name Purpose
ServiceInterface () Static constructor of the ServiceInterface class

Top Event Summary
Options Name Purpose
+ Activated (EventArgs) Raised when the Service Interface begins handling a request
+ AfterActivated (EventArgs) Raised when the Service Interface begins handling a request
+ AfterDeactivated (EventArgs) Raised when the Service Interface is finished handling a request
+ BeforeDeactivated (EventArgs) Raised when the Service Interface is finished handling a request
+ Deactivated (EventArgs) Raised when the Service Interface is finished handling a request
+ SessionCreated (EventArgs) Raised when the RestServerSessionActivate has created a new session

Top Property Summary
Options Name Purpose
+ CHARACTER CUSTOM_LOG_ENTRY
+ LOGICAL IsActive
+ Consultingwerk.OERA.Enum.ServiceInterfaceLoggingLevelEnum LoggingLevel
+ CHARACTER LoggingLevelAsCharacter


Method Detail
Top

PUBLIC Activate ()

Purpose: Executed when we begin handling a request
Notes: This method is PUBLIC to allow Pacfic WebHandlers and REST Service
classes to activate the session prior to calling into the service
interface. This is important to allow the RestServerSessionActivator
(or similar activate handlers) to instantiate the Context Dataset
(from the Context Dataset Store) prior to calling into the
Service Interface

Top

PROTECTED CustomLogEntriesChangedHandler (EventArgs)

Purpose: Event handler for the CustomLogEntriesChanged event of the LogManager
Notes:

Parameters:
e Consultingwerk.EventArgs
The Consulingwerk.EventArgs with the data for this event
Top

PUBLIC Deactivate ()

Purpose: Executed when we finish handling a request
Notes: See notes of the Activate() method

Top

PUBLIC EvaluateRequestAuthorizationProvider ()

Purpose: (Re-)Evaluates the current IRequestAuthorizationProvider service
Notes:

Top

PUBLIC FetchData (character, IFetchDataRequest, dataset-handle)

Purpose: Reads data from a Business Entity
Notes: Request Parameters are send using the IFetchDataRequest object
Server-side code calling directly into the Service Interface is _NOT_
supposed to call this method "BY-REFERENCE" as this is the place where
the caller receives a copy of the Business Entities ProDataset

Parameters:
pcEntityName CHARACTER
The name of the Business Entity
poFetchDataRequest Consultingwerk.OERA.IFetchDataRequest
The IFetchDataRequest instance with the data for this call
phDataset DATASET-HANDLE
OUTPUT DATASET-HANDLE The dataset with the resultset - do not pass BY-REFERENCE
Top

PUBLIC FetchDataset (character, dataset-handle)

Purpose: Returns an Empty Dataset (schema)
Notes: The caller of this method is responsible to clean up the Dataset
when no longer used! The caller should always invoke this method
with the dataset output parameter BY-REFERENCE!

Parameters:
pcEntityName CHARACTER
The name of the Business Entity
phDataset DATASET-HANDLE
OUTPUT DATASET-HANDLE The empty dataset
Top

PUBLIC Consultingwerk.OERA.IBusinessEntity GetBusinessEntity (character)

Purpose: Returns the reference to the Business Entity instance
Notes: Facade to Consultingwerk.OERA.ServiceManager:GetBusinessEntity
(pcEntityName)

Parameters:
pcEntityName CHARACTER
The name of the Business Entity to return
Returns Consultingwerk.OERA.IBusinessEntity
The reference to the Business Entity
Top

PUBLIC InvokeMethod (character, character, dataset-handle, longchar)

Purpose: Invokes a custom method of the BusinessEntity.
Notes:

Parameters:
pcEntityName CHARACTER
The name of the Business Entity class
pcMethodName CHARACTER
The name of the method of the task to execute
phDataset DATASET-HANDLE
INPUT-OUTPUT DATASET-HANDLE The dataset-handle parameter to the task method
plcParameter LONGCHAR
The LONGCHAR representation of the serialized parameter object
Top

PUBLIC InvokeMethod (character, character, dataset-handle, Object)

Purpose: Invokes a custom method of the BusinessEntity.
Notes:

Parameters:
pcEntityName CHARACTER
The name of the Business Entity class
pcMethodName CHARACTER
The name of the method of the task to execute
phDataset DATASET-HANDLE
INPUT-OUTPUT DATASET-HANDLE The dataset-handle parameter to the task method
poParameter Progress.Lang.Object
The parameter object
Top

PUBLIC Progress.Lang.Object InvokeTask (character, character)

Purpose: Invokes a method in a Task class.
Notes: When no MethodName is passed then "Invoke" will be executed as the
default task method

Parameters:
pcTaskName CHARACTER
The name of the task class
pcMethodName CHARACTER
The name of the business entity method to invoke
Returns Progress.Lang.Object
The optional return value object of the Business Task Method
Top

PUBLIC Progress.Lang.Object InvokeTask (character, character, dataset-handle, dataset-handle, dataset-handle, dataset-handle, dataset-handle, Object)

Purpose: Invokes a method in a Task class.
Notes: When no MethodName is passed then "Invoke" will be executed as the
default task method

Parameters:
pcTaskName CHARACTER
The name of the task class
pcMethodName CHARACTER
The name of the business entity method to invoke
phDataset1 DATASET-HANDLE
INPUT-OUTPUT DATASET-HANDLE The handle of the first dataset to be passed to the task method
phDataset2 DATASET-HANDLE
INPUT-OUTPUT DATASET-HANDLE The handle of the second dataset to be passed to the task method
phDataset3 DATASET-HANDLE
INPUT-OUTPUT DATASET-HANDLE The handle of the third dataset to be passed to the task method
phDataset4 DATASET-HANDLE
INPUT-OUTPUT DATASET-HANDLE The handle of the fourth dataset to be passed to the task method
phDataset5 DATASET-HANDLE
INPUT-OUTPUT DATASET-HANDLE The handle of the fifth dataset to be passed to the task method
poParameter Progress.Lang.Object
The parameter object to the method
Returns Progress.Lang.Object
The optional return value object of the Business Task Method
Top

PUBLIC Progress.Lang.Object InvokeTask (character, character, dataset-handle, dataset-handle, dataset-handle, dataset-handle, Object)

Purpose: Invokes a method in a Task class.
Notes: When no MethodName is passed then "Invoke" will be executed as the
default task method

Parameters:
pcTaskName CHARACTER
The name of the task class
pcMethodName CHARACTER
The name of the business entity method to invoke
phDataset1 DATASET-HANDLE
INPUT-OUTPUT DATASET-HANDLE The handle of the first dataset to be passed to the task method
phDataset2 DATASET-HANDLE
INPUT-OUTPUT DATASET-HANDLE The handle of the second dataset to be passed to the task method
phDataset3 DATASET-HANDLE
INPUT-OUTPUT DATASET-HANDLE The handle of the third dataset to be passed to the task method
phDataset4 DATASET-HANDLE
INPUT-OUTPUT DATASET-HANDLE The handle of the fourth dataset to be passed to the task method
poParameter Progress.Lang.Object
The parameter object to the method
Returns Progress.Lang.Object
The optional return value object of the Business Task Method
Top

PUBLIC Progress.Lang.Object InvokeTask (character, character, dataset-handle, dataset-handle, dataset-handle, Object)

Purpose: Invokes a method in a Task class.
Notes: When no MethodName is passed then "Invoke" will be executed as the
default task method

Parameters:
pcTaskName CHARACTER
The name of the task class
pcMethodName CHARACTER
The name of the business entity method to invoke
phDataset1 DATASET-HANDLE
INPUT-OUTPUT DATASET-HANDLE The handle of the first dataset to be passed to the task method
phDataset2 DATASET-HANDLE
INPUT-OUTPUT DATASET-HANDLE The handle of the second dataset to be passed to the task method
phDataset3 DATASET-HANDLE
INPUT-OUTPUT DATASET-HANDLE The handle of the third dataset to be passed to the task method
poParameter Progress.Lang.Object
The parameter object to the method
Returns Progress.Lang.Object
The optional return value object of the Business Task Method
Top

PUBLIC Progress.Lang.Object InvokeTask (character, character, dataset-handle, dataset-handle, Object)

Purpose: Invokes a method in a Task class.
Notes: When no MethodName is passed then "Invoke" will be executed as the
default task method

Parameters:
pcTaskName CHARACTER
The name of the task class
pcMethodName CHARACTER
The name of the business entity method to invoke
phDataset1 DATASET-HANDLE
INPUT-OUTPUT DATASET-HANDLE The handle of the first dataset to be passed to the task method
phDataset2 DATASET-HANDLE
INPUT-OUTPUT DATASET-HANDLE The handle of the second dataset to be passed to the task method
poParameter Progress.Lang.Object
The parameter object to the method
Returns Progress.Lang.Object
The optional return value object of the Business Task Method
Top

PUBLIC Progress.Lang.Object InvokeTask (character, character, dataset-handle, Object)

Purpose: Invokes a method in a Task class.
Notes: When no MethodName is passed then "Invoke" will be executed as the
default task method

Parameters:
pcTaskName CHARACTER
The name of the task class
pcMethodName CHARACTER
The name of the business entity method to invoke
phDataset1 DATASET-HANDLE
INPUT-OUTPUT DATASET-HANDLE The handle of the first dataset to be passed to the task method
poParameter Progress.Lang.Object
The parameter object to the method
Returns Progress.Lang.Object
The optional return value object of the Business Task Method
Top

PUBLIC Progress.Lang.Object InvokeTask (character, character, integer, dataset-handle, dataset-handle, dataset-handle, dataset-handle, dataset-handle, longchar)

Purpose: Invokes a method in a Task class.
Notes: When no MethodName is passed then "Invoke" will be executed as the
default task method

Parameters:
pcTaskName CHARACTER
The name of the task class
pcMethodName CHARACTER
The name of the method of the task to execute
piNumDatasets INTEGER
The number of datasets that were passed in from the consumer
phDataset1 DATASET-HANDLE
INPUT-OUTPUT DATASET-HANDLE The first dataset-handle parameter to the task method
phDataset2 DATASET-HANDLE
INPUT-OUTPUT DATASET-HANDLE The second dataset-handle parameter to the task method
phDataset3 DATASET-HANDLE
INPUT-OUTPUT DATASET-HANDLE The third dataset-handle parameter to the task method
phDataset4 DATASET-HANDLE
INPUT-OUTPUT DATASET-HANDLE The fourth dataset-handle parameter to the task method
phDataset5 DATASET-HANDLE
INPUT-OUTPUT DATASET-HANDLE The fifth dataset-handle parameter to the task method
plcParameter LONGCHAR
The LONGCHAR representation of the serialized parameter object
Returns Progress.Lang.Object
The optional return value object of the Business Task Method
Top

PUBLIC Progress.Lang.Object InvokeTask (character, character, integer, dataset-handle, dataset-handle, dataset-handle, dataset-handle, dataset-handle, Object)

Purpose: Invokes a method in a Task class.
Notes: When no MethodName is passed then "Invoke" will be executed as the
default task method
Purpose: Invokes a method in a Task class.
Notes: When no MethodName is passed then "Invoke" will be executed as the
default task method

Parameters:
pcTaskName CHARACTER
The name of the task class
pcMethodName CHARACTER
The name of the method of the task to execute
piNumDatasets INTEGER
The number of datasets that were passed in from the consumer
phDataset1 DATASET-HANDLE
INPUT-OUTPUT DATASET-HANDLE The first dataset-handle parameter to the task method
phDataset2 DATASET-HANDLE
INPUT-OUTPUT DATASET-HANDLE The second dataset-handle parameter to the task method
phDataset3 DATASET-HANDLE
INPUT-OUTPUT DATASET-HANDLE The third dataset-handle parameter to the task method
phDataset4 DATASET-HANDLE
INPUT-OUTPUT DATASET-HANDLE The fourth dataset-handle parameter to the task method
phDataset5 DATASET-HANDLE
INPUT-OUTPUT DATASET-HANDLE The fifth dataset-handle parameter to the task method
poParameter Progress.Lang.Object
The parameter object
Returns Progress.Lang.Object
The optional return value object of the Business Task Method
Top

PUBLIC Progress.Lang.Object InvokeTask (character, character, Object)

Purpose: Invokes a method in a Task class.
Notes: When no MethodName is passed then "Invoke" will be executed as the
default task method

Parameters:
pcTaskName CHARACTER
The name of the task class
pcMethodName CHARACTER
The name of the business entity method to invoke
poParameter Progress.Lang.Object
The parameter object to the method
Returns Progress.Lang.Object
The optional return value object of the Business Task Method
Top

PROTECTED OnActivated (EventArgs)

Purpose: Raises the Activated event
Notes:

Parameters:
e Consultingwerk.EventArgs
The Consultingwerk.EventArgs with the data for this event
Top

PROTECTED OnAfterActivated (EventArgs)

Purpose: Raises the AfterActivated event
Notes:

Parameters:
e Consultingwerk.EventArgs
The Consultingwerk.EventArgs with the data for this event
Top

PROTECTED OnAfterDeactivated (EventArgs)

Purpose: Raises the AfterDeactivated event
Notes:

Parameters:
e Consultingwerk.EventArgs
The Consultingwerk.EventArgs with the data for this event
Top

PROTECTED OnBeforeDeactivated (EventArgs)

Purpose: Raises the BeforeDeactivated event
Notes:

Parameters:
e Consultingwerk.EventArgs
The Consultingwerk.EventArgs with the data for this event
Top

PROTECTED OnDeactivated (EventArgs)

Purpose: Raises the Deactivated event
Notes:

Parameters:
e Consultingwerk.EventArgs
The Consultingwerk.EventArgs with the data for this event
Top

PROTECTED OnSessionCreated (EventArgs)

Purpose: Raises the SessionCreated event
Notes:

Parameters:
e Consultingwerk.EventArgs
The Consultingwerk.EventArgs with the data for this event
Top

PUBLIC RaiseSessionCreatedEvent ()

Purpose: Raises the SessionCreated event
Notes: Invoked from the RestServerSessionActivator to allow
to initialize session context in a customer's application
at the beginning of the first AppServer request after the
login request (Hybrid Authentication Realm)

Top

PUBLIC SaveChanges (character, dataset-handle)

Purpose: Saves modified (Create, Update, Delete) data to a Business Entity
Notes: It's recommended but not required to just pass a changes dataset

Parameters:
pcEntityName CHARACTER
The name of the Business Entity to save the modified data with
phDataset DATASET-HANDLE
INPUT-OUTPUT DATASET-HANDLE The handle of the dataset with the modified values
Top

PUBLIC SaveChanges (character, dataset-handle, Object)

Purpose: Saves modified (Create, Update, Delete) data to a Business Entity
Notes: It's recommended but not required to just pass a changes dataset

Parameters:
pcEntityName CHARACTER
The name of the Business Entity to save the modified data with
phDataset DATASET-HANDLE
INPUT-OUTPUT DATASET-HANDLE The handle of the dataset with the modified values
poParameter Progress.Lang.Object
The reference to the optional parameter object instance
Top

PUBLIC StopBusinessEntity (character)

Purpose: Stops an Business Entity Instance
Notes: Facade to Consultingwerk.OERA.ServiceManager:StopBusinessEntity
(pcEntityName)

Parameters:
pcEntityName CHARACTER
The name of the Business Entity to stop
Top

PUBLIC LOGICAL ValidateBusinessEntityName (character)

Purpose: Validates a Business Entity or Business Task Name
Notes:

Parameters:
pcEntityName CHARACTER
The name of the Business Entity to validate
Returns LOGICAL
Logical value indicating if the Business Entity name is valid


Constructor Detail
Top

STATIC ServiceInterface ()

Purpose: Static constructor of the ServiceInterface class
Notes:



Event Detail
Top

PUBLIC Activated (EventArgs)

Purpose: Raised when the Service Interface begins handling a request
Notes:

Parameters:
e Consultingwerk.EventArgs
The Consultingwerk.EventArgs with the data for this event
Top

PUBLIC AfterActivated (EventArgs)

Purpose: Raised when the Service Interface begins handling a request
Notes: This event is raised after the Activated event. This event
may be used by application or framework components to initialize
for a request after the session- or context management has
initialized

Parameters:
e Consultingwerk.EventArgs
The Consultingwerk.EventArgs with the data for this event
Top

PUBLIC AfterDeactivated (EventArgs)

Purpose: Raised when the Service Interface is finished handling a request
Notes: This event is raised after the Deactivated event. This event
may be used by application or framework components to reset
after a request

Parameters:
e Consultingwerk.EventArgs
The Consultingwerk.EventArgs with the data for this event
Top

PUBLIC BeforeDeactivated (EventArgs)

Purpose: Raised when the Service Interface is finished handling a request
Notes: This event is raised before the Deactivated event. This event
may be used by application or framework components to reset
after a request - but before the session context is destroyed

Parameters:
e Consultingwerk.EventArgs
The Consultingwerk.EventArgs with the data for this event
Top

PUBLIC Deactivated (EventArgs)

Purpose: Raised when the Service Interface is finished handling a request
Notes:

Parameters:
e Consultingwerk.EventArgs
The Consultingwerk.EventArgs with the data for this event
Top

PUBLIC SessionCreated (EventArgs)

Purpose: Raised when the RestServerSessionActivate has created a new session
Notes: Hooks for customer frameworks to initialize custom session context

Parameters:
e Consultingwerk.EventArgs
The Consultingwerk.EventArgs with the data for this event


Property Detail
Top

PUBLIC CHARACTER CUSTOM_LOG_ENTRY


Returns CHARACTER
Top

PUBLIC LOGICAL IsActive


Returns LOGICAL
Top

PUBLIC Consultingwerk.OERA.Enum.ServiceInterfaceLoggingLevelEnum LoggingLevel


Returns Consultingwerk.OERA.Enum.ServiceInterfaceLoggingLevelEnum
Top

PUBLIC CHARACTER LoggingLevelAsCharacter


Returns CHARACTER


©2006-2020 Consultingwerk Ltd.         info@consultingwerk.de         http://www.consultingwerk.de       27.09.2022 23:46:45