Class Reference
IRIS for UNIX 2024.1.2
InterSystems: The power behind what matters   
Documentation  Search
  [USER] >  [%IPM] >  [Main]
Private  Storage   

class %IPM.Main extends %IPM.CLI

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
2 58 3


Summary

Methods
%GetCommandStructure %GetOneCommandStructure %Help %HelpForCommand
%ParseCommandInput ActiveNamespacesClose ActiveNamespacesExecute ActiveNamespacesFetch
CheckModuleNamespace DisplayError DisplayModules DrawBorder
DrawColumn EnableIPM FormatName GetDefaultCommandRegistry
GetListModule GetListNamespace GetMapInfo GetVersion
GetVersionModule IPMInstalled Import IsAvailable
ParseJsonToCommand PrintTree RunDependencyAnalyzer Shell
ShellScript SwitchToNamespace TerminalPrompt TerminalPromptColor
UnmapIPM UpdateLanguageExtensions UpdateLanguageExtensionsOne


Parameters

• parameter DOMAIN = "ZPM";
• parameter STANDARDPHASES;

Methods

• classmethod %GetCommandStructure(Output pCommandStructure)
• classmethod ActiveNamespacesClose(qHandle As %Binary) as %Status
• classmethod ActiveNamespacesExecute(qHandle As %Binary) as %Status
• classmethod ActiveNamespacesFetch(qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) as %Status
• classmethod CheckModuleNamespace() as %Status
• classmethod DisplayError(pStatus As %Status)
• classmethod DisplayModules(ByRef pList, pNumbered As %Boolean = 0, pWithNamespace As %Boolean = 0, pIndent As %Integer = 0, ByRef pModifiers)
• classmethod DrawColumn(desc) as %String
draw description
• classmethod EnableIPM(ByRef pCommandInfo)
• classmethod GetDefaultCommandRegistry()
Get Default Command of Registry example d ##class(%IPM.Main).GetDefaultCommandRegistry()
deprecatedclassmethod GetListModule(ns=$Namespace, ByRef Mod, OnlyName=1) as %Status
Get module list in currently namespace
• classmethod GetListNamespace(Output list, pSearch As %String = "")
Get list Namespace, example do ##class(%IPM.Main).GetListNamespace(.ns)
• classmethod GetMapInfo(Output pIsMappedFrom, Output pIsMappedTo)
Get the mapping relationship for %IPM package. Format:
  • pIsMappedFrom(destinationNamespace) = sourceNamespace
  • pIsMappedTo(sourceNamespace, destinationNamespace) = ""
• classmethod GetVersion(ModuleName, ByRef out, list)
@API.Method Get Version modules and current registry example do ##class(%IPM.Main).GetVersion("zpm,zpm-registry",.out,.list)
• classmethod GetVersionModule(name, namespace=$namespace)
Get Version Module
• classmethod IPMInstalled(ByRef ipmModuleId) as %Boolean
• classmethod Import(ByRef pCommandInfo)
• classmethod IsAvailable(pModuleName As %String, pNamespace As %String = "", pArgs...) as %Boolean
@API.Method
• classmethod PrintTree(ByRef pTree)
Prints a tree with unicode box art Tree representation should be: pTree() = $listbuild(, , ) With the first node in node #1 (no root - it can have siblings), and the subscripts are sequential according to pre-order (which is how the tree will be displayed, one node per line).
• classmethod RunDependencyAnalyzer(ByRef pCommandInfo)
Run Dependency Analyzer for the given module
• classmethod Shell(pCommand As %String = "", pTerminateOnError As %Boolean = 0, pHaltOnComplete As %Boolean = 0) as %Status
@API.Method
• classmethod ShellScript(pCommand As %String, pOutputLogFile As %String = "", pAppendToLog As %Boolean = 0)
Runs package manager commands in a way that is friendly to the OS-level shell. Creates pOutputLogFile if it does not exist. If it does, and pAppendToLog is true, appends to it; otherwise, deletes the file before outputting to it.
• classmethod SwitchToNamespace(pNamespace As %String = $Namespace) as %Status
• classmethod TerminalPrompt() as %String
• classmethod UnmapIPM(ByRef pCommandInfo)
• classmethod UpdateLanguageExtensions(pVerbose As %Boolean = 0, pTestOnly As %Boolean = 0, Output pFound As %Boolean = 0) as %Status
• classmethod UpdateLanguageExtensionsOne(RoutineName As %String, pTestOnly As %Boolean = 0, Output pFound As %Boolean = 0, ByRef tGenLines) as %Status

Queries

• query ActiveNamespaces()
Selects ID As %String, Name As %String
Implemented as custom query instead of `select Nsp, Nsp from %SYS.Namespace_List(0,0) WHERE status = 1` because of a DP issue, see https://github.com/intersystems/ipm/issues/579
• query ServerMenuExtensionClasses()
Selects ID As %String, Name As %String
SQL Query :
select Name as ID,Name from %Dictionary.ClassDefinition_SubclassOf('%IPM.ExtensionBase.ServerMenu.Interface')
• query SourceControlClasses()
Selects ID As %String, Name As %String
SQL Query :
select Name as ID,Name from %Dictionary.ClassDefinition_SubclassOf('%IPM.ExtensionBase.SourceControl.Interface')


Copyright (c) 2025 by InterSystems Corporation. Cambridge, Massachusetts, U.S.A. All rights reserved. Confidential property of InterSystems Corporation.