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


/* *************************************************************************************************************************
Copyright (c) 2017-2021 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

ApplySchemaOptions (handle, SchemaOption)

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

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

LOGICAL Equals (Object)

Parameters:
pCompare Progress.Lang.Object
 
Returns LOGICAL
 
Top

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

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

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

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

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

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

HANDLE GetSchemas ()

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

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

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

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

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

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

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

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

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

RemoveSchema (character)

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

CHARACTER ToString ()

Returns CHARACTER
 


Constructor Detail
Top

DataObjectService (character, character)

/* Constructor
Parameters:
pName CHARACTER
 
pVersion CHARACTER
 
Top

DataObjectService (character, SemanticVersion)

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


Property Detail
Top

OpenEdge.Core.Util.BuilderRegistry ArgumentWriters

Returns OpenEdge.Core.Util.BuilderRegistry
 
Top

Progress.Json.ObjectModel.JsonObject Catalog

Returns Progress.Json.ObjectModel.JsonObject
 
Top

CHARACTER Name

Returns CHARACTER
 
Top

OpenEdge.Web.DataObject.ServiceOptions Options

Returns OpenEdge.Web.DataObject.ServiceOptions
 
Top

CHARACTER ROOT_SERVICE_NAME

Returns CHARACTER
 
Top

CHARACTER ROOT_SERVICE_URI

Returns CHARACTER
 
Top

OpenEdge.Core.SemanticVersion Version

Returns OpenEdge.Core.SemanticVersion