Skip to main content

HS.HC.SystemConfig.API

abstract class HS.HC.SystemConfig.API

Contains methods to manage IRIS configuration items.
ALL HealthShare configuration items MUST use these API methods instead of directly using IRIS APIs.
Every method, when invoked, queues up the configuration step to also run on every other mirror member. If not part of a mirror member, these steps are still queued up but not re-run (could be run if mirrored in future).
NOTE: There is special handling for when methods are called during instance installation to NOT queue these up to run on other mirror members as all mirror members will already have the steps run when installed/upgraded.

Method Inventory

Methods

classmethod ActivateConfiguration(pAssociatedDatabase As %String, pNamespace As %String)
Activate CPF changes for the provided namespace.
@API.Method
@Argument pAssociatedDatabase Associated mirrored database for execution of this method. This is purely informational.
@Argument pNamespace Namespace for which CPF changes are to be activated.
classmethod AddClassMappings(pAssociatedDatabase As %String, pNamespace As %String, pAddList As %String, pFrom As %String, pActivateConfiguration As %Boolean = 0)
Add a list of class/package mappings. For mappings that exist, this is a no-op. Use DeleteClassMappings() to delete the mappings before running this method if you want existing mappings to be overridden.
Adds them to the current configuration, but does not activate unless specified.
@API.Method
@Argument pAssociatedDatabase Associated mirrored database for execution of this method. This is purely informational.
@Argument pNamespace Namespace to which mappings are being added.
@Argument pAddList Comma-separated list of package specs, like "HS*,web*,...".
@Argument pFrom Database containing the package.
@Argument pActivateConfiguration Should be set to 1 to activate the mappings once they are added. If creating multiple mappings, should set this to 0 and call ActivateConfiguration() just once after all mappings have been created.
classmethod AddEnsembleSQLPrivileges(pAssociatedDatabase As %String, pNamespace As %String)
Wrapper around %EnsembleMgr method to assign SQL privileges.
@API.Method
@Argument pAssociatedDatabase Associated mirrored database for execution of this method. This is purely informational.
@Argument pNamespace Namespace in which to assign privileges.
classmethod AddGlobalMappings(pAssociatedDatabase As %String, pNamespace As %String, pAddList As %String, pFrom As %String, pSetCollation As %Boolean = 0, pActivateConfiguration As %Boolean = 0)
Add a list of global mappings of specified type. For mappings that exist, this is a no-op.
Use DeleteRoutineMappings() to delete the mappings before running this method if you want existing mappings to be overridden.
Adds them to the current configuration, but does not activate unless specified.
@API.Method
@Argument pAssociatedDatabase Associated mirrored database for execution of this method. This is purely informational.
@Argument pNamespace Namespace to which mappings are being added.
@Argument pAddList Comma-separated list of global specs, like "A,B:(""sub"")",C...".
@Argument pFrom Database containing the globals.
@Argument pSetCollation Set to force collation of the mapping to use the new global collation for the pFrom database.
@Argument pActivateConfiguration Should be set to 1 to activate the mappings once they are added. If creating multiple mappings, should set this to 0 and call ActivateConfiguration() just once after all mappings have been created.
classmethod AddGlobalMappingsNew(pAssociatedDatabase As %String, pNamespace As %String, pAddList As %List, pFrom As %String, pSetCollation As %Boolean = 0, pActivateConfiguration As %Boolean = 0)
Newer version of AddGlobalMappings(). pAddList is a $List instead of a comma separated list, and we don't remove the ":". This enables multiple subscripts as well as ranges.
Add a list of global mappings of specified type. For mappings that exist, this is a no-op.
Use DeleteRoutineMappings() to delete the mappings before running this method if you want existing mappings to be overridden.
Adds them to the current configuration, but does not activate unless specified.
@API.Method
@Argument pAssociatedDatabase Associated mirrored database for execution of this method. This is purely informational.
@Argument pNamespace Namespace to which mappings are being added.
@Argument pAddList List of global specs, like $lb("A","B:(""sub"")","C",...)".
@Argument pFrom Database containing the globals.
@Argument pSetCollation Set to force collation of the mapping to use the new global collation for the pFrom database.
@Argument pActivateConfiguration Should be set to 1 to activate the mappings once they are added. If creating multiple mappings, should set this to 0 and call ActivateConfiguration() just once after all mappings have been created.
classmethod AddRoutineMappings(pAssociatedDatabase As %String, pNamespace As %String, pAddList As %String, pType As %String = "ALL", pFrom As %String, pActivateConfiguration As %Boolean = 0)
Add a list of routine mappings of specified type ("ALL", "INC", etc). For mappings that exist, this is a no-op.
Use DeleteRoutineMappings() to delete the mappings before running this method if you want existing mappings to be overridden.
Adds them to the current configuration, but does not activate unless specified.
@API.Method
@Argument pAssociatedDatabase Associated mirrored database for execution of this method. This is purely informational.
@Argument pNamespace Namespace to which mappings are being added.
@Argument pAddList Comma-separated list of routine specs, like "HS*,web*,...".
@Argument pType The type to map, "ALL" or "INC".
@Argument pFrom Database containing the routines.
@Argument pActivateConfiguration Should be set to 1 to activate the mappings once they are added. If creating multiple mappings, should set this to 0 and call ActivateConfiguration() just once after all mappings have been created.
classmethod AddUpdateResource(pAssociatedDatabase As %String, pResource As %String, pDescription As %String, pPublicPermissions As %String = "")
Add/update the provided system security resource.
@API.Method
@Argument pAssociatedDatabase Associated mirrored database for execution of this method. This is purely informational.
@Argument pResource Resource to delete.
classmethod AddUpdateRole(pAssociatedDatabase As %String, pRole As %String, pDescription As %String, pResources As %String, pGrantedRoles As %String = "")
Add/update the provided system level role.
@API.Method
@Argument pAssociatedDatabase Associated mirrored database for execution of this method. This is purely informational.
@Argument pRole Name of the role.
@Argument pDescription Description of the role.
@Argument pResources Comma-separated list of resources granted to the role with the permission level (e.g. "MyResource:RW,MyResource1:RWU").
@Argument pGrantedRoles Comma-separated list of additional roles granted when this role is granted to a user (e.g. "GrantedRole1,GrantedRole2").
classmethod AddUpdateRoleCustom(pAssociatedDatabase As %String, pRole As %String, pCustomList As %Library.List)
Add/update the provided system level role.
Can update in a custom manner based described below.
@API.Method
@Argument pAssociatedDatabase Associated mirrored database for execution of this method. This is purely informational.
@Argument pRole Name of the role.
@Argument pCustomList A $ListBuild list of properties to use, with a flag for each for custom behavior as follows:
Flag = 0 means override with the provided value
Flag = 1 means append to existing value
No flag defaults to 0
If no value is provided, the property will not be populated
Format of list: $ListBuild("Description~flag", "Resources~flag", "GrantedRoles~flag")
classmethod AllowPrefix(pAssociatedDatabase As %String, pNamespace As %String, pPrefix As %String)
Set the AllowPrefix for /csp/healthshare/{namespace} web app to the provided prefix.
@API.Method
@Argument pAssociatedDatabase Associated mirrored database for execution of this method. This is purely informational.
@Argument pNamespace Namespace of web app.
@Argument pPrefix Allowed prefix.
deprecated classmethod CopyDirectory(pAssociatedDatabase As %String, pSource As %String, pTarget As %String, pRelative As %Boolean = 1)
DEPRECATED. Use RelativeCopyDirectory() instead which is both kit and container friendly.
Copy contents of a source directory to a target directory.
@API.Method
@Argument pAssociatedDatabase Associated mirrored database for execution of this method. This is purely informational.
@Argument pSource The source directory path.
@Argument pTarget The target directory path.
@Argument pRelative Whether the path provided is relative or absolute. Can see how absolute directory is computed from relative by looking at DirRef().
deprecated classmethod CopyFileToFile(pAssociatedDatabase As %String, pSourceDir As %String, pSourceFile As %String, pTargetDir As %String, pTargetFile As %String, pRelative As %Boolean = 1, pDeleteBeforeCopy As %Boolean = 0)
DEPRECATED. Use RelativeCopyFileToFile() instead which is both kit and container friendly.
Copy a source directory to a target directory.
@API.Method
@Argument pAssociatedDatabase Associated mirrored database for execution of this method. This is purely informational.
@Argument pSourceDir The source directory path.
@Argument pSourceFile The source file name.
@Argument pTargetDir The target directory path.
@Argument pTargetFile The target file name.
@Argument pRelative Whether the path provided is relative or absolute. Can see how absolute directory is computed from relative by looking at FileRef().
@Argument pDeleteBeforeCopy Whether the target file should be deleted before copying.
deprecated classmethod CopyStringToFile(pAssociatedDatabase As %String, pString As %String, pDirectory As %String, pFileName As %String, pAppend As %Boolean = 0, pRelative As %Boolean = 1)
DEPRECATED. Use RelativeCopyStringToFile() instead which is both kit and container friendly.
Copy a string to the given file. If pAppend is 1, the string is appended to the end of the file. If 0, the file is deleted and re-created with just the provided string.
@API.Method
@Argument pAssociatedDatabase Associated mirrored database for execution of this method. This is purely informational.
@Argument pString The string to write to the file.
@Argument pDirectory The target directory path.
@Argument pFileName The target file name.
@Argument pAppend Whether pString should be appeended to the existing file or overwrite its contents.
@Argument pRelative Whether the path provided is relative or absolute. Can see how absolute directory is computed from relative by looking at DirRef() and FileRef().
deprecated classmethod CreateCSPApp(pAssociatedDatabase As %String, pIsUserPortal As %Boolean = 1, pPortal As %String, pNS As %String, pPortalDir As %String, pDescription As %String, pGrant As %String = "", pCookiePath As %String = "", pSuperclass As %String = "", pSessionEventsClass As %String = "", pInbndWebServicesEnabled As %Boolean = 0, pSameSiteCookieValue As %String = 1)
DEPRECATED. Use CreateWebApplication() instead which has no side effects.
@API.Method
@Argument pAssociatedDatabase Associated mirrored database for execution of this method. This is purely informational.
@Argument pIsUserPortal Whether this web app will be used to serve CSP/Zen UI.
@Argument pPortal Name of web app.
@Argument pNS Namespace to associate with web app.
@Argument pPortalDir Relative directory for physical file path of web app. Directory computed relative to install directory. See DirRef().
@Argument pDescription Description of web app.
@Argument pGrant Comma-separated string of application roles to grant to the web app.
@Argument pCookiePath Session cookie path.
@Argument pSuperclass Web app super class for CSP pages.
@Argument pSessionEventsClass Session Events class.
@Argument pInbndWebServicesEnabled Whether SOAP web services are enabled.
@Argument pSameSiteCookieValue Setting to use for SameSite on user and session cookies. Defaults to "Lax".
classmethod CreateDatabase(pAssociatedDatabase As %String, pDatabaseName As %String, pDoMirror As %Boolean = 1, pLocation As %String = "", pDBResource As %String = "", pRelativeTo As %Integer = ##class(HS.HC.SystemConfig.Utils).RelativeToDefault())
Create a database.
Is a no-op if the database already exists.
@API.Method
@Argument pAssociatedDatabase Associated mirrored database for execution of this method. This is purely informational.
@Argument pDatabaseName Name of database to create.
@Argument pDoMirror Whether this database should be mirrored.
@Argument pLocation Alternate location for database (MUST be a full path). Can leave as null or empty string for it to default to be depending on pRelativeTo.
@Argument pDBResource Resource that protects the database.
@Argument pRelativeTo Use if want database created in relative directory, find corresponding value defined in $$$RelativeTo* macros. Default as the most regularly used case.
deprecated classmethod CreateDirectoryChain(pAssociatedDatabase As %String, pDirectory As %String, pRelative As %Boolean = 1)
DEPRECATED. Use RelativeCreateDirectoryChain() instead which is both kit and container friendly.
Create a directory chain for the supplied directory path.
@API.Method
@Argument pAssociatedDatabase Associated mirrored database for execution of this method. This is purely informational.
@Argument pDirectory The directory path.
@Argument pRelative Whether the path provided is relative or absolute. Can see how absolute directory is computed from relative by looking at DirRef().
classmethod CreateEnsembleMappings(pAssociatedDatabase As %String, pNamespace As %String)
Create Ensemble Mapppings for the provided namespace.
@API.Method
@Argument pAssociatedDatabase Associated mirrored database for execution of this method. This is purely informational.
@Argument pNamespace Namespace to create mappings for.
classmethod CreateNamespace(pAssociatedDatabase As %String, pNamespace As %String, pCodeDB As %String = "", pDataDB As %String = "")
Create a namespace. Is a no-op if namespace already exists.
Before doing this, for a regular HealthShare config item database, we expect the config item to be defined.
@API.Method
@Argument pAssociatedDatabase Associated mirrored database for execution of this method. This is purely informational.
@Argument pNamespace Name of namespace to create.
@Argument pCodeDB Optional routine database for code to live in.
@Argument pDataDB Optional globals database for data to live in.
NOTE: For the databases provided, they need to already exist. This method DOES NOT create them. If no value is provided, then the default database name used is the same as pNamespace.
classmethod CreateSSLConfig(pAssociatedDatabase As %String, pConfigName As %String, pPropertiesList As %List)
Create a system SSL/TLS configuration. Is a no-op if the configuration already exists.
@API.Method
@Argument pAssociatedDatabase Associated mirrored database for execution of this method. This is purely informational.
@Argument pConfigName Name of configuration to create.
@Argument pPropertiesList Name-value pair list, constructed by $$$NVPairToList(a name-value-pair array) of properties in Security.SSLConfigs.
classmethod CreateServiceRole(pAssociatedDatabase As %String)
Create the $$$HSServiceRole role. Is a no-op if the role already exists.
@API.Method
@Argument pAssociatedDatabase Associated mirrored database for execution of this method. This is purely informational.
classmethod CreateServiceUser(pAssociatedDatabase As %String, pForceEnable As %Boolean = 0, pForceCreate As %Boolean = 0)
Create the $$$HSServiceUserName user.
@API.Method
@Argument pAssociatedDatabase Associated mirrored database for execution of this method. This is purely informational.
@Argument pForceEnable Set to 1 to force enabling of user.
@Argument pForceCreate Force creation/re-creation of the user.
classmethod CreateWebApplication(pAssociatedDatabase As %String, pName As %String, pPropertyList As %Library.List, Output pFound As %Boolean, pDataDirectory As %Boolean = 1)
Wrapper around Security.Applications:Create. No-op if application already exists (returns as output whether the application was found).
NOTE: To understand certain exceptions for properties (which will undergo transformation before being sent to the Create method), look at the documentation for TransformPropertiesBeforeWebAppAPI().
@API.Method
@Argument pAssociatedDatabase Associated mirrored database for execution of this method. This is purely informational.
@Argument pName Name of web application.
@Argument pPropertyList Name-value pair list that is converted to subscripted array for Security.Applications API.
@Argument pFound Whether web application already exists.
@Argument pDataDirectory 1 - use DataDirectory, 0 - use InstallDirectory
classmethod DeleteCSPApp(pAssociatedDatabase As %String, pPortal As %String, pPurgeFiles As %Boolean)
Delete the given web app. Is a no-op if the web app does not exist.
@API.Method
@Argument pAssociatedDatabase Associated mirrored database for execution of this method. This is purely informational.
@Argument pPortal Name of web app.
@Argument pPurgeFiles Whether files associated with the web app should be deleted.
classmethod DeleteClassMappings(pAssociatedDatabase As %String, pNamespace As %String, pDeleteList As %String = "", pActivateConfiguration As %Boolean = 0)
Remove a list of class/package mappings for the selected namespace. For mappings that do not exist, this is a no-op.
@API.Method
@Argument pAssociatedDatabase Associated mirrored database for execution of this method. This is purely informational.
@Argument pNamespace Namespace from which mappings are being deleted.
@Argument pDeleteList Comma-separated list of package specs, like "HS*,web*,...".
@Argument pActivateConfiguration Should be set to 1 to activate the mappings once they are added. If creating multiple mappings, should set this to 0 and call ActivateConfiguration() just once after all mappings have been created.
classmethod DeleteDatabase(pAssociatedDatabase As %String, pDatabaseName As %String)
Delete a database. Should ONLY be used in deleting a database that's NOT part of a namespace.
@API.Method
@Argument pAssociatedDatabase Associated mirrored database for execution of this method. This is purely informational.
@Argument pDatabaseName Name of database to delete.
classmethod DeleteGlobalMappings(pAssociatedDatabase As %String, pNamespace As %String, pDeleteList As %String = "", pActivateConfiguration As %Boolean = 0)
Remove a list of global mappings for the selected namespace. For mappings that do not exist, this is a no-op.
@API.Method
@Argument pAssociatedDatabase Associated mirrored database for execution of this method. This is purely informational.
@Argument pNamespace Namespace from which mappings are being deleted.
@Argument pDeleteList Comma-separated list of global specs, like "A,B:(""sub"")",C...".
@Argument pActivateConfiguration Should be set to 1 to activate the mappings once they are added. If creating multiple mappings, should set this to 0 and call ActivateConfiguration() just once after all mappings have been created.
classmethod DeleteNamespace(pAssociatedDatabase As %String, pNamespace As %String, pPurgeFiles As %Boolean = 1, pDeleteCSPApps As %Boolean = 0)
If the CSP portal has not been set up for Ensemble, along with Ensemble mappings, this will only delete the namespace. Otherwise, this will also delete the core databases that belong to that namespace, the primary database roles & resources, as well as the primary CSP portal. If pDeleteCSPApps is set, this will delete additional CSP apps. This DOES NOT delete any additional roles & resources, or the HealthShare Config item.
@API.Method
@Argument pAssociatedDatabase Associated mirrored database for execution of this method. This is purely informational.
@Argument pNamespace Namespace to delete.
@Argument pPurgeFiles Whether to delete the database files for the namespace.
@Argument pDeleteCSPApps Whether to delete web applications for the namespace.
classmethod DeleteOneTask(pAssociatedDatabase As %String, pTaskClass As %String, pNamespace As %String)
Delete the specific task in the namespace.
@API.Method
@Argument pAssociatedDatabase Associated mirrored database for execution of this method. This is purely informational.
@Argument pTaskClass Task to delete.
@Argument pNamespace Namespace for which tasks are to be deleted.
classmethod DeleteOneTaskWithArgs(pAssociatedDatabase As %String, pTaskClass As %String, pNamespace As %String, pArgs...)
Delete the specific task in the namespace.
@API.Method
@Argument pAssociatedDatabase Associated mirrored database for execution of this method. This is purely informational.
@Argument pTaskClass Task to delete.
@Argument pNamespace Namespace for which tasks are to be deleted.
@Argument pArgs... For Delete methods which require one or more arguments
classmethod DeleteResource(pAssociatedDatabase As %String, pResource As %String)
Delete the provided system security resource. Is a no-op if resource does not exist.
@API.Method
@Argument pAssociatedDatabase Associated mirrored database for execution of this method. This is purely informational.
@Argument pResource Resource to delete.
classmethod DeleteRole(pAssociatedDatabase As %String, pRole As %String)
Delete the provided system security role. Is a no-op if role does not exist.
@API.Method
@Argument pAssociatedDatabase Associated mirrored database for execution of this method. This is purely informational.
@Argument pRole Role to delete.
classmethod DeleteRoutineMappings(pAssociatedDatabase As %String, pNamespace As %String, pDeleteList As %String = "", pType As %String = "ALL", pActivateConfiguration As %Boolean = 0)
Remove a list of routine mappings for the selected namespace. For mappings that do not exist, this is a no-op.
@API.Method
@Argument pAssociatedDatabase Associated mirrored database for execution of this method. This is purely informational.
@Argument pNamespace Namespace from which mappings are being deleted.
@Argument pDeleteList Comma-separated list of routine specs, like "HS*,web*,...".
@Argument pType The type to map, "ALL" or "INC".
@Argument pActivateConfiguration Should be set to 1 to activate the mappings once they are added. If creating multiple mappings, should set this to 0 and call ActivateConfiguration() just once after all mappings have been created.
classmethod DeleteTasks(pAssociatedDatabase As %String, pNamespace As %String)
Delete all Tasks for the namespace.
@API.Method
@Argument pAssociatedDatabase Associated mirrored database for execution of this method. This is purely informational.
@Argument pNamespace Namespace for which tasks are to be deleted.
classmethod EnableCSRFProtection(pAssociatedDatabase As %String)
Enables CSRF protection for all non-REST CSP applications.
@API.Method
@Argument pAssociatedDatabase Associated mirrored database for execution of this method. This is purely informational.
classmethod FixOAuthCustomizationClasses(pAssociatedDatabase As %String)
Wrapper around method in HS.OAuth2.Server.Installer. TODO: Move to be upgrade step on instance upgrade. @API.Method
@Argument pAssociatedDatabase Associated mirrored database for execution of this method. This is purely informational.
classmethod MergeCSPRoles(pAssociatedDatabase As %String, pWebApp As %String, pRoles As %String)
Updates web application roles with the provided roles.
DOES NOT support match roles. ONLY application roles.
@API.Method
@Argument pAssociatedDatabase Associated mirrored database for execution of this method. This is purely informational.
@Argument pWebApp Web application to grant roles to.
@Argument pRoles Comma-separated list of roles to grant.
classmethod RecompileUICustomPackage(pAssociatedDatabase As %String)
The HS.UI.Custom.* package fails to compile sometimes upon upgrade from a CE based HS instance to an IRIS based HS instance. Hence, they should be recompiled after all other classes have been compiled, as an upgrade step.
TODO: Move to be upgrade step on instance upgrade. @API.Method
@Argument pAssociatedDatabase Associated mirrored database for execution of this method. This is purely informational.
classmethod RelativeCopyDirectory(pAssociatedDatabase As %String, pSource As %String, pSourceRelativeTo As %Integer = $$$RelativeToDurableSYSDir, pTarget As %String, pTargetRelativeTo As %Integer = $$$RelativeToDurableSYSDir)
Copy contents of a source directory to a target directory.
@API.Method
@Argument pAssociatedDatabase Associated mirrored database for execution of this method. This is purely informational.
@Argument pSource The source directory path.
@Argument pSourceRelativeTo The base directory that pSource is relative to, find corresponding value defined in $$$RelativeTo* macros.
@Argument pTarget The target directory path.
@Argument pTargetRelativeTo The base directory that pTarget is relative to, find corresponding value defined in $$$RelativeTo* macros. Default as the most regularly used case.
Can see how absolute directory is computed from relative by looking at DirRelativeTo().
classmethod RelativeCopyFileToFile(pAssociatedDatabase As %String, pSourceDir As %String, pSourceFile As %String, pSourceRelativeTo As %Integer = $$$RelativeToDurableSYSDir, pTargetDir As %String, pTargetFile As %String, pTargetRelativeTo As %Integer = $$$RelativeToDurableSYSDir, pDeleteBeforeCopy As %Boolean = 0)
Copy a source directory to a target directory.
@API.Method
@Argument pAssociatedDatabase Associated mirrored database for execution of this method. This is purely informational.
@Argument pSourceDir The source directory path.
@Argument pSourceFile The source file name.
@Argument pSourceRelativeTo The base directory that pSourceDir is relative to, find corresponding value defined in $$$RelativeTo* macros. Default as the most regularly used case.
@Argument pTargetDir The target directory path.
@Argument pTargetFile The target file name.
@Argument pTargetRelativeTo The base directory that pTargetDir is relative to, find corresponding value defined in $$$RelativeTo* macros. Default as the most regularly used case.
Can see how absolute directory is computed from relative by looking at FileRelativeTo().
@Argument pDeleteBeforeCopy Whether the target file should be deleted before copying.
classmethod RelativeCopyStringToFile(pAssociatedDatabase As %String, pString As %String, pDirectory As %String, pFileName As %String, pAppend As %Boolean = 0, pRelativeTo As %Integer = $$$RelativeToDurableSYSDir)
Copy a string to the given file. If pAppend is 1, the string is appended to the end of the file. If 0, the file is deleted and re-created with just the provided string.
@API.Method
@Argument pAssociatedDatabase Associated mirrored database for execution of this method. This is purely informational.
@Argument pString The string to write to the file.
@Argument pDirectory The target directory path.
@Argument pFileName The target file name.
@Argument pAppend Whether pString should be appeended to the existing file or overwrite its contents.
@Argument pRelativeTo The base directory that pDirectory is relative to, find corresponding value defined in $$$RelativeTo* macros. Default as the most regularly used case.
Can see how absolute directory is computed from relative by looking at DirRelativeTo() and FileRelativeTo().
classmethod RelativeCreateDirectoryChain(pAssociatedDatabase As %String, pDirectory As %String, pRelativeTo As %Integer = $$$RelativeToDurableSYSDir)
Create a directory chain based on the supplied directory path.
@API.Method
@Argument pAssociatedDatabase Associated mirrored database for execution of this method. This is purely informational.
@Argument pDirectory The directory path.
@Argument pRelativeTo The base directory that pDirectory is relative to, find corresponding value defined in $$$RelativeTo* macros. Default as the most regularly used case.
Can see how absolute directory is computed from relative by looking at DirRelativeTo().
classmethod RelativeRemoveDirectory(pAssociatedDatabase As %String, pDirectory As %String, pRelativeTo As %Integer = $$$RelativeToDurableSYSDir)
Remove a directory for the supplied directory path.
@API.Method
@Argument pAssociatedDatabase Associated mirrored database for execution of this method. This is purely informational.
@Argument pDirectory The directory path.
@Argument pRelativeTo The base directory that pDirectory is relative to, find corresponding value defined in $$$RelativeTo* macros. Default as the most regularly used case.
Can see how absolute directory is computed from relative by looking at DirRelativeTo().
classmethod RelativeRemoveDirectoryIfExists(pAssociatedDatabase As %String, pDirectory As %String, pRelativeTo As %Integer = $$$RelativeToDurableSYSDir)
Remove a directory for the supplied directory path if it exists. Is a no-op if the path does not exist
@API.Method
@Argument pAssociatedDatabase Associated mirrored database for execution of this method. This is purely informational.
@Argument pDirectory The directory path.
@Argument pRelativeTo The base directory that pDirectory is relative to, find corresponding value defined in $$$RelativeTo* macros. Default as the most regularly used case.
Can see how absolute directory is computed from relative by looking at DirRelativeTo().
deprecated classmethod RemoveDirectory(pAssociatedDatabase As %String, pDirectory As %String, pRelative As %Boolean = 1)
DEPRECATED. Use RelativeRemoveDirectory() instead which is both kit and container friendly.
Remove a directory for the supplied directory path.
@API.Method
@Argument pAssociatedDatabase Associated mirrored database for execution of this method. This is purely informational.
@Argument pDirectory The directory path.
@Argument pRelative Whether the path provided is relative or absolute. Can see how absolute directory is computed from relative by looking at DirRef().
deprecated classmethod RemoveDirectoryIfExists(pAssociatedDatabase As %String, pDirectory As %String, pRelative As %Boolean = 1)
DEPRECATED. Use RelativeRemoveDirectoryIfExists() instead which is both kit and container friendly.
Remove a directory for the supplied directory path if it exists. Is a no-op if the path does not exist
@API.Method
@Argument pAssociatedDatabase Associated mirrored database for execution of this method. This is purely informational.
@Argument pDirectory The directory path.
@Argument pRelative Whether the path provided is relative or absolute. Can see how absolute directory is computed from relative by looking at DirRef().
classmethod RemoveUserRoles(pAssociatedDatabase As %String, pUsername As %String, pRoles As %List)
Helper method that removes a user's set of roles.
@API.Method
@Argument pAssociatedDatabase Associated mirrored database for execution of this method. This is purely informational.
@Argument pUsername User whose roles needs to be updated.
@Argument pRoles List of roles to be added to the users set of roles.
classmethod SQLGrant(pAssociatedDatabase As %String, pNamespace As %String, pPrivilege As %String, pType As %String, pList As %List, pRole As %String, pWGrant As %Integer = 0)
Wrapper around $System.SQL.GrantObjPriv.
@API.Method
@Argument pAssociatedDatabase Associated mirrored database for execution of this method. This is purely informational.
@Argument pNamespace Namespace in which to grant privileges.
@Argument pPrivilege Look at docs of $System.SQL.GrantObjPriv.
@Argument pType Look at docs of $System.SQL.GrantObjPriv.
@Argument pList Look at docs of $System.SQL.GrantObjPriv.
@Argument pRole Look at docs of $System.SQL.GrantObjPriv.
@Argument pWGrant Look at docs of $System.SQL.GrantObjPriv.
classmethod ScheduleTask(pAssociatedDatabase As %String, pTaskClass As %String, pNamespace As %String, pIgnore As %String = "")
Schedule a task to run in the provided namespace by calling the "Schedule" method on the task class.
Will throw an error if the method does not exist. The method must take at least one argument of the namespace the task should run in.
@API.Method
@Argument pAssociatedDatabase Associated mirrored database for execution of this method. This is purely informational.
@Argument pTaskClass Name of task class.
@Argument pNamespace Namespace task should run in.
@Argument pIgnore Legacy argument no longer used needed for backwards compatibility (queued up steps may have a value for it).
classmethod ScheduleTaskDaily(pAssociatedDatabase As %String, pTaskClass As %String, pNamespace As %String, pRunDaily As %Boolean = 1)
Schedule a task to run in the provided namespace by calling the "Schedule" method on the task class.
Will throw an error if the method does not exist. The method must take at least two arguments: of the namespace the task should run in and whether it should run daily.
@API.Method
@Argument pAssociatedDatabase Associated mirrored database for execution of this method. This is purely informational.
@Argument pTaskClass Name of task class.
@Argument pNamespace Namespace task should run in.
@Argument pRunDaily Whether the task should run daily.
classmethod ScheduleTaskWithArgs(pAssociatedDatabase As %String, pTaskClass As %String, pNamespace As %String, pArgs...)
Schedule a task to run in the provided namespace by calling the "Schedule" method on the task class.
Will throw an error if the method does not exist. The method must take at least one argument of the namespace the task should run in.
@API.Method
@Argument pAssociatedDatabase Associated mirrored database for execution of this method. This is purely informational.
@Argument pTaskClass Name of task class.
@Argument pNamespace Namespace task should run in.
@Argument pArgs... For Schedule methods which require one or more arguments
classmethod SetupPermissions(pAssociatedDatabase As %String, pNamespace As %String, pRole As %String = "")
Assign all SQL permissions to a role.
If no role is provided, permissions are granted to the "%HS_DB_pNamespace" role.
@API.Method
@Argument pAssociatedDatabase Associated mirrored database for execution of this method. This is purely informational.
@Argument pNamespace Namespace in which to grant SQL privileges.
@Argument pRole Optional role to grant SQL privileges to.
classmethod UnMirrorDatabase(pAssociatedDatabase As %String, pDatabaseName As %String)
Unmirrors a database if it exists. Is a no-op in the following cases:
  • Instance is not mirrored.
  • Database is not mirrored.
  • Database is not mounted.
@API.Method
@Argument pAssociatedDatabase Associated mirrored database for execution of this method. This is purely informational.
@Argument pDatabaseName Database to unmirror.
deprecated classmethod UpdateCSPApp(pAssociatedDatabase As %String, pPortal As %String, pPropertiesList As %List, pRelativePath As %Boolean = 1, pMode As %String = "u")
DEPRECATED. Use UpdateWebApplication() instead which has no side effects.
@API.Method
@Argument pAssociatedDatabase Associated mirrored database for execution of this method. This is purely informational.
@Argument pPortal Name of web app.
@Argument pPropertyList Name-value pair list that is converted to subscripted array for Security.Applications API.
@Argument pRelativePath Whether the "Path" property when provided is relative or absolute. Can see how absolute directory is computed from relative by looking at DirRef().
@Argument pMode One of "u" - update or "n"/"c" - create. If "n"/"c" and app exists, the web app is deleted and a new one is created.
classmethod UpdateCSPPercentAccess(pAssociatedDatabase As %String, pGrantType As %String, pCSPApplication As %String, pAccessItem As %String, pAccessEnabled As %Boolean)
Update Percent access for web application.
@API.Method
@Argument pAssociatedDatabase Associated mirrored database for execution of this method. This is purely informational.
@Argument pGrantType One of "AllowClass" or "AllowPrefix"
@Argument pCSPApplication Web application with leading and trailing "/"
@Argument pAccessItem One of "classname" or "prefix"
@Argument pAccessEnabled Whether access is enabled.
classmethod UpdateDatabaseResource(pAssociatedDatabase As %String, pNamespace As %String, pResource As %String)
Update the resource for the database(s) for a specified namespace. @API.Method
@Argument pAssociatedDatabase Associated mirrored database for execution of this method. This is purely informational.
@Argument pNamespace Namespace whose databases are to be updated.
@Argument pResource Resource for the databases.
classmethod UpdateTasksUsername(pAssociatedDatabase As %String)
Update HealthShare tasks in all HS application namespaces to run as _Ensemble instead of HS_Services or _SYSTEM. NOTE: Intended ONLY to be used by upgrade steps and is NOT a public-facing API method. To be used internally by InterSystems ONLY.
TODO: Move to be upgrade step on instance upgrade. @Modifier Availability InterSystems
@API.Method
@Argument pAssociatedDatabase Associated mirrored database for execution of this method. This is purely informational.
classmethod UpdateUserRoles(pAssociatedDatabase As %String, pUsername As %String, pRoles As %List)
Helper method that updates a user's set of roles.
@API.Method
@Argument pAssociatedDatabase Associated mirrored database for execution of this method. This is purely informational.
@Argument pUsername User whose roles needs to be updated.
@Argument pRoles List of roles to be added to the users set of roles.
classmethod UpdateWebApplication(pAssociatedDatabase As %String, pName As %String, pPropertyList As %Library.List, Output pFound As %Boolean, pDataDirectory As %Boolean = 1)
Wrapper around Security.Applications:Modify. No-op if application does not exist (returns as output whether the application was found).
NOTE: To understand certain exceptions for properties (which will undergo transformation before being sent to the Modify method), look at the documentation for TransformPropertiesBeforeWebAppAPI().
@API.Method
@Argument pAssociatedDatabase Associated mirrored database for execution of this method. This is purely informational.
@Argument pName Name of web application.
@Argument pPropertyList Name-value pair list that is converted to subscripted array for Security.Applications API.
@Argument pFound Whether web application already exists.
@Argument pDataDirectory 1 - use DataDirectory, 0 - use InstallDirectory
FeedbackOpens in a new tab