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
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.
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.
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
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 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
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 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.
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 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