Home > Class Reference > %SYS namespace > Config.CPF

Config.CPF

abstract class Config.CPF extends Config.CommonMethods

Method Inventory (Including Private)

Parameters

parameter DOMAIN = %Utility;

Methods (Including Private)

classmethod Activate(Obj As %Library.ObjectHandle = "", Flags As %Library.Integer = 0) as %Status [ Language = objectscript ]
Read and activate the current CPF file.
This method will read the currently active CPF file if it has been updated on disk but not yet read in. After the current settings have been read in, they are activated.
classmethod CPFFileNeedsActivation(ByRef Msg As %String) as %Boolean [ Language = objectscript ]
Returns 0/1 if the CPF file has been modified but not activated.
If it has been modified by an editor, an activation must occur before any of the Config methods can be called to activate any additional changes.
classmethod Convert(ByRef CPFFile As %String = "", Flags As %Integer = 0) as %Status [ Language = objectscript ]
Convert a CPF file to the current version.
This method will take a CPF file and convert it to the current version. Note that it will not do any validation on the file, it will simply convert it.
Parameters:
CPFFile - CPF file to convert.
Flags - Internal use only, do not pass.
classmethod Merge(CPFFile As %String = "", CPFMergeFile As %String = "") [ Language = objectscript ]
Merge two CPF files into one CPF file.
CPFFile - Valid CPF file to be used for base of the merge.
CPFMergeFile - Set of valid CPF file sections and parameters use to override parameters in the CPFFile.
Return Values:
Status - Success or list of errors in the MergeCPFFile from the Validate() method.
CPFFile will contain the merged fields.
classmethod PendingRestart(ByRef Reasons As %String) as %Boolean [ Language = objectscript ]
Determines if a restart of the system is required in order to activate modified CPF parameters.
Return Values:
0 - Restart is not required
1 - Restart is required
Reasons - If a restart is required, an array of reasons why in the following format.
Reasons=1
Reasons(1,"New")=New value
Reasons(1,"Old")=Old Value
Reasons(1,"Property")=Property name
Reasons(1,"Section")=Section name
Reasons(1)="Restart required because section [xxx], property yyy modified, new value:zzz, old value:zzz"
Note that if the CPF file has been modified, but not yet activated, this method will return 1, and the following array:
Reasons=1
Reasons(1)="Restart or reactivation required because the CPF file xxxx has been modified, but not activated"
Reasons(1,"New")=""
Reasons(1,"Old")=""
Reasons(1,"Property")=""
Reasons(1,"Section")=""
classmethod Validate(ByRef CPFFile As %String = "", Flags As %Integer = $$$ErrorTextToScreen, ByRef ErrorText As %String) as %Status [ Language = objectscript ]
Validate a CPFFile.
CPFFile - CPF file to validate.
Flags - Options for error text. Macros defined in %syConfig.inc.
Bit $$$ErrorTextToScreen - Write error text to terminal
Bit $$$ErrorTextToConsole - Write error text to messages.log
Bit $$$ErrorTextToArray - Return error text in ErrorText array
classmethod Write(ByRef CPFFile As %String = "") [ Language = objectscript ]
Write to the CPF file from the config object.
Parameters:
CPFFile - CPF file to write, default is currently active one.

Inherited Members

Inherited Methods (Including Private)