Open Exchange
Global Masters
Home > Class Reference > ENSLIB namespace > %SYS.Ensemble
Private  Storage   


abstract class %SYS.Ensemble


Parameters Properties Methods Queries Indices ForeignKeys Triggers


CheckDocBookWebAppEnabled CreateDocumentation EnsembleUsername GetEnsMetrics
GetStatusAll GlobalInMirroredDB ListAlertingUsers SecondaryDelete
SecondaryGet SecondarySet StartProduction StopProduction


• private classmethod BasicChecks(pResources As %String = "", pCheckLicense As %Boolean = 1, pCheckNamespace As %Boolean = 1) as %Status
Common method to ensure that the public methods of this class are correctly invoked.
• classmethod CheckDocBookWebAppEnabled(ByRef pEnabled As %Boolean = 0) as %Status
Check whether the /csp/docbook web app is enabled (for use by EnsPortal.ProductionDocument)
• classmethod CreateDocumentation(pProduction As %String = "", pIntro As %Boolean = 1, pFormat As %String, Output LogFileName As %String, Output URL As %String, Output BookName As %String, PDFFileName As %String, PDFRenderer As %String, ByRef Params As %String) as %Status
Wrapper around the Ens.Util.Documentation::CreateDoc() API to ensure that users have sufficient privileges to add the resulting material to the documentation.
• classmethod EnsembleUsername() as %String
Correctly determine the expanded Interoperability manager username (used internallly and not for login) if the system is using multiple domains. If multiple domains are in use, then the Interoperability manager username should be present in the default domain.
• classmethod GetEnsMetrics(pID As %String, pCount As %Integer, Output pValues, Output pStatus, Output pMsg, pInterval As %Numeric = 10) as %Status
Wrapper around the SYS.EnsMetrics::GetMainMetrics() API to ensure that all users with USE permissions on %Ens_Dashboard can get this information even if they aren't permitted to directly run code in the system database.
• classmethod GetStatusAll(Output nsStatus) as %Status
Method to get the status of productions in all known production-enabled namespaces on this system.
Note that data is NOT retrieved from remote databases.
This list will not include namespaces if the default global database for the namespace is not mounted.
The output status array is subscripted by namespace and with a value for each namespace that is a $List with 5 components:
  1. Production Name of last used Production if any
  2. Localized Status text
  3. 1 if the Production is Running, Stopped or Suspended, 0 otherwise, indicating 'not known to be OK'
  4. 'HS' if the namespace is HealthShare enabled, otherwise empty
  5. The numeric state value representing the production's status
• classmethod GlobalInMirroredDB(pGlobal As %String = "", Output pMirrored As %Boolean) as %Status
• classmethod ListAlertingUsers(Output pUsers As %String, pLimitToNamespace As %String = "") as %Status
This method is used by the portal page EnsPortal.ManagedAlertViewer

It returns a list of users who are members of the %EnsRole_AlertManager, %EnsRole_AlertOperator or %EnsRole_Alert roles.
If the role %EnsRole_Administrator has USE privilege on the %Ens_AlertAdministration resource then users of the role %EnsRole_Administrator will also be listed.
Users with %All role will not be listed unless they are explicitly members of one of the roles previously mentioned.
The default is to list all the users in the instance. Pass the namespace in the second parameter to limit the list to the user with write access to the Ens.Alerting.ManagedAlert data in a specific namespace.
A user must be permitted to edit alerts to call this API.
• private classmethod LoginAsEnsembleUser(pMethod As %String = "Unknown") as %Status
Helper method to ensure that we can log in as the _Ensemble user AND that this user has the %All role. Note that the calling code should escalate privileges to ensure the user may call $system.Security.Login(). We use "_Ensemble" as the login name instead of EnsembleUsername() as the return value from the method is a fully qualified username.
• classmethod SecondaryDelete(pKey As %String = "", pProperty As %String = "") as %Status
Secure wrapper for deleting secondary data. Only support Password.
• classmethod SecondaryGet(pKey As %String = "", pProperty As %String = "", ByRef pSC As %Status) as %String
Wrapper for getting secondary data. User needs Read access to the DB for 'Password'. Only support Password.
• classmethod SecondarySet(pValue As %String = "", pKey As %String = "", pProperty As %String = "") as %Status
Secure wrapper for writing secondary data. Only support Password.
• classmethod StartProduction(pProductionName As %String) as %Status
Secure wrapper for the StartProduction API in Ens.Director.
• classmethod StopProduction(pTimeout As %Numeric = 10, pForce As %Boolean = 0) as %Status
Secure wrapper for the StopProduction API in Ens.Director.
• classmethod UpdateProduction(pTimeout As %Numeric = 10, pForce As %Boolean = 0, pCalledByScheduleHandler As %Boolean = 0) as %Status
Secure wrapper for the UpdateProduction API in Ens.Director.
• private classmethod filterUsersOnGlobalAccess(ByRef pUsers As %String, pNamespace As %String = $NAMESPACE, pGlobal As %String = "", pSubscript As %String = "", pAccessMode As %String = "READ") as %Boolean
Internal helper method to identify if user has access to the global Error handling to be trapped by caller.
• private classmethod findAlertMembers(Output pUsers, pLimitToNamespace As %String = "") as %Status
• private classmethod findMembers(pRole As %String, ByRef pUsers, ByRef pRolesAleadyExamined, ByRef pNewRolesToExamine) as %Status
Find User and Role members for role pRole. Called by findUserMembers
• private classmethod findUserMembers(ByRef pRoles, Output pUsers) as %Status
Internal private method to find all users in ROLE hierarchy for array of roles given by pRoles
• private classmethod privcheckDocBookWebAppEnabled() as %Boolean
Perform the actual check for /csp/docbook web app enabled