Home > Class Reference > ENSLIB namespace > %Library.EnsembleMgr
Private  Storage   

%Library.EnsembleMgr


class %Library.EnsembleMgr

Inventory


Parameters Properties Methods Queries Indices ForeignKeys Triggers
12 50


Summary


Methods
ApplySettings CheckUTCIndices CreateEnsembleAuditingEvents
CreateEnsembleResources CreateEnsembleRoles CreateNewDBForSecondary
DetermineMgmtURLForNamespace DisableNamespace EnableNamespace
GetENSLIB InitializeEnsemble InitializeHealthShare
Install InstallEnsembleSecurity IsDICOMInstalled
IsEnsembleInstalled IsEnsembleNamespace IsHealthShareNamespace
MultiEnsembleInstalled OnSystemShutdown OnSystemStartup
RemoveLegacyPortal SetAutoStart SetCredential
UpdateAndReloadCPF Upgrade UpgradeNamespace
UpgradeUTCIndices ValidateEnsemble cleanupOldNamespace
configureEnsembleAutoStart convertCSPXSearches createMappings
createNewDBForEnsTemp createPortalApp defineAuditModifyProductionConfiguration
defineAuditModifySchema defineAuditStartStopProduction defineAuditViewMessageContents
deleteMappings deploySearchTables getVersion
indexNeedsRepair map2enslib setDBattributes
unmap2enslib upgradeDocClassMap upgradeRules
upgradeSearchTables validateNamespace


Parameters


• parameter CREATEENSLIBNAMESPACE = 0;
Create the ENSLIB namespace during upgrades/installs.
• parameter CREATELEGACYPORTAL = 0;
Flag to control whether the legacy CSP portal should be created.
• parameter DEFAULTCSPAUTHMETHODS = 32;
Default CSP authentication methods
• parameter DEFAULTDBRESOURCE = "%DB_%DEFAULT";
Default database resource name
• parameter ENSLIB = "ENSLIB";
Default ENSLIB
• parameter HSLIB = "HSLIB";
Default HSLIB
• parameter PORTALHOMEPAGE = "%25CSP.Portal.Home.zen";
Portal homepage for this version of Ensemble
• parameter REMOVEEENSLIBNAMESPACE = 1;
Remove ENSLIB namespace if it already exists AND doesn't reference any data or routines mapped from other databases.
• parameter REMOVELEGACYPORTAL = 1;
Flag to control whether old CSP pages and files should be removed.
• parameter SECONDARYSUFFIX = "SECONDARY";
Suffix for secondary global database
• parameter TEMPSUFFIX = "ENSTEMP";
Suffix for temporary global database
• parameter VIEWERLIB = "VIEWERLIB";
where the viewer will get installed

Methods


• classmethod ApplySettings(pTargetNS As %String, pProductionName As %String, ByRef pSettings) as %Status
• classmethod CheckUTCIndices(pTargetNS As %String = "", pVerbose As %Boolean = 1, pLogToConsole As %Boolean = 0) as %Status
Check whether any Ensemble UTC indices in a given namespace are in need of repair. If pLogToConsole is true, we will also log a message to cconsole.log to indicate that the UpgradeUTCIndices() method in this class should be run for this namespace.
• classmethod CreateEnsembleAuditingEvents() as %Status
Create the auditing events used by Ensemble.
• classmethod CreateEnsembleResources(ByRef pVars, pLogLevel As %Integer, pInstaller As %Installer.Installer) as %Status
• classmethod CreateEnsembleRoles(ByRef pVars, pLogLevel As %Integer, pInstaller As %Installer.Installer) as %Status
• classmethod CreateNewDBForSecondary(pNamespace As %String = "", pVerbose As %Boolean = 0, pCheckValidNSP As %Boolean = 1) as %Status

Creates new database that is used to store credential passwords and maps ^Ens.SecondaryData* to it. This API is run by EnableNamespace() when creating new namespaces.

When you call this method, you must ensure that the production is not running and no changes are made to the credentials.

The new database is created in a subdirectory of the Namespace's default database for Globals. The name of the new database and the subdirectory is the name of the Namespace's default database for Globals with "SECONDARY" appended. For example if the default globals database is LABS then the new secondary database is called LABSSECONDARY. The new database is protected by a resource named after the database (e.g. %DB_LABSSECONDARY) without public access. No user needs to have privileges to this resource.

After creating the secondary database, the call creates a global mapping for Ens.SecondaryData* and moves any existing data to the new location.

An exception is that if Ens.SecondaryData* is already mapped before you make the call, the call does not create the database, change the mapping, or move the data.

If the namespace globals database is mirrored, you must also ensure that the secondary database is also mirrored. When you are creating an Ensemble namespace on a primary mirror and specify that the globals database is to be mirrored, the secondary database is automatically marked as mirrored. But if you are creating a secondary database for any existing namespace, you must explicitly set the secondary database to be mirrored. In this case, you should treat the secondary database as an existing database when creating it on a backup mirror.

This will not create the database if the default global database is remote.

• classmethod DetermineMgmtURLForNamespace(pNamespace As %String = $namespace, pAppendHomePage As %Boolean = 1) as %String
Returns the "path" portion of the Ensemble management URL for a given namespace. If the namespace is *not* Ensemble enabled, then it will return empty string or the default CSP app for the namespace. If pAppendHomePage is false, it will only return the CSP application path.
• classmethod DisableNamespace(pTargetNS As %String, pVerbose As %Boolean = 0) as %Status
This method is called after a namespace is deleted for Ensemble and HealthShare
• classmethod EnableNamespace(pTargetNS As %String, pVerbose As %Boolean = 0, ByRef pIsPrimary, pFromInstall=0, pUpgrade=0) as %Status
The following parameters are for internal use:
  • pIsPrimary can be an array and will be calculated if not passed in
  • Top node is whether this is a primary node or not. It is true if not in a mirror.
    Subscripts are namespaces that have one or more mirrored databases.
  • pFromInstall indicates it is enabling all the existing Ensemble namespaces.
  • Items like HSLIB are Ensemble but we don't want it to be Foundation
    Don't automatically upgrade a previously Ensemble enabled namespace to be Healthshare Foundation
  • pUpgrade only has meaning when pFromInstall is true.
  • • classmethod GetENSLIB(pImplicit As %Boolean = 0, pNormalized As %Boolean = 1) as %String
    Get the directory or implicit namespace for the ENSLIB database. pImplicit indicates whether the full implicit namespace should be returned, and pNormalized indicates whether the directory should be normalized.
    • classmethod InitializeEnsemble(pVerbose As %Boolean = 0, ByRef pIsPrimary As %Boolean = 1) as %Status
    • classmethod InitializeHealthShare(pVerbose As %Boolean = 0, pHSLib As %String = ..#HSLIB, ByRef pIsPrimary As %Boolean = 1) as %Status
    Initialize HealthShare
    • classmethod Install(pUpgrade As %Boolean = 0, pProduct As %String = "", pSrcDir As %String = "") as %Status
    • classmethod InstallEnsembleSecurity(pIsPrimary As %Boolean = 1, pVerbose As %Boolean = 0) as %Status
    Method to create Ensemble Resources and Roles, in addition to upgrading existing users with access to the legacy portal through the %Admin_Manage resource so that they retain full access to the new portal after the installation completes.
    • classmethod IsDICOMInstalled() as %Boolean
    Checks if DICOM is installed
    • classmethod IsEnsembleInstalled() as %Boolean
    Checks for Ensemble installation
    • classmethod IsEnsembleNamespace(pNamespace=$namespace) as %Boolean
    Checks if current namespace is Ensemble-enabled
    • classmethod IsHealthShareNamespace(pNamespace=$namespace) as %Boolean
    Checks if current namespace is HealthShare-enabled
    • classmethod MultiEnsembleInstalled() as %Boolean
    • classmethod OnSystemShutdown(Output pConsoleLog As %String, Output pCancelShutdown As %Boolean) as %Boolean
    • classmethod OnSystemStartup(Output pConsoleLog As %String, pIsStartup As %Boolean = 0) as %Boolean
    • classmethod RemoveLegacyPortal(pTargetNS As %String = "", pPortalDir As %String = "", pPortalApp As %String = "", pFiles As %Boolean = 1, pClasses As %Boolean = 0, pVerbose As %Boolean = 0) as %Status
    • classmethod SetAutoStart(pTargetNS As %String, pProductionName As %String) as %Status
    • classmethod SetCredential(pTargetNS As %String, pName As %String, pUsername As %String, pPassword As %String, pOverwrite As %Boolean = 0) as %Status
    • classmethod UpdateAndReloadCPF(pVerbose, pTargetNS) as %Status
    • classmethod Upgrade(pVerbose As %Boolean = 0, ByRef pIsPrimary As %Boolean = 1) as %Status
    • classmethod UpgradeNamespace(pNS As %String, pVerbose As %Boolean = 0, ByRef pIsPrimary As %Boolean = 1) as %Status
    • classmethod UpgradeUTCIndices(pTargetNS As %String = "", pVerbose As %Boolean = 1, pUseBatchMode As %Boolean = 1) as %Status
    Ensure that timestamps of type Ens.DataType.UTC are correctly stored in various classes. pVerbose controls whether output is written to the current device. pUseBatchMode controls whether the operation should run in batch mode. This ensures that the process uses a limited number of global buffers, which is likely to be crucial on a running system.
    • classmethod ValidateEnsemble(pEnsLib As %String = ..#ENSLIB, pVerbose As %Boolean = 0) as %Status
    Validate an Ensemble installation in ENSLIB
    • classmethod cleanupOldNamespace(pNS As %String, pVerbose As %Boolean = 0) as %Status
    • classmethod configureEnsembleAutoStart(pValue As %Boolean = 1) as %Status
    • classmethod convertCSPXSearches(pTargetNS As %String, pVerbose As %Boolean = 0) as %Status
    Convert searches saved as instances of CSPX.EnsMsgFilterForm to instances of EnsPortal.MsgFilter.SavedSearch.
    • classmethod createMappings(pTargetNS As %String, pEnsLib As %String = ..#ENSLIB, pVerbose As %Boolean = 0, ByRef pIsPrimary) as %Status
    Private helper method to create Ensemble mappings for a particular namespace
    • classmethod createNewDBForEnsTemp(pNamespace As %String = "", pVerbose As %Boolean = 0) as %Status
    Creates new non journalled database and maps ^CacheTemp.Ens* to it. This is called by EnableNamespace()
    This will not create the database if the default global database is remote.

    • classmethod createPortalApp(pPortal As %String, pNS As %String, pPortalDir As %String, pDescription As %String, pResource As %String = "", pRecursive As %Boolean = 1, pLoginPage As %String = "", pGrant As %String = "", pCookiePath As %String = "", pAuthMethods As %String = "", pLockCSPName As %Boolean = 1, pVerbose As %Boolean = 0, pGroupById As %String = "", pCspZenEnabled As %Boolean = 1, pInboundWebServicesEnabled As %Boolean = 1, pTwoFactorEnabled As %Boolean = 0, pIsNameSpaceDefault As %Boolean = 0, pPermittedClasses As %String = "") as %Status
    Helper to create a CSP portal application
    • classmethod defineAuditModifyProductionConfiguration() as %String
    The defineAudit* methods below return literals with the names for the Ensemble auditing events with the format of a single string containing Source/Type/Name. They return the values to be used when creating the audit events at installation/upgrade time by this class, and also to define macros by routine EnsConstants.inc in ENSLIB.
    • classmethod defineAuditModifySchema() as %String
    The defineAudit* methods below return literals with the names for the Ensemble auditing events with the format of a single string containing Source/Type/Name. They return the values to be used when creating the audit events at installation/upgrade time by this class, and also to define macros by routine EnsConstants.inc in ENSLIB.
    • classmethod defineAuditStartStopProduction() as %String
    The defineAudit* methods below return literals with the names for the Ensemble auditing events with the format of a single string containing Source/Type/Name. They return the values to be used when creating the audit events at installation/upgrade time by this class, and also to define macros by routine EnsConstants.inc in ENSLIB.
    • classmethod defineAuditViewMessageContents() as %String
    The defineAudit* methods below return literals with the names for the Ensemble auditing events with the format of a single string containing Source/Type/Name. They return the values to be used when creating the audit events at installation/upgrade time by this class, and also to define macros by routine EnsConstants.inc in ENSLIB.
    • classmethod deleteMappings(pTargetNS As %String, pEnsLib As %String = ..#ENSLIB, pVerbose As %Boolean = 0) as %Status
    Private helper method to create Ensemble mappings for a particular namespace
    • classmethod deploySearchTables(pTargetNS As %String, pVerbose As %Boolean = 0) as %Status
    Classmethod to ensure SearchTable classes are correctly deployed to each Ensemble namespace.
    • classmethod getVersion() as %List
    • classmethod indexNeedsRepair(pIndexGlobal As %String = "", pCount As %Integer = 1000) as %Boolean
    Helper method that uses a simple heuristic to loop over the index global supplied in pIndexGlobal and check whether any entries include trailing zeroes. By default, we only look at a thousand nodes, as the probability of encountering such a timestamp is 10%, so 1000 should be more than enough entries to check.
    • classmethod map2enslib(pTargetNS As %String = $NAMESPACE, pVerbose As %Boolean = 0) as %Status
    • classmethod setDBattributes(dir As %String, mode As %String, rnam As %String)
    • classmethod unmap2enslib(pTargetNS As %String = $NAMESPACE, pVerbose As %Boolean = 0) as %Status
    • classmethod upgradeDocClassMap(pTargetNS As %String, pVerbose As %Boolean = 0) as %Status
    Ensure that the ^Ens.DocClassMap global has valid data during upgrades from versions where the DocClassMap wasn't used.
    • classmethod upgradeRules(pTargetNS As %String, pVerbose As %Boolean = 0) as %Status
    Remove all rule cache routines and recompile all business rules.
    • classmethod upgradeSearchTables(pTargetNS As %String, pVerbose As %Boolean = 0) as %Status
    Classmethod to upgrade SearchTable metadata which was mapped to ENSLIB in versions prior to 2010.2.
    • classmethod validateNamespace(ByRef pTargetNS As %String, pIsEnabled As %Boolean = 0, ByRef pSC As %Status) as %Boolean