Skip to main content

%Studio.SourceControl.Production

This class is used internally by InterSystems. You should not make direct use of it within your applications. There is no guarantee made about either the behavior or future operation of this class.

Included is handling for exporting Productions as individual pieces of settings and importing individual item settings.

Method Inventory

Parameters

parameter SrcVer = $Id: //iris/2026.1.0/databases/sys/cls/Studio/SourceControl/Production.xml#2 $;
This Parameter should be updated when synced from Perforce
parameter Version = 28a;
Revision number of this class when compiled as part of the //custom_ccrs/_common/config/... branch. This version will not be updated (by design) when the class is integrated to other branches. This allows the user to tell what version of the Studio client tools are in use.

Methods

classmethod CheckAndUpdateProduction(instanceWide As %Boolean = 0, jointNamespace As %Boolean = 0, productionName As %String = "") as %Status
Check if active Production(s) need update and run UpdateProduction if so. If productionName is provided then only UpdateProduction for the given Production name.
classmethod CreateInternalName(productionName As %String = "", itemName As %String = "", itemClassName As %String = "", isProductionSettings As %Boolean = 0) as %String
Calculates the internal name for a decomposed production item
classmethod CreateProduction(productionName As %String, superClasses As %String = "") as %Status
Given internal name for a Production Settings PTD, creates the corresponding Production Class if it does not already exist in this namespace
classmethod DeleteProductionDefinitionShards(productionClass As %String, deleteMethod As %String, nameMethod As %String) as %Status
Removes settings for a given Production and each Config Item from source control. This marks each of them for delete and is triggered by deleting a decomposed Production.
classmethod ExecDirectNoPriv(sql As %String, args...) as %SQL.StatementResult
Executes a SQL query without privilege checking if possible on this IRIS version
classmethod ExportConfigItemSettings(productionClass As %String, item As %RegisteredObject, nameMethod As %String, Output internalName As %String) as %Status
Export a single Production Config Item. For a given Ens.Config.Item, the exports the PTD for this item to the file system under the directory specified
classmethod ExportPTD(internalName As %String, nameMethod As %String) as %Status
Creates and exports a PTD item for a given internal name, either a single config item or the production settings.
classmethod ExportProductionDefinitionShards(productionClass As %String, nameMethod As %String, Output internalNames) as %Status
Exports settings for a given Production and each Config Item from the ProductionDefinition as separate XMLs. These are exported to the appropriate file based on nameMethod of the source control class
classmethod ExportProductionSettings(productionClass As %String, nameMethod As %String, Output internalName As %String) as %Status
Exports the Production settings from ProductionDefinition given the Production class name
classmethod ExportProjectForPTD(productionClass As %String, ptdName As %String, exportPath As %String) as %Status
Exports a Studio project including both the provided PTD and export notes for the PTD
classmethod GetAddOrDeletedItems(productionName As %String, ByRef modifiedItems)
Get added or deleted Config Items by checking Ens_Config.Item table against cache from OnBeforeSave
classmethod GetModifiedItemsAfterSave(internalName As %String, Output modifiedItems)
classmethod GetModifiedItemsBeforeSave(internalName As %String, Location As %String, Output modifiedItems)
classmethod GetUserProductionChanges(productionName As %String, ByRef items)
Given an internal name of a Production and an IRIS user, populate an array with the filenames for each of their current uncommitted changes associated with the given Production
classmethod ImportPTD(externalName As %String, productionName As %String) as %Status
Imports a PTD into a produciton given an external name and produciton name
classmethod ImportPTDsDir(directory As %String, isDecompMethod As %String = "") as %Status
Imports all PTDs within a given directory. Also recursively imports from all subdirectories
classmethod InstanceVersion() as %Numeric
Returns value the Major.Minor version for this instance, so it can be used in comparison code which makes sure certain features are used in appropriate versions
classmethod IsBusinessHostClass(className As %String, nameMethod As %String) as %Boolean
Given an internal name, determines if this item is a config item class.
classmethod IsEnsPortal(Output source As %String = "") as %Boolean
Check if current CSP session is EnsPortal page
classmethod IsProductionClass(className As %String, nameMethod As %String) as %Boolean
Perform check if Production Decomposition logic should be used for given item
classmethod ParseExternalName(externalName As %String, Output internalName="", Output productionName="") as %Status
Given a file name for a PTD item, returns a suggested internal name. This method assumes that the file exists on disk.
classmethod ParseInternalName(internalName As %String, noFolders As %Boolean = 0, Output fileName As %String, Output itemName As %String, Output itemClassName As %String, Output productionName As %String, Output isProdSettings As %Boolean)
Given an internal name for a PTD item, returns a suggested filename for export, as well as: - itemName: name of the configuration item - productionName: name of the associated production - isProdSettings: if true, this item is a production settings; if false, this item is a configuration item settings
classmethod ProductionHasCustomCode(prodClass As %String) as %Boolean
Check if Production class has custom code by searching for any class members defined in the class that are not inherited (other than XData block).
classmethod RemoveItem(internalName As %String, noFolders As %Boolean = 0) as %Status
Given an internal name for a PTD item, removes that item from the production.
classmethod RemoveItemByExternalName(externalName As %String, nameMethod As %String) as %Status
Given an external name for a PTD item, removes that item from the production.
classmethod RestartConfigItems(instanceWide As %Boolean = 0, jointNamespace As %Boolean = 0, ByRef hostClasses As %String, ByRef failedItems As %String) as %Status
Stop all config items in running Productions that are instances of the given Business Host class(es). Then restart the items. This is intended to apply changes resulting from editing the code for a Business Host. If in instance-wide configuration or with multiple business host classes, calls recursively until base case of a single Namespace and a single business host class. instanceWide indicates whether this call needs to potentially apply to all Namespaces with running Productions. This will result in multiple calls with instanceWide set to 0 to run on individual Productions. jointNamespace indicates if this needs to apply to multiple Namespaces that are part of a Joint- Namespace CCR Configuration. hostClasses indicates the Business host class names and is either a string or an array of format: hostClasses("Custom.MyBusinessHost1") = "" hostClasses("Custom.MyBusinessHost2") = "" doUpdate is set to 1 to update the Production once per Namespace. Recursive calls for multiple business hosts set this flag to 0.

Inherited Members

Inherited Methods

FeedbackOpens in a new tab