Skip to main content

%Installer.Installer

Class %Installer.Installer Extends %RegisteredObject [ ServerOnly = 1, System = 3 ]

Implements all installation operations

Parameters

DEFAULTDBRESOURCE

Parameter DEFAULTDBRESOURCE As STRING = "%DB_%DEFAULT";

Default DB resource

DEFAULTINSTALLERMETHODNAME

Parameter DEFAULTINSTALLERMETHODNAME As STRING = "setup";

Default installer method name

Properties

Variables

Property Variables As %String [ Internal, MultiDimensional, Private ];

Variables

Configuration

Property Configuration As Config.Configuration [ Internal ];

InterSystems IRIS configuration object

LogLevel

Property LogLevel As %Integer [ InitialExpression = 0, Internal ];

Log level

Logger

Property Logger As %Installer.AbstractLogger [ Internal ];

Logger

NSStack

Property NSStack As %String [ Internal ];

Namespace stack

Methods

InstallFromCommandLine

ClassMethod InstallFromCommandLine(pManifestSpec As %String, pManifestParams As %String = "", ByRef pLogLevel, pLogger As %Installer.AbstractLogger) As %Status [ Internal ]

Called to load and run an install from the command line The pManifestSpec is the /INSTALLERMANIFEST parameter The pManifestParams is the INSTALLERMANIFESTPARAMS parameter

InstallOnFirstRestart

ClassMethod InstallOnFirstRestart()

Run %Installer.InstallFromCommandLine on the first restart after installation or upgrade

LoadManifestXML

ClassMethod LoadManifestXML(pManifestSpec As %String, pNamespace As %String = {$NAMESPACE}, ByRef pClass As %String, ByRef pMethod As %String) As %Status [ Internal ]

Load a manifest XML from a file

PushNS

Method PushNS(pNS As %String) [ Internal ]

Switch to a new namespace, saving the current one

PopNS

Method PopNS() [ Internal ]

Revert to a previous namespace

IsVariableDefined

Method IsVariableDefined(pName As %String) [ CodeMode = expression, Internal ]

Check a variable

SetVariable

Method SetVariable(pName As %String, pValue As %String) [ Internal ]

Set a variable

DeleteVariable

Method DeleteVariable(pName As %String) [ Internal ]

Delete a variable

GetVariable

Method GetVariable(pName As %String, Output pResult As %String, pEvaluate As %Boolean = 1) As %String [ Internal ]

Get the value of a variable

Evaluate

Method Evaluate(pExpr As %String) As %String [ Internal ]

Evaluate an expression. Expressions are strings that support 3 flavors of string expansion:

  • ${variable}: Expands to the named variable
  • ${#parameter}: Expands to the named parameter value for the class that contains the XML
  • #{expr}: Expands to the CoS expression (must be properly quoted)

Note that ${#...} is expanded at compile time, thus can be nested inside ${} and #{} expressions. Additionally, ${} expressions are expanded before #{} ones, so they can be nested. For example:

#{$ZCVT("${NAMESPACE}","L")}

evalToken

Method evalToken(pExpr As %String, pType As %String, pFunction As %String, Output pResult As %String) As %Status [ Internal, Private ]

Evaluate X{} variables

evalVars

Method evalVars(pExpr As %String, Output pResult As %String) As %Status [ Internal, Private ]

Evaluate ${} variables

evalExpr

Method evalExpr(pExpr As %String, Output pResult As %String) As %Status [ Internal, Private ]

Evaluate #{} variables

eval

Method eval(pExpr As %String) As %String [ Internal ]

Evaluate a CoS expression

evalSpecial

Method evalSpecial(pExpr As %String, Output pResult As %String) As %Status [ Internal, Private ]

Evaluate @{} variables

special

Method special(pVar As %String) As %String [ Internal ]

Evaluate special variables

CreateDatabase

Method CreateDatabase(pName As %String, pDir As %String, pCreate As %String, pResource As %String = "", pPublicPermissions As %String = "RW", pEncrypted As %Boolean = 0, pEncryptionKeyID As %String = "", pBlockSize As %Integer = "", pInitialSize As %Integer = "", pMaximumSize As %Integer = "", pExpansionSize As %Integer = "", pCollation As %String = "", pStreamLocation As %String = "", pClusterMountMode As %Boolean = "", pMountAtStartup As %Boolean = "", pMountRequired As %Boolean = "") [ Internal ]

Create a database

CreateNamespace

Method CreateNamespace(pNamespace As %String, pCodeDB As %String, pDataDB As %String, pFlags As %String) [ Internal ]

Create a namespace

EnableEnsemble

Method EnableEnsemble(pNamespace As %String, pEnsPortalSuffix As %String = "", pEnsPortalPrefix As %String = "", pGrant As %String, pCookiePath As %String, pAuthMethods As %Integer) [ Internal ]

Enable a namespace for Interoperability productions

ClassMapping

Method ClassMapping(pNamespace As %String, pSpec As %String, pFrom As %String)

Create a class mapping into 'pNamespace', of 'pSpec' from the 'pFrom' namespace

GlobalMapping

Method GlobalMapping(pNamespace As %String, pSpec As %String, pFrom As %String, pCollation As %Integer = "") [ Internal ]

Create a global mapping into 'pNamespace', of 'pSpec' from the 'pFrom' namespace

RoutineMapping

Method RoutineMapping(pNamespace As %String, pSpec As %String, pType As %String, pFrom As %String) [ Internal ]

Create a routine mapping into 'pNamespace', of 'pSpec' from the 'pFrom' namespace

CopyFile

Method CopyFile(pSrc As %String, pTarget As %String, pIgnoreErrors As %Boolean = 0) [ Internal ]

Copy a file

CopyDir

Method CopyDir(pSrc As %String, pTarget As %String, pIgnoreErrors As %Boolean = 0) [ Internal ]

Copy a directory

CopyClass

Method CopyClass(pSrc As %String, pTarget As %String, pReplace As %Boolean = 0) [ Internal ]

Copy a class

ClassExists

Method ClassExists(pTarget As %String, pNamespace As %String = {$NAMESPACE}) As %Boolean [ Internal ]

Check to see if a class exists

Production

Method Production(pNamespace As %String, pProduction As %String, pAutoStart As %Boolean, ByRef pSettings, ByRef pCredentials) [ Internal ]

Production settings

ProductionExists

Method ProductionExists(pTarget As %String, pNamespace As %String = {$NAMESPACE}) As %Boolean [ Internal ]

Check to see if a production exists

CSPApplication

Method CSPApplication(pUrl As %String, pNamespace As %String, pDescription As %String, pDirectory As %String, pResource As %String, pRecurse As %String, pLoginClass As %String, pCookiePath As %String, pAuthMethods As %Integer, pLockCSPName As %Boolean, pEventClass As %String, pDefaultTimeout As %Integer, pDefaultSuperclass As %String, pUseSessionCookie As %Integer, pServeFiles As %Boolean, pServeFilesTimeout As %Integer, pCustomErrorPage As %String, pPackageName As %String, pChangePasswordPage As %String, pGroupById As %String = "", pCspZenEnabled As %Boolean = 1, pInboundWebServicesEnabled As %Boolean = 1, pTwoFactorEnabled As %Boolean = 0, pIsNameSpaceDefault As %Boolean = 0, pPermittedClasses As %String = "", pAutoCompile As %Boolean = 1, pDispatchClass As %String = "", pMatchRoles As %String = "", pGrant As %String = "") [ Internal ]

Create/modify a CSP application

Import

Method Import(pNamespace As %String, pTarget As %String, pFlags As %String, pIgnoreErrors As %String = "", pRecurse As %Boolean = 0) [ Internal ]

Import a file (or directory)

LoadPage

Method LoadPage(pNamespace As %String, pName As %String, pDir As %String, pFlags As %String, pIgnoreErrors As %Boolean = 0) [ Internal ]

Load CSP pages

Compile

Method Compile(pNamespace As %String, pClass As %String, pFlags As %String, pIgnoreErrors As %Boolean = 0) [ Internal ]

Compile

SystemSetting

Method SystemSetting(pItem As %String, pValue As %String) [ Internal ]

Set a system setting

CreateResource

Method CreateResource(pName As %String, pDescription As %String, pPermission As %String, pType As %Integer = 0) [ Internal ]

Create a security resource

CreateRole

Method CreateRole(pName As %String, pDescription As %String, pResources As %String, pRolesGranted As %String) [ Internal ]

Create a security role

CreateUser

Method CreateUser(pUsername As %String, pRoles As %String, pPassword As %String, pFullName As %String, pNamespace As %String, pRoutine As %String, pExpirationDate As %String, pChangePassword As %Boolean, pEnabled As %Boolean, pComment As %String, pFlags As %String = 1) [ Internal ]

Create a security user

ActivateConfiguration

Method ActivateConfiguration(pTargetNS As %String) [ Internal ]

Activate a configuration

%OnNew

Method %OnNew(ByRef pConfigFile As %RawString, ByRef pVars, pLogLevel As %Integer = 0, pLogger = {$$$NULLOREF}) As %Status [ Internal, Private, ProcedureBlock = 1, ServerOnly = 1 ]

Construct a new instance of a %Installer.Installer object

Log

Method Log(pLevel As %Integer, pTopic As %String, Args...) [ Internal ]

Log to the installer log

IsLoggable

Method IsLoggable(pLevel As %Integer) As %Boolean [ CodeMode = expression, Internal ]

Check to see if a particular log level will cause logging

setupVars

Method setupVars(ByRef pVars) [ Internal, Private ]

Setup initial variables

macroArgs

ClassMethod macroArgs(pArgs As %List) As %String [ Internal ]

Process macro arguments for $$$EVAL

macroArg

ClassMethod macroArg(pArg As %String) As %String [ Internal ]

Process a single macro argument for $$$EVAL

preEval

ClassMethod preEval(pExpr As %String) As %String [ Internal, Private ]

Pre-evaluate a $$$EVAL argument to expand references to class parameters

quote

ClassMethod quote(pValue As %String) As %String [ Internal ]

Quote a string

processParamsIntoArray

ClassMethod processParamsIntoArray(pParams As %String, pNamed As %Boolean, ByRef pArray) As %Status [ Internal ]

Convert a parameter list of the form: A=1,B=2,C="3,4,5",D=6,E="7,""Q"",8",F=9 Into an array of named/values: a("A")=1 a("B")=2 a("C")="3,4,5" a("D")=6 a("E")="7,""Q"",8" a("F")=9 If pNamed is false, then the position is used as a name: 1,2,"3,4,5",6,"7,""Q"",8",9 Becomes: a(1)=1 a(2)=2 a(3)="3,4,5" a(4)=6 a(5)="7,""Q"",8" a(6)=9