Skip to main content

Config.CommonMultipleMethods

abstract class Config.CommonMultipleMethods extends Config.CommonMethods

This class contains methods which are inherited by other config classes.

Method Inventory

Parameters

parameter CAPITALNAME = 0;
Determines if the Name specified in the index should be capitalized.
parameter SECTIONTYPE = 1;
This parameter governs how the class creates audit records.
Value = 0 - Class contains a single entry (SQL, Net, etc.)
Value = 1 - Class contains multiple entries (Databases, Namespaces, etc.)
Value = 2 - Class deals with mappings (MapGlobals, MapRoutines, MapPackages.)

Methods

classmethod Create(Name As %String, ByRef Properties As %String, CPFFile As %String = "", Flags As %Integer = $$$CPFSave+$$$CPFWrite+$$$CPFActivate) as %Status
Create a section instance in a CPF file.

Parameters:
Name - Name of the instance to create.
Properties (byref) - List of the properties to add in Properties(Name)=Value format. Available properties depend on the subclass.
CPFFile (byref) - Name of the CPF file to use, Default=current active CPF file. The file must have a .CPF file extension if specified.
Flags - (From %syConfig.inc) Bit string of options to perform.
Bit $$$CPFSave - Save data to config database.
Bit $$$CPFWrite - Write config database to CPF file.
Bit $$$CPFActivate - Copy changes to ^CONFIG global, and make active on system.
By default, all these bits are set, and you should normally not pass this parameter. If you are modifying a CPF file which is not the active CPF file, Bit $$$CPFActivate is ignored.
If you have a batch of updates to do (like adding several devices, databases, or namespaces), then you should pass only Bit $$$CPFSave for each call. Then when creating the last one, don't pass any bits. This will cause all the previous additions to be written to the CPF file and activated all at once.

Return values:
CPFFile (byref) - Name of the CPF file the modification was made in.
classmethod Delete(Name As %String, ByRef CPFFile As %String = "", Flags As %Integer = $$$CPFSave+$$$CPFWrite+$$$CPFActivate) as %Status
Delete a section instance from a CPF file.

Parameters:
Name - Name of the instance to delete.
CPFFile (byref) - Name of the CPF file to use, Default=current active CPF file. The file must have a .CPF file extension if specified.
Flags - Bit string of options to perform. See the Create() method for values.

Return values:
CPFFile (byref) - Name of the CPF file the modification was made in.
classmethod Exists(Name As %String, ByRef Obj As %ObjectHandle, ByRef Status As %Status, ByRef CPFFile As %String = "", Flags As %Integer = $$$CPFSave+$$$CPFWrite+$$$CPFActivate) as %Boolean
Database exists.
This method checks for the existence of a section instance in a CPF file.

Parameters:
Name - Name of the instance to check existence of.
CPFFile (byref) - Name of the CPF file to use, Default=current active CPF file. The file must have a .CPF file extension if specified.
Flags - Bit string of options to perform if the object is later saved with the %Save() method. See the Create() method for values.

Return values:
If Value of the method = 0 (Instance does not exist, or some error occured)
Obj = Null
Status = Instance "x" does not exist, or other error message

If Value of the method = 1 (Instance exists)
Obj = Object handle to Instance
CPFFile (byref) - Name of the CPF file the modification was made in.
Status = Instance "x" already exists
classmethod Get(Name As %String, ByRef Properties As %String, ByRef CPFFile As %String = "", Flags As %Integer = $$$CPFSave+$$$CPFWrite+$$$CPFActivate) as %Status
Get a section instances properties from a CPF file.

Parameters:
Name - Name of the instance to get.
CPFFile (byref) - Name of the CPF file to use, Default=current active CPF file. The file must have a .CPF file extension if specified.

Return values:
Properties (byref) - List of the properties in Properties(Name)=Value format. Available properties depend on the subclass.
CPFFile (byref) - Name of the CPF file the modification was made in.
classmethod GetList(Name As %String, ByRef CPFFile As %String = "", Flags As %Integer = $$$CPFSave+$$$CPFWrite+$$$CPFActivate) as %Status
Returns the properties from a section instance in a CPF file by value in $list format

Parameters:
Name - Name of the instance to get.
CPFFile (byref) - Name of the CPF file to use, Default=current active CPF file. The file must have a .CPF file extension if specified.

Return value:
      $lb(%Status,Result)
      where Result=$LB($LB(property name,value),...) for each property in the instance of the section
classmethod Modify(Name As %String, ByRef Properties As %String, ByRef CPFFile As %String = "", Flags As %Integer = $$$CPFSave+$$$CPFWrite+$$$CPFActivate) as %Status
Modify a section instance in a CPF file.

Parameters:
Name - Name of the instance to modify.
Properties (byref) - List of the properties to modify in Properties(Name)=Value format. Available properties depend on the subclass. If a specific property is not passed in the properties array, the value is not modified.
CPFFile (byref) - Name of the CPF file to use, Default=current active CPF file. The file must have a .CPF file extension if specified.
Flags - Bit string of options to perform. See the Create() method for values.

Return values:
CPFFile (byref) - Name of the CPF file the modification was made in.
classmethod Open(Name As %String, ByRef CPFFile As %String = "", concurrency As %Integer = -1, ByRef Status As %Status, Flags As %Integer = $$$CPFSave+$$$CPFWrite+$$$CPFActivate) as %ObjectHandle
Open a section instance object in a CPF file.

Parameters:
Name - Name of the instance to open
CPFFile (byref) - Name of the CPF file to use, Default=current active CPF file. The file must have a .CPF file extension if specified.

Return Values:
CPFFile (byref) - Name of the CPF file the modification was made in.

Inherited Members

Inherited Methods

Subclasses

FeedbackOpens in a new tab