Remove ENSLIB namespace if it already exists AND doesn't reference
any data or routines mapped from other databases.
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 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 UpgradeUTCIndices()() method in this class should be run for this namespace.
classmethod CreateEnsembleAuditingEvents() 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 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.
classmethod DetermineMgmtURLForNamespace(pNamespace As %String = $namespace, pAppendHomePage As %Boolean = 1) as %String
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.
This does not prepend a non empty optional URLPrefix.
classmethod DisableNamespace(pTargetNS As %String, pVerbose As %Boolean = 0, pKeepNamespaceAsSystem As %Boolean = 0) as %Status
This method is called after a namespace is deleted
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 production-enabled namespaces.
pUpgrade only has meaning when pFromInstall is true.
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 GetNamespacesByShutdownGroup(Output pNamespacesByShutdownGroup) as %Status
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")].
classmethod GetNamespacesByStartupPriority(Output pNamespacesByStartupPriority) as %Status
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.
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
classmethod InstallEnsembleSecurity(pIsPrimary As %Boolean = 1, pVerbose As %Boolean = 0) as %Status
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.
classmethod SetAutoStart(pTargetNS As %String, pProductionName As %String, pStartupPriority As %Integer = "") as %Status
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.
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 Interoperability installation in ENSLIB
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 createNewDBForEnsTemp(pNamespace As %String = "", pVerbose As %Boolean = 0) as %Status
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.
classmethod defineAuditModifyDefaultSetting() as %String
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.
classmethod defineAuditModifyProductionConfiguration() as %String
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.
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.
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.
classmethod defineAuditStartStopProduction() as %String
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.
classmethod defineAuditViewMessageContents() as %String
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.
classmethod deleteMappings(pTargetNS As %String, pEnsLib As %String = ..#ENSLIB, pVerbose As %Boolean = 0) as %Status
Private helper method to create Interoperability 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 Interoperability namespace.
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, pEditGlobals As %Boolean = 1) as %Status
Setting pEditGlobals to 0 allows for suppressing globals edits and global collation checks while mapping globals. This may lead to potential global mismatch errors.
Setting pEditGlobals to 1 (default) allows the creation of a global directory entry for each local global to be mapped, with same collation as ENSLIB (IRIS standard).
classmethod mapClasses2enslib(pTargetNS As %String = $NAMESPACE, pVerbose As %Boolean = 0) as %Status
Method to replace map2enslib for use cases where only classes in a namespace need to be mapped to Enslib
classmethod mapGlobals2enslib(pTargetNS As %String = $NAMESPACE, pVerbose As %Boolean = 0, pEditGlobals As %Boolean = 1, ByRef pIsPrimary) as %Status
Method to replace map2enslib for use cases where only globals in a namespace need to be mapped to Enslib
See ClassMethod map2enslib() for pEditGlobals description.
classmethod mapRoutine2enslib(pTargetNS As %String = $NAMESPACE, pVerbose As %Boolean = 0) as %Status
Method to replace map2enslib for use cases where only routine in a namespace need to be mapped to Enslib
classmethod modifyInteropEditorsAPIApp(pNS As %String, pVerbose As %Boolean = 0) as %Status
Helper method to modify interop editors app
classmethod unmap2enslib(pTargetNS As %String = $NAMESPACE, pVerbose As %Boolean = 0) as %Status
classmethod upgradeDashboards(pTargetNS As %String, pVerbose As %Boolean = 0, pValidateNamespace As %Boolean = 1) as %Status
This method is called by EnableNamespace (via dataUpgradeSteps) to update Activity Dashboard meta data.
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.
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, pCheckIfAvailable As %Boolean = 0) as %Boolean
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 pIsEnabled is true then require
namespace is marked as an Interoperability namespace.
Optional check: If pCheckIfAvailable is true then require
namespace can be accessed.
Queries
query ListProductionsByAutoStartPriority()
Selects Production As %String(MAXLEN=128), StartupPriority As %String, Namespace As %String(MAXLEN=128)
Query to display order of productions set for auto start by order of startup priority for those namespaces caller allowed to inspect.
This Query is used in EnsPortal.AutoStartProduction but is only shown if the user has access to all. [GetNamespacesByStartupPriority() does not return an error]
query ListProductionsByShutdownGroup()
Selects Production As %String(MAXLEN=128), ShutdownGroup As %String, Namespace As %String(MAXLEN=128)
Query to display order of productions ordered by Shutdown Group for those namespaces caller allowed to inspect.
This Query is used in EnsPortal.ProductionShutdownGroup but is only shown if the user has access to all production namesapces. [GetNamespacesByShutdownGroup() does not return an error]