IRISLIB database
EnsembleMgr Class Reference

Static Public Member Functions

_.Library.Status CheckUTCIndices (_.Library.String pTargetNS, _.Library.Boolean pVerbose, _.Library.Boolean pLogToConsole)
 Check whether any production-enabled UTC indices in a given namespace are in need of repair. More...
 
_.Library.Status CreateEnsembleAuditingEvents ()
 Create the auditing events used by productions.
 
_.Library.Status CreateNewDBForSecondary (_.Library.String pNamespace, _.Library.Boolean pVerbose, _.Library.Boolean pCheckValidNSP)
 
_.Library.String DetermineMgmtURLForNamespace (_.Library.String pNamespace, _.Library.Boolean pAppendHomePage)
 Returns the "path" portion of the Interoperability management URL for a given namespace. More...
 
_.Library.Status DisableNamespace (_.Library.String pTargetNS, _.Library.Boolean pVerbose, _.Library.Boolean pKeepNamespaceAsSystem)
 This method is called after a namespace is deleted.
 
_.Library.Status EnableNamespace (_.Library.String pTargetNS, _.Library.Boolean pVerbose, pIsPrimary, pFromInstall, pUpgrade)
 The following parameters are for internal use:
More...
 
_.Library.String GetENSLIB (_.Library.Boolean pImplicit, _.Library.Boolean pNormalized)
 Get the directory or implicit namespace for the ENSLIB database. More...
 
_.Library.Status GetNamespacesByShutdownGroup (pNamespacesByShutdownGroup)
 This method returns an ordered list of production-enabled namespaces in order of Shutdown Group. More...
 
_.Library.Status GetNamespacesByStartupPriority (pNamespacesByStartupPriority)
 This method returns an ordered list of ensemble namespaces in order of startup priority. More...
 
_.Library.Status InitializeHealthShare (_.Library.Boolean pVerbose, _.Library.String pHSLib, _.Library.Boolean pIsPrimary)
 Initialize HealthShare.
 
_.Library.Status InstallEnsembleSecurity (_.Library.Boolean pIsPrimary, _.Library.Boolean pVerbose)
 Method to create production-related Resources and Roles, in addition to. More...
 
_.Library.Boolean IsDICOMInstalled ()
 Checks if DICOM is installed.
 
_.Library.Boolean IsEnsembleInstalled ()
 Checks for Interoperability installation.
 
_.Library.Boolean IsEnsembleNamespace (pNamespace)
 Checks if current namespace is production-enabled.
 
_.Library.Boolean IsHealthShareNamespace (pNamespace)
 Checks if current namespace is HealthShare-enabled.
 
_.Library.Status SetAutoStart (_.Library.String pTargetNS, _.Library.String pProductionName, _.Library.Integer pStartupPriority)
 pProductionName argument is the production to start automatically on instance startup More...
 
_.Library.Status UpgradeUTCIndices (_.Library.String pTargetNS, _.Library.Boolean pVerbose, _.Library.Boolean pUseBatchMode)
 Ensure that timestamps of type Ens.DataType.UTC are correctly stored in various classes. More...
 
_.Library.Status ValidateEnsemble (_.Library.String pEnsLib, _.Library.Boolean pVerbose)
 Validate an Interoperability installation in ENSLIB.
 
_.Library.Status convertCSPXSearches (_.Library.String pTargetNS, _.Library.Boolean pVerbose)
 Convert searches saved as instances of CSPX.EnsMsgFilterForm to instances of EnsPortal.MsgFilter.SavedSearch.
 
_.Library.Status createMappings (_.Library.String pTargetNS, _.Library.String pEnsLib, _.Library.Boolean pVerbose, pIsPrimary)
 Private helper method to create Interoperability mappings for a particular namespace.
 
_.Library.Status createNewDBForEnsTemp (_.Library.String pNamespace, _.Library.Boolean pVerbose)
 Creates new non journalled database and maps ^IRIS.Temp.Ens* to it. More...
 
_.Library.Status createPortalApp (_.Library.String pPortal, _.Library.String pNS, _.Library.String pPortalDir, _.Library.String pDescription, _.Library.String pResource, _.Library.Boolean pRecursive, _.Library.String pLoginPage, _.Library.String pGrant, _.Library.String pCookiePath, _.Library.String pAuthMethods, _.Library.Boolean pLockCSPName, _.Library.Boolean pVerbose, _.Library.String pGroupById, _.Library.Boolean pCspZenEnabled, _.Library.Boolean pInboundWebServicesEnabled, _.Library.Boolean pTwoFactorEnabled, _.Library.Boolean pIsNameSpaceDefault, _.Library.String pPermittedClasses)
 Helper to create a CSP portal application.
 
_.Library.String defineAuditModifyDefaultSetting ()
 The defineAudit* methods below return literals with the names for the Interoperability auditing events. More...
 
_.Library.String defineAuditModifyProductionConfiguration ()
 The defineAudit* methods below return literals with the names for the Interoperability auditing events. More...
 
_.Library.String defineAuditModifySchema ()
 The defineAudit* methods below return literals with the names for the Interoperability auditing events. More...
 
_.Library.String defineAuditResendMessage ()
 The defineAudit* methods below return literals with the names for the Interoperability auditing events. More...
 
_.Library.String defineAuditStartStopProduction ()
 The defineAudit* methods below return literals with the names for the Interoperability auditing events. More...
 
_.Library.String defineAuditViewMessageContents ()
 The defineAudit* methods below return literals with the names for the Interoperability auditing events. More...
 
_.Library.Status deleteMappings (_.Library.String pTargetNS, _.Library.String pEnsLib, _.Library.Boolean pVerbose)
 Private helper method to create Interoperability mappings for a particular namespace.
 
_.Library.Status deploySearchTables (_.Library.String pTargetNS, _.Library.Boolean pVerbose)
 Classmethod to ensure SearchTable classes are correctly deployed to each Interoperability namespace.
 
_.Library.Boolean indexNeedsRepair (_.Library.String pIndexGlobal, _.Library.Integer pCount)
 Helper method that uses a simple heuristic to loop over the index global supplied. More...
 
_.Library.Status modifyInteropEditorsAPIApp (_.Library.String pNS, _.Library.Boolean pVerbose)
 Helper method to modify interop editors app.
 
_.Library.Status upgradeDashboards (_.Library.String pTargetNS, _.Library.Boolean pVerbose, _.Library.Boolean pValidateNamespace)
 This method is called by EnableNamespace (via dataUpgradeSteps) to update Activity Dashboard meta data.
 
_.Library.Status upgradeDocClassMap (_.Library.String pTargetNS, _.Library.Boolean pVerbose)
 Ensure that the ^Ens.DocClassMap global has valid data during upgrades from versions where. More...
 
_.Library.Status upgradeRules (_.Library.String pTargetNS, _.Library.Boolean pVerbose)
 Remove all rule cache routines and recompile all business rules.
 
_.Library.Status upgradeSearchTables (_.Library.String pTargetNS, _.Library.Boolean pVerbose)
 Classmethod to upgrade SearchTable metadata which was mapped to ENSLIB in versions prior to 2010.2.
 
_.Library.Boolean validateNamespace (_.Library.String pTargetNS, _.Library.Boolean pIsEnabled, _.Library.Status pSC, _.Library.Boolean pCheckIfAvailable)
 Internal method to validate a namespace:
More...
 

Static Public Attributes

 CREATEENSLIBNAMESPACE = None
 Create the ENSLIB namespace during upgrades/installs.
 
 DEFAULTCSPAUTHMETHODS = None
 Default CSP authentication methods.
 
 DEFAULTDBRESOURCE = None
 Default database resource name.
 
 DOMAIN = None
 Domain used for localization.
 
 ENSLIB = None
 Default ENSLIB.
 
 HSLIB = None
 Default HSLIB.
 
 PORTALHOMEPAGE = None
 Portal homepage for this version.
 
 REMOVEEENSLIBNAMESPACE = None
 Remove ENSLIB namespace if it already exists AND doesn't reference. More...
 
 SECONDARYSUFFIX = None
 Suffix for secondary global database.
 
 TEMPSUFFIX = None
 Suffix for temporary global database.
 
 VIEWERLIB = None
 where the viewer will get installed
 

Static Private Member Functions

_.Library.String __addResourcesToRole (_.Library.String pRole, _.Library.String pResources, _.Library.Status pStatus)
 Helper method to check whether pRole already has the resource/permission pairs. More...
 
_.Library.Status __addSQLPrivilege (_.Library.String pNamespace, _.Library.String pSQLObject, _.Library.String pPrivilege, _.Library.String pGrantee, _.Library.Boolean pGrantable, _.Library.String pGrantor)
 Helper method to add privileges to users. More...
 
_.Library.Status __getExistingResources (_.Library.String pRole, pExistingResources)
 Helper method to get the resources and permissions assigned to the role specified in pRole.
 
_.Library.List __getUTCIndexGlobals ()
 Get a list of the index globals containing UTC data that needs to be. More...
 
_.Library.String __setResourcesForRole (_.Library.String pRole, _.Library.String pResources, _.Library.Status pStatus)
 Helper method to specify the permissions for a set of resources in pRole. More...
 

Member Function Documentation

◆ CheckUTCIndices()

_.Library.Status CheckUTCIndices ( _.Library.String  pTargetNS,
_.Library.Boolean  pVerbose,
_.Library.Boolean  pLogToConsole 
)
static

Check whether any production-enabled UTC indices in a given namespace are in need of repair.

If pLogToConsole is true, we will also log a message to messages.log to indicate that the <method>UpgradeUTCIndices</method>() method in this class should be run for this namespace.

◆ CreateNewDBForSecondary()

_.Library.Status CreateNewDBForSecondary ( _.Library.String  pNamespace,
_.Library.Boolean  pVerbose,
_.Library.Boolean  pCheckValidNSP 
)
static

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 a production-enabled 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.

◆ DetermineMgmtURLForNamespace()

_.Library.String DetermineMgmtURLForNamespace ( _.Library.String  pNamespace,
_.Library.Boolean  pAppendHomePage 
)
static

Returns the "path" portion of the Interoperability management URL for a given namespace.

If the namespace

is not production-enabled, then it will return empty string. If pAppendHomePage is false, it will only return the CSP application path.

◆ EnableNamespace()

_.Library.Status EnableNamespace ( _.Library.String  pTargetNS,
_.Library.Boolean  pVerbose,
  pIsPrimary,
  pFromInstall,
  pUpgrade 
)
static

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 production-enabled namespaces. pUpgrade only has meaning when pFromInstall is true.

◆ GetENSLIB()

_.Library.String GetENSLIB ( _.Library.Boolean  pImplicit,
_.Library.Boolean  pNormalized 
)
static

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.

◆ GetNamespacesByShutdownGroup()

_.Library.Status GetNamespacesByShutdownGroup (   pNamespacesByShutdownGroup)
static

This method returns an ordered list of production-enabled namespaces in order of Shutdown Group.


The value returned is a $List structure of namespace and its relative shutdown group.
If a production is not assigned a shutdown group in a namespace the relative shutdown group returned will be 2 (see $$$ensDefaultShutdownGroup in EnsConstants.inc).
The list returns the names of all production-enabled namespaces that the caller has READ access to the global/subscript given by $$$EnsProdShutdownGroup in the the namespace $$$EnsConfigurationGbl("ShutdownGroup")].

◆ GetNamespacesByStartupPriority()

_.Library.Status GetNamespacesByStartupPriority (   pNamespacesByStartupPriority)
static

This method returns an ordered list of ensemble namespaces in order of startup priority.


The value returned is a $List structure of namespace and its startup relative priority.
If a production is not set to Auto Start in a namespace the relative priority returned will be 0.
The list returns the names of all production-enabled namespaces that the caller has READ access to the global ^Ens.AutoStart in the the namespace.

◆ InstallEnsembleSecurity()

_.Library.Status InstallEnsembleSecurity ( _.Library.Boolean  pIsPrimary,
_.Library.Boolean  pVerbose 
)
static

Method to create production-related 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.

◆ SetAutoStart()

_.Library.Status SetAutoStart ( _.Library.String  pTargetNS,
_.Library.String  pProductionName,
_.Library.Integer  pStartupPriority 
)
static

pProductionName argument is the production to start automatically on instance startup

in the namespace given by argument pTargetNS.
Productions are started in descending order of priority followed by alphabetically.
pStartupPriority argument is used to set the relative priority for auto start of productions within the instance. The default is the value 0.

◆ UpgradeUTCIndices()

_.Library.Status UpgradeUTCIndices ( _.Library.String  pTargetNS,
_.Library.Boolean  pVerbose,
_.Library.Boolean  pUseBatchMode 
)
static

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.

◆ __addResourcesToRole()

_.Library.String __addResourcesToRole ( _.Library.String  pRole,
_.Library.String  pResources,
_.Library.Status  pStatus 
)
staticprivate

Helper method to check whether pRole already has the resource/permission pairs.

in pResources, and adds them if not. Note that pResources should have the following format: [Resource]:[Permissions]. Multiple pairs should be separated by commas. The return value is in the format: [Error Message]_$char(0)_[Resources Added]

◆ __addSQLPrivilege()

_.Library.Status __addSQLPrivilege ( _.Library.String  pNamespace,
_.Library.String  pSQLObject,
_.Library.String  pPrivilege,
_.Library.String  pGrantee,
_.Library.Boolean  pGrantable,
_.Library.String  pGrantor 
)
staticprivate

Helper method to add privileges to users.

Note that the default behaviour is to have

the _Ensemble system user grant privileges, and the GRANT option is false.

◆ createNewDBForEnsTemp()

_.Library.Status createNewDBForEnsTemp ( _.Library.String  pNamespace,
_.Library.Boolean  pVerbose 
)
static

Creates new non journalled database and maps ^IRIS.Temp.Ens* to it.

This is called by EnableNamespace()

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

◆ defineAuditModifyDefaultSetting()

_.Library.String defineAuditModifyDefaultSetting ( )
static

The defineAudit* methods below return literals with the names for the Interoperability 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.

◆ defineAuditModifyProductionConfiguration()

_.Library.String defineAuditModifyProductionConfiguration ( )
static

The defineAudit* methods below return literals with the names for the Interoperability 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.

◆ defineAuditModifySchema()

_.Library.String defineAuditModifySchema ( )
static

The defineAudit* methods below return literals with the names for the Interoperability 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.

◆ defineAuditResendMessage()

_.Library.String defineAuditResendMessage ( )
static

The defineAudit* methods below return literals with the names for the Interoperability 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.

◆ defineAuditStartStopProduction()

_.Library.String defineAuditStartStopProduction ( )
static

The defineAudit* methods below return literals with the names for the Interoperability 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.

◆ defineAuditViewMessageContents()

_.Library.String defineAuditViewMessageContents ( )
static

The defineAudit* methods below return literals with the names for the Interoperability 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.

◆ __getUTCIndexGlobals()

_.Library.List __getUTCIndexGlobals ( )
staticprivate

Get a list of the index globals containing UTC data that needs to be.

checked for incorrectly normalized values.

◆ indexNeedsRepair()

_.Library.Boolean indexNeedsRepair ( _.Library.String  pIndexGlobal,
_.Library.Integer  pCount 
)
static

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.

◆ __setResourcesForRole()

_.Library.String __setResourcesForRole ( _.Library.String  pRole,
_.Library.String  pResources,
_.Library.Status  pStatus 
)
staticprivate

Helper method to specify the permissions for a set of resources in pRole.

pResources should have the following format: [Resource]:[Permissions]. Multiple pairs should be separated by commas. If pRole already has a set of permission specified for a given resource, the permissions will be replaced by those specified. If the permission is omitted, then all permissions for the given resource will be removed from the role. The return value is in the format: [Error Message]_$char(0)_[Resources Removed]_$char(0)_[Resources Added]

◆ upgradeDocClassMap()

_.Library.Status upgradeDocClassMap ( _.Library.String  pTargetNS,
_.Library.Boolean  pVerbose 
)
static

Ensure that the ^Ens.DocClassMap global has valid data during upgrades from versions where.

the DocClassMap wasn't used.

◆ validateNamespace()

_.Library.Boolean validateNamespace ( _.Library.String  pTargetNS,
_.Library.Boolean  pIsEnabled,
_.Library.Status  pSC,
_.Library.Boolean  pCheckIfAvailable 
)
static

Internal method to validate a namespace:

Name needs to be non empty and not SYS.
Needs to be defined as a namespace.
Optional check: If <parameter>pIsEnabled</parameter> is true then require namespace is marked as an Interoperability namespace.
Optional check: If <parameter>pCheckIfAvailable</parameter> is true then require namespace can be accessed.

Member Data Documentation

◆ REMOVEEENSLIBNAMESPACE

REMOVEEENSLIBNAMESPACE = None
static

Remove ENSLIB namespace if it already exists AND doesn't reference.

any data or routines mapped from other databases.