Namespace: OpenEdge.Web.DataObject
Class
DataObjectService
Parent classes:
Inherits: Progress.Lang.Object

/* *************************************************************************************************************************
Copyright (c) 2017-2020 by Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved.
File:DataObjectService
Purpose:A representation of a Data Service
Author(s):pjudge
Created:2017-08-31
Notes:* the service provides access to contained schemas and operations within,
as well as a means to update/save itself in a registry
/* The default name for the root (unnamed) service




Method Summary
Options Name Purpose
ApplySchemaOptions (handle, SchemaOption) /** Applies schema-related options (serialize-*) to a table/dataset/child handle @param handle The buffer/dataset handle to which to apply the option @param SchemaOption The schema option to apply to the input schema structure */
Ccs.Common.Support.IHandleHolder CloneServiceSchema (SchemaOption) /* Clones a service schema @param SchemaOption The schema option to apply @return handle A schema handle. UNKNOWN if the schema cannot be found */
LOGICAL Equals (Object)
FindOperationRecord (character, character, buffer) /* Helper method to find and position the Operation buffer to a given service/method. Caller must check availablity themselves. @param character The service URI @param character The http method @param buffer The Operation record to find. */
FindSchemaRecord (character, buffer) /* Helper method to find and position the Service buffer to a given service. Caller must check availablity themselves. @param character The schema name @param buffer The schema record to find. */
OpenEdge.Web.DataObject.MappedOperation GetOperation (character) /* Returns details about the operation, for a service by name. If more than one operation exists with the same name, pick the first. @param character An optional name for the operation @return MappedOperation The operation map for this name */
OpenEdge.Web.DataObject.MappedOperation GetOperation (character, MethodEnum) /* Returns details about an operation in this service @param character The relative URI @param MethodEnum The HTTP method @return MappedOperation The operation map for this Method/URI */
OpenEdge.Web.DataObject.MappedOperation GetOperations () /* Returns an array or operations for the service @return MappedOperation[] The operations for this service */
HANDLE GetSchema (character) /* Returns a named schema for a latest version of a service. @param character The schema name @return handle An empty data structure (TT or PDS) */
HANDLE GetSchemas () /* Returns all of the schema names associated with a service . @return handle[] An array of service schemas */
LOGICAL HasOperation (character) /* Indicates whether a mapped operation exists with a given name @param character The operation name @return logical TRUE if the service exists */
LOGICAL HasOperation (character, MethodEnum) /* Indicates whether a mapped operation exists for this service @param character The relative URI (to the service) @param MethodEnum The HTTP method @return logical TRUE if the service exists */
LOGICAL HasSchema (character) /* Indicates whether a mapped operation exists with a given name @param character The operation name @return logical TRUE if the service exists */
Merge (DataObjectService) /* Merges service information into this one. The source of the merge data must have the same name and version, otherwise an error is thrown. A Merge will overwrite the schemas, operations, catalogs and argument writers in this object with those that are passed in (the source service). If there are schemas, operations and argument writers in the source service that are not in this service, they will be added. If there are schemas, operations and argument writers in the THIS service that are not in the source service, they will be not be touched. @param DataObjectService A service to merge into this one. */
CHARACTER NormaliseServiceName (character) /* Makes sure the service name is 'nice' and clean. @param character A service name that may be empty or have /'s @return character A non-slashed, non-empty name */
LOGICAL PutOperation (MappedOperation) /* Adds a new operation map for a service. @param MappedOperation The operation map for this Method/URI @return logical TRUE if the operation already exists. */
LOGICAL PutSchema (character, handle) /* Saves a schema for a given service. @param character The schema name @param handle An empty data structure (TT or PDS) @return logical TRUE if the schema already exists. */
RemoveOperation (character, MethodEnum) /* Removes an operation mapping from the collection operation maps. No-op if none exists. @param character The relative URI @param MethodEnum The HTTP method */
RemoveSchema (character) /* Removes a schema from service No-op if none exists. @param character The schema name */
CHARACTER ToString ()

Constructor Summary
Options Name Purpose
DataObjectService (character, character) /* Constructor @param character The service name @param character The service version */
DataObjectService (character, SemanticVersion) /* Constructor @param character The service name @param SemanticVersion The service version */

Property Summary
Options Name Purpose
OpenEdge.Core.Util.BuilderRegistry ArgumentWriters
Progress.Json.ObjectModel.JsonObject Catalog
CHARACTER Name
OpenEdge.Web.DataObject.ServiceOptions Options
CHARACTER ROOT_SERVICE_NAME
CHARACTER ROOT_SERVICE_URI
OpenEdge.Core.SemanticVersion Version


Method Detail
Top

PRIVATE ApplySchemaOptions (handle, SchemaOption)

Purpose: Applies schema-related options (serialize-*) to a table/dataset/child handle
Parameters:
pSchema HANDLE
pOptions OpenEdge.Web.DataObject.SchemaOption
Top

PRIVATE Ccs.Common.Support.IHandleHolder CloneServiceSchema (SchemaOption)

/* Clones a service schema
Parameters:
pOption OpenEdge.Web.DataObject.SchemaOption
Returns Ccs.Common.Support.IHandleHolder
handle A schema handle. UNKNOWN if the schema cannot be found
Top

PUBLIC LOGICAL Equals (Object)

Parameters:
pCompare Progress.Lang.Object
Returns LOGICAL
Top

PRIVATE FindOperationRecord (character, character, buffer)

/* Helper method to find and position the Operation buffer to a given service/method. Caller must check
availablity themselves.
Parameters:
pServiceUri CHARACTER
pMethod CHARACTER
pOperation buffer
Top

PRIVATE FindSchemaRecord (character, buffer)

/* Helper method to find and position the Service buffer to a given service. Caller must check
availablity themselves.
Parameters:
pcSchemaName CHARACTER
pbSchema buffer
Top

PUBLIC OpenEdge.Web.DataObject.MappedOperation GetOperation (character)

/* Returns details about the operation, for a service by name. If more than one
operation exists with the same name, pick the first.
Parameters:
pOperationName CHARACTER
Returns OpenEdge.Web.DataObject.MappedOperation
MappedOperation The operation map for this name
Top

PUBLIC OpenEdge.Web.DataObject.MappedOperation GetOperation (character, MethodEnum)

/* Returns details about an operation in this service
Parameters:
pServiceURI CHARACTER
pMethod OpenEdge.Net.HTTP.MethodEnum
Returns OpenEdge.Web.DataObject.MappedOperation
MappedOperation The operation map for this Method/URI
Top

PUBLIC OpenEdge.Web.DataObject.MappedOperation GetOperations ()

/* Returns an array or operations for the service
Returns OpenEdge.Web.DataObject.MappedOperation
MappedOperation[] The operations for this service
Top

PUBLIC HANDLE GetSchema (character)

/* Returns a named schema for a latest version of a service.
Parameters:
pName CHARACTER
Returns HANDLE
handle An empty data structure (TT or PDS)
Top

PUBLIC HANDLE GetSchemas ()

/* Returns all of the schema names associated with a service .
Returns HANDLE
handle[] An array of service schemas
Top

PUBLIC LOGICAL HasOperation (character)

/* Indicates whether a mapped operation exists with a given name
Parameters:
pOperationName CHARACTER
Returns LOGICAL
logical TRUE if the service exists
Top

PUBLIC LOGICAL HasOperation (character, MethodEnum)

/* Indicates whether a mapped operation exists for this service
Parameters:
pServiceURI CHARACTER
pMethod OpenEdge.Net.HTTP.MethodEnum
Returns LOGICAL
logical TRUE if the service exists
Top

PUBLIC LOGICAL HasSchema (character)

/* Indicates whether a mapped operation exists with a given name
Parameters:
pName CHARACTER
Returns LOGICAL
logical TRUE if the service exists
Top

PUBLIC Merge (DataObjectService)

/* Merges service information into this one. The source of the
merge data must have the same name and version, otherwise
an error is thrown.
A Merge will overwrite the schemas, operations, catalogs and
argument writers in this object with those that are passed in
(the source service).
If there are schemas, operations and argument writers in the
source service that are not in this service, they will be added.
If there are schemas, operations and argument writers in the
THIS service that are not in the source service, they will be
not be touched.
Parameters:
pSvc OpenEdge.Web.DataObject.DataObjectService
Top

PUBLIC CHARACTER NormaliseServiceName (character)

/* Makes sure the service name is 'nice' and clean.
Parameters:
pName CHARACTER
Returns CHARACTER
character A non-slashed, non-empty name
Top

PUBLIC LOGICAL PutOperation (MappedOperation)

/* Adds a new operation map for a service.
Parameters:
pMappedOperation OpenEdge.Web.DataObject.MappedOperation
Returns LOGICAL
logical TRUE if the operation already exists.
Top

PUBLIC LOGICAL PutSchema (character, handle)

/* Saves a schema for a given service.
Parameters:
pSchemaName CHARACTER
pSchema HANDLE
Returns LOGICAL
logical TRUE if the schema already exists.
Top

PUBLIC RemoveOperation (character, MethodEnum)

/* Removes an operation mapping from the collection operation maps.
No-op if none exists.
Parameters:
pServiceURI CHARACTER
pMethod OpenEdge.Net.HTTP.MethodEnum
Top

PUBLIC RemoveSchema (character)

/* Removes a schema from service
No-op if none exists.
Parameters:
pSchemaName CHARACTER
Top

PUBLIC CHARACTER ToString ()

Returns CHARACTER


Constructor Detail
Top

PUBLIC DataObjectService (character, character)

/* Constructor
Parameters:
pName CHARACTER
pVersion CHARACTER
Top

PUBLIC DataObjectService (character, SemanticVersion)

/* Constructor
Parameters:
pName CHARACTER
pVersion OpenEdge.Core.SemanticVersion


Property Detail
Top

PUBLIC OpenEdge.Core.Util.BuilderRegistry ArgumentWriters

Returns OpenEdge.Core.Util.BuilderRegistry
Top

PUBLIC Progress.Json.ObjectModel.JsonObject Catalog

Returns Progress.Json.ObjectModel.JsonObject
Top

PUBLIC CHARACTER Name

Returns CHARACTER
Top

PUBLIC OpenEdge.Web.DataObject.ServiceOptions Options

Returns OpenEdge.Web.DataObject.ServiceOptions
Top

PUBLIC CHARACTER ROOT_SERVICE_NAME

Returns CHARACTER
Top

PUBLIC CHARACTER ROOT_SERVICE_URI

Returns CHARACTER
Top

PUBLIC OpenEdge.Core.SemanticVersion Version

Returns OpenEdge.Core.SemanticVersion


Copyright © 2020 Progress Software Corporation. All rights Reserved.

Progress® OpenEdge® Release 12.2.0