Home > Class Reference > %SYS namespace > %ZHSLIB.Context.Manager

%ZHSLIB.Context.Manager

class %ZHSLIB.Context.Manager extends %Library.RegisteredObject

Method Inventory

Parameters

parameter ContextNode = ^|"HSLIB"|HSContext;
parameter HealthShareContextClass = %SYSTEM.Context.HealthShare.Manager;
parameter HealthShareContextPropName = HSContext;

Methods

final method %OnNew() as %Status [ Language = objectscript ]
Starts all services defined in the current namespace
classmethod BootstrapMappings(pMapFromDatabase As %String = "HSLIB") [ Language = objectscript ]
Create package mappings for %SYSTEM.Context.HealthShare.* in %ALL
method FindNamedInstance(pInstanceKey As %String, pNamespace As %String = $Namespace) as %ZHSLIB.Context.NamedInstanceBase [ Language = objectscript ]
Named Instances are non-singleton instances of a service within a namespace. This supports multiple instances of the same service with different configurations running in the same namespace. HS.FHIRService.Service is an example as a single namespace can support multiple FHIR endpoints with different FHIR versions.
method GetService(pServiceKey As %String, pMajorVersion As %Integer, UNUSED="", pMinimumMinorVersion As %Integer = 0) as %ZHSLIB.Context.ServiceBase [ Language = objectscript ]
Returns a per-process service instance matching the following parameters:
  • Service key = composite key built from pServiceKey and pInstanceName
  • Service major version = pMajorVersion
  • Service minor version >= pMinimumMinorVersion
  • Service patch version = latest available
Throws an error if no service matching the above conditions is found.
classmethod Instance() as %ZHSLIB.Context.Manager [ Language = objectscript ]
Returns the per-process instance of this class
method RegisterNamedInstance(pServiceInstance As %ZHSLIB.Context.NamedInstanceBase, pInstanceKey As %String, pNamespace As %String = $Namespace) [ Language = objectscript ]
Named Instances are non-singleton instances of a service within a namespace. This supports multiple instances of the same service with different configurations running in the same namespace. HS.FHIRService.Service is an example as a single namespace can support multiple FHIR endpoints with different FHIR versions.
method RegisterService(pServiceInstance As %ZHSLIB.Context.ServiceBase, pNamespace As %String = "") [ Language = objectscript ]
Adds a service to the Service property using the ServiceKey and ServiceVersion in pServiceInstance. May be namespace-specific (if pNamespace is specified), or instance-wide (if not).

Inherited Members

Inherited Methods

Feedback