Skip to main content

%SYS.AppMetadataStack.Descriptor

This class serves as a base AMS Descriptor class for the associated application's metadata string corresponding to a single entry of the Application Metadata Stack (AMS). This AMS Descriptor class should be used to create a Metadata string via the invocation of the CreateMetadata() method (typically for lightweight applications only needing to create a {MetadataString}), or to create a AMS Descriptor object (for full feature applications) via the invocation of the CreateDescriptor() method or the CreateDescriptorFromMetadata() method.

This AMS Descriptor class should be used as a means by which to define the contents of a single entry of a metadata string that will ultimately get pushed onto the AMS. Much like a table definition in SQL parlance, this AMS Descriptor class should be able to accommodate for both a static definition, which is currently used for the "SQL" application, and for a dynamic data-driven definition, which allows the data (e.g. {MetadataInfo}) to dynamically define the metadata string's structure.

This base AMS Descriptor class ensures consistency in parsing and handling of AMS metadata entries across all ApplicationID/ApplicationROWID values, as defined by the following metadata components and format:

Metadata Components

{ApplicationID} ::= The value from the associated application's metadata string corresponding to a single entry of the Application Metadata Stack (AMS). For all InterSystems applications, this value will be prefixed with a percent sign (%), similar to how we use this prefix to delineate InterSystems classes and routines from those created by users.
The InterSystems SQL application, for example, uses the following value for its {ApplicationID}: %SQL

{AppSpecificInfo} ::= A value (or group of values) that is used in combination with the {ApplicationID} that provides a unique identifier for the metadata string corresponding to a single entry of the AMS.
The InterSystems SQL application, for example, uses the following value for its {AppSpecificInfo}:
{SQLStatementID} = A unique SQL Statement identifier that can be used to identify a SQL Statement that is stored in the SQL Statement Index (SSI)

{AppMetadataStackID} ::= The first component of the {MetadataString} whose format is a $LIST(...) that is comprised of two (or more) elements that can be used to uniquely identify each metadata string entry of the AMS.
{AppMetadataStackID} = $LIST({ApplicationID},{AppSpecificInfo})

{ApplicationROWID} ::= The external representation of the {AppMetadataStackID} component, which provides a unique ID associated with each metadata string entry of the AMS

{ApplicationClass} ::= The full class name used to define the {ApplicationID}.
The InterSystems SQL application, for example, uses the following value for its {ApplicationClass}: %SYS.AppMetadataStack.SQL

{MetadataString} ::= The minimally defined metadata string, created either directly via the invocation of the CreateMetadata() method (typically for lightweight applications only needing to create a metadata string), or indirectly after it has been created and stored in the Metadata property when this AMS Descriptor class gets instantiated via the invocation of the CreateDescriptor() method or the CreateDescriptorFromMetadata() method.
This value can ultimately be pushed on the Application Metadata Stack (AMS)

{MetadataInfoFormat} ::= A flag to determine the format of the {MetadataInfo} component:
1: A $LIST(...) of metadata info as <value>s only (primarily for static definitions)
2: A $LIST(...) of metadata info as <name>/<value> pairs in the following format: $LB(<name>,<value>) (primarily for dynamic data-driven definitions)

{MetadataInfo} ::= The second component of the {MetadataString} whose format is determined by the value of the {MetadataInfoFormat} flag and defined below:
1: $LB(<info value 1>,...,<info value N>)
2: $LB($LB(<info name 1>,<info value 1>),...,$LB(<info name N>,<info value N>))

{RawMetadataString} ::= This fully defined metadata string, where the {MetadataInfo} component is comprised of metadata info as <name>/<value> pairs, is created and stored in the RawMetadata property when this AMS Descriptor class gets instantiated via the invocation of the CreateDescriptor() method or the CreateDescriptorFromMetadata() method.

This information is used for InterSystems Internal Use ONLY and should not be used by customers!

NOTE:
The metadata component terms listed above are referenced throughout this class either surrounded by curly-braces {} or without curly-braces (as required by the context of their usage) and should be considered interchangeable (having the same meaning).
Metadata Format Usage Creating an AMS Descriptor Object Examples
      // Static Definition
      // -----------------
      // Sample.AMS.Person.CLS
         
         Class Sample.AMS.Person Extends %SYS.AppMetadataStack.Descriptor
         {
         Property MetadataInfoNameList As %List [ InitialExpression = {$LB("Name","DOB","HomeAddress","MobilePhone")} ];
         }
         
         // Static Usage
         // ------------
         set appClass="Sample.AMS.Person"         // The AMS Descriptor class for the 'Person' application
         set appSpecificInfo=$LB("111-11-1111")   // App specific info, when combined with the 'appClass', that creates a 
                                                  //   unique ID (ApplicationROWID) for the 'metadata' string
         set metadataInfoFormat=1                 // A flag to indicate that the 'metadataInfoList' parameter is a $LIST(...) of <value>s
         set metadataInfoList=$LB("Michael","10/18/66","123 San Diego","555-555-5555")  // A $LIST(...) of metadata info <value>s
         
         set descriptor0=##class(%SYS.AppMetadataStack.Descriptor).CreateDescriptor(appClass,appSpecificInfo,metadataInfoFormat,metadataInfoList,.tSC,"1")
         
         write descriptor0.ApplicationID          // Person
         write descriptor0.ApplicationROWID       // Sample.AMS.Person||111-11-1111
         write descriptor0.ApplicationClass       // Sample.AMS.Person
         zwrite descriptor0.MetadataInfoNameList  // $lb("Name","DOB","HomeAddress","MobilePhone")
         zwrite descriptor0.MetadataInfoValueList // $lb("Michael","10/18/66","123 San Diego","555-555-5555")
         zwrite descriptor0.Metadata              // $lb($lb("Person","Sample.AMS","111-11-1111"),"Michael","10/18/66","123 San Diego","555-555-5555")
         write descriptor0.GetDisplayName()       // Person
         
    
      // Dynamic Data-Driven Definition
      // ------------------------------
      // --- Example #1 ---
         set descriptor1=##class(%SYS.AppMetadataStack.Descriptor).CreateDescriptor("%Test",$LB("AppSpecificInfo"),2,$LB($LB("infoName1","infoVal1"),$LB("infoName2","infoVal2")),.tSC,"1")
         
         // Dynamic Data-Driven Usage
         // -------------------------
         write descriptor1.ApplicationID          // %Test
         write descriptor1.ApplicationROWID       // %SYS.AppMetadataStack.Test||AppSpecificInfo
         write descriptor1.ApplicationClass       // %SYS.AppMetadataStack.Test
         zwrite descriptor1.MetadataInfoNameList  // $lb("infoName1","infoName2")
         zwrite descriptor1.MetadataInfoValueList // $lb("infoVal1","infoVal2")
         zwrite descriptor1.Metadata              // $lb($lb("%Test","%SYS.AppMetadataStack","AppSpecificInfo"),"infoVal1","infoVal2")
         write descriptor1.GetDisplayName()       // Test
         
      // --- Example #2 ---
         set descriptor2=##class(%SYS.AppMetadataStack.Descriptor).CreateDescriptor("USER.AppMetadataStack.Test",$LB("AppSpecificInfo"),2,$LB($LB("infoName1","infoVal1"),$LB("infoName2","infoVal2")),.tSC,"1")
         
         // Dynamic Data-Driven Usage
         // -------------------------
         write descriptor2.ApplicationID          // Test
         write descriptor2.ApplicationROWID       // USER.AppMetadataStack.Test||AppSpecificInfo
         write descriptor2.ApplicationClass       // USER.AppMetadataStack.Test
         zwrite descriptor2.MetadataInfoNameList  // $lb("infoName1","infoName2")
         zwrite descriptor2.MetadataInfoValueList // $lb("infoVal1","infoVal2")
         zwrite descriptor2.Metadata              // $lb($lb("Test","USER.AppMetadataStack","AppSpecificInfo"),"infoVal1","infoVal2")
         write descriptor2.GetDisplayName()       // Test
    

Property Inventory

Method Inventory

Parameters

parameter ClassApplicationID = $s($e($classname(),1)="%":"%",1:"")_$p($classname(),".",*);
The ApplicationID for the current class ($classname() without the package name).

NOTE:
This value should match the value returned from the GetApplicationID() method once the AMS Descriptor class gets instantiated via the invocation of the CreateDescriptor() method or the CreateDescriptorFromMetadata() method.

Properties

property ApplicationClass as %String;
The full ApplicationClass from the associated application's metadata string corresponding to a single entry of the Application Metadata Stack (AMS)

For additional information, please see the Metadata Components section of the class documentation above.
Property methods: ApplicationClassDisplayToLogical(), ApplicationClassGet(), ApplicationClassIsValid(), ApplicationClassLogicalToDisplay(), ApplicationClassLogicalToOdbc(), ApplicationClassNormalize(), ApplicationClassSet()
property ApplicationID as %String;
The ApplicationID from the associated application's metadata string corresponding to a single entry of the Application Metadata Stack (AMS).

For additional information, please see the Metadata Components section of the class documentation above.
Property methods: ApplicationIDDisplayToLogical(), ApplicationIDGet(), ApplicationIDIsValid(), ApplicationIDLogicalToDisplay(), ApplicationIDLogicalToOdbc(), ApplicationIDNormalize(), ApplicationIDSet()
property ApplicationROWID as %String;
The ApplicationROWID from the associated application's metadata string corresponding to a single entry of the Application Metadata Stack (AMS).

For additional information, please see the Metadata Components section of the class documentation above.
Property methods: ApplicationROWIDDisplayToLogical(), ApplicationROWIDGet(), ApplicationROWIDIsValid(), ApplicationROWIDLogicalToDisplay(), ApplicationROWIDLogicalToOdbc(), ApplicationROWIDNormalize(), ApplicationROWIDSet()
property Metadata as %List;
The Metadata property contains the metadata string corresponding to a single entry of the Application Metadata Stack (AMS).

This value can ultimately be pushed on the Application Metadata Stack (AMS) once it has been created either directly via the invocation of the CreateMetadata() method (typically for lightweight applications only needing to create a {MetadataString}), or indirectly after it has been created and stored in this property when this AMS Descriptor class gets instantiated via the invocation of the CreateDescriptor() method or the CreateDescriptorFromMetadata() method.

For additional information, please see the Metadata Components section of the class documentation above.
Property methods: MetadataGet(), MetadataIsValid(), MetadataLogicalToOdbc(), MetadataOdbcToLogical(), MetadataSet()
property MetadataInfoNameList as %List;
The MetadataInfoNameList from the associated application's metadata string corresponding to a single entry of the Application Metadata Stack (AMS).

For static definitions whose class extends this AMS Descriptor class, this property should be defined and populated with a default $LIST(...) of <name>s that will eventually correspond to the $LIST(...) of <value>s that will be stored in the MetadataInfoValueList property when this AMS Descriptor class gets instantiated via the invocation of the CreateDescriptor() method or the CreateDescriptorFromMetadata() method. Each <name> element of this property's $LIST(...) value should correspond positionally to a <value> element of the $LIST(...) stored in the MetadataInfoValueList property.

The following example shows how a static definition should be specified within a class that extends this AMS Descriptor class:
      // Sample.AMS.Person.CLS
         
      Class Sample.AMS.Person Extends %SYS.AppMetadataStack.Descriptor
      {
      Property MetadataInfoNameList As %List [ InitialExpression = {$LB("Name","DOB","HomeAddress","MobilePhone")} ];
      }
    
For dynamic data-driven definitions, a $LIST(...) of <name>s and a $LIST(...) of <value>s will be created and stored in this property and the MetadataInfoValueList property, respectively, when this AMS Descriptor class gets instantiated via the invocation of the CreateDescriptor() method or the CreateDescriptorFromMetadata() method.

The value of this property (for dynamic data-driven definitions) and the value of the MetadataInfoValueList property (for both static and dynamic definitions) will be created based on the $LIST(...) of <value>s or the $LIST(...) of <name>/<value> pairs passed to metadataInfoList parameters of the CreateDescriptor() method. The format of these two $LIST(...) values, passed to the metadataInfoList parameter, will be specified by the value passed to the metadataInfoFormat parameter of this same method.
Property methods: MetadataInfoNameListGet(), MetadataInfoNameListIsValid(), MetadataInfoNameListLogicalToOdbc(), MetadataInfoNameListOdbcToLogical(), MetadataInfoNameListSet()
property MetadataInfoValueList as %List;
The MetadataInfoValueList from the associated application's metadata string corresponding to a single entry of the Application Metadata Stack (AMS).

A $LIST(...) of <value>s will be created and stored in this property when this AMS Descriptor class gets instantiated via the invocation of the CreateDescriptor() method, and will be based upon the $LIST(...) of <value>s or the $LIST(...) of <name>/<value> pairs passed to the metadataInfoList parameter of this same method.

For additional information, please see the description specified for the MetadataInfoNameList property.
Property methods: MetadataInfoValueListGet(), MetadataInfoValueListIsValid(), MetadataInfoValueListLogicalToOdbc(), MetadataInfoValueListOdbcToLogical(), MetadataInfoValueListSet()
property RawMetadata as %String;

The RawMetadata property contains the raw metadata string which defines the Metadata for a single entry of the Application Metadata Stack (AMS).

This information is used for InterSystems Internal Use ONLY and should not be used by customers!

Property methods: RawMetadataDisplayToLogical(), RawMetadataGet(), RawMetadataIsValid(), RawMetadataLogicalToDisplay(), RawMetadataLogicalToOdbc(), RawMetadataNormalize(), RawMetadataSet()

Methods

method %OnNew(rawMetadata As %String, ByRef appAttrs As %RawString, ByRef metadataAttrs As %RawString) as %Status

This method should ONLY be invoked by the CreateDescriptor() method or the CreateDescriptorFromMetadata() method to instantiate and return an AMS Descriptor object for the associated application's metadata string corresponding to a single entry of the Application Metadata Stack (AMS).

classmethod CreateDescriptor(appClass As %String = "", appSpecificInfo As %String = "", metadataInfoFormat As %Integer = 1, metadataInfoList As %List = "", Output tSC As %Status, actions As %String = "", Output attributes As %RawString) as %SYS.AppMetadataStack.Descriptor

Create an AMS Descriptor object from the specified parameters, and return the status of this method's invocation in the return parameter tSC

NOTE:
This method, and to a lesser extent the CreateDescriptorFromMetadata() method, should be the only methods used to create an AMS Descriptor object!

Parameters:
appClass
One of the following values that will be used to determine the {ApplicationID} and the {AppSpecificInfo} components of the {AppMetadataStackID}:
  • The full class name (including the package name) - identifies a user-specific AMS applications
  • The class name (without the package name) - identifies an InterSystems AMS application defined with the following package name: %SYS.AppMetadataStack

NOTE:
All InterSystems AMS applications will be prefixed with a percent-sign (%), similar to how we use this prefix to delineate between InterSystems-defined and user-defined classes and routines. Therefore, the {ApplicationID} for all InterSystems AMS applications will start with a percent-sign (%), while user-specific AMS applications will not.

Example #1:
If there exists an InterSystems AMS application Stats, which has a corresponding class %SYS.AppMetadataStack.Stats, then the value passed to this parameter can be any one of the following; each of which will resolve to {ApplicationID}="%Stats":
  • "%SYS.AppMetadataStack.Stats"
  • "%Stats"

Example #2:
If there exists a user-specific AMS application USER.AppMetadataStack.Test, which is defined to extend the %SYS.AppMetadataStack.Descriptor class, then the value passed to this parameter must be the following, which will resolve to {ApplicationID}="Test":
  • "USER.AppMetadataStack.Test"
appSpecificInfo
A $LIST(...) of one or more values that is used in combination with the {ApplicationID}, which is obtained from the appClass parameter, that provides a unique identifier for the metadata string to be pushed onto the AMS.
metadataInfoFormat
A flag to determine the format of the metadataInfoList parameter:
1 = A $LIST(...) of metadata info <value>s only (primarily for static definitions)
2 = A $LIST(...) of metadata info <name>/<value> pairs in the following format: $LB(<name>,<value>) (primarily for dynamic data-driven definitions)
metadataInfoList
An optional $LIST(...) of information values that should be added to the AMS metadata string, which can be used by the application for further processing. This $LIST(...) must be defined in a format specified by the metadataInfoFormat parameter:
metadataInfoFormat=1: $LB(<info value 1>,...,<info value N>)
metadataInfoFormat=2: $LB($LB(<info name 1>,<info value 1>),...,$LB(<info name N>,<info value N>))
tSC
An Output parameter that returns the status of this method's invocation
1 = Successful Invocation
"0 <error details>" = Failed Invocation
actions (optional)
A comma-delimited string of additional actions to perform during method invocation: [DEFAULT: ""]
1 = Skip validating the appClass parameter against class existence
2 = Populate the Output parameter attributes
attributes (optional)
An Output parameter that returns an array of attributes associated with this AMS Descriptor class, which are created based on the values passed to the parameters of this method.
attributes("app",<component name>)=<component value>
attributes("metadata",<component name>)=<component value>

NOTE:
This parameter is only populated if the actions parameter contains the value "2"
Return Value:

An AMS Descriptor object

classmethod CreateDescriptorFromMetadata(metadata As %String = "", Output tSC As %Status, actions As %String = "", Output attributes As %RawString) as %SYS.AppMetadataStack.Descriptor

Create an AMS Descriptor object from the specified metadata parameter, and return the status of this method's invocation in the return parameter tSC

NOTE:
The CreateDescriptor() method, and to a lesser extent this method, should be the only methods used to create an AMS Descriptor object!

Parameters:
metadata
The Metadata string corresponding to a single entry of the Application Metadata Stack (AMS)
tSC
An Output parameter that returns the status of this method's invocation
1 = Successful Invocation
"0 <error details>" = Failed Invocation
actions (optional)
A comma-delimited string of additional actions to perform during method invocation: [DEFAULT: ""]
1 = Skip validating the appClass parameter against class existence
2 = Populate the Output parameter attributes
attributes (optional)
An Output parameter that returns an array of attributes associated with this AMS Descriptor class, which are created based on the values passed to the parameters of this method.
attributes("app",<component name>)=<component value>
attributes("metadata",<component name>)=<component value>

NOTE:
This parameter is only populated if the actions parameter contains the value "2"
Return Value:

An AMS Descriptor object

classmethod CreateMetadata(appClass As %String = "", appSpecificInfo As %String = "", metadataInfoFormat As %Integer = 1, metadataInfoList As %List = "", Output tSC As %Status, actions As %String = "", Output attributes As %RawString) as %List

This method creates the metadata string that can ultimately be pushed on the Application Metadata Stack (AMS).

The metadata string is comprised of both the {AppMetadataStackID} component and the {MetadataInfo} component (containing <value>s only), which define the structure of the {MetadataString} for a given application that uses this AMS Descriptor class.

A metadata string can be created either directly via the invocation of this method, or indirectly as it is created and stored in the Metadata property when this AMS Descriptor class gets instantiated via the invocation of the CreateDescriptor() method or the CreateDescriptorFromMetadata() method.

If an AMS Descriptor object has been created, the Metadata property will contain the value of {MetadataString} created by this method, which can ultimately be used as the metadata string {MetadataString} that is pushed on the Application Metadata Stack (AMS).

The first two parameters of this method, appClass and appSpecificInfo, are used in combination to generate the {AppMetadataStackID}, which provides a unique identifier for the {MetadataString} corresponding to a single entry of the Application Metadata Stack (AMS). The remaining parameters (defined below in the Parameters section), in combination with the first two parameters, will be used to generate the metadata string returned from the invocation of this method.

NOTE:
Since the structure of the metadata string may change in the future, this method allows the user to create the metadata string completely agnostic of its internal structure.

Parameters:
appClass
One of the following values that will be used to determine the {ApplicationID} and the {AppSpecificInfo} components of the {AppMetadataStackID}:
  • The full class name (including the package name) - identifies a user-specific AMS applications
  • The class name (without the package name) - identifies an InterSystems AMS application defined with the following package name: %SYS.AppMetadataStack

NOTE:
All InterSystems AMS applications will be prefixed with a percent-sign (%), similar to how we use this prefix to delineate between InterSystems-defined and user-defined classes and routines. Therefore, the {ApplicationID} for all InterSystems AMS applications will start with a percent-sign (%), while user-specific AMS applications will not.

Example #1:
If there exists an InterSystems AMS application Stats, which has a corresponding class %SYS.AppMetadataStack.Stats, then the value passed to this parameter can be any one of the following; each of which will resolve to {ApplicationID}="%Stats":
  • "%SYS.AppMetadataStack.Stats"
  • "%Stats"

Example #2:
If there exists a user-specific AMS application USER.AppMetadataStack.Test, which is defined to extend the %SYS.AppMetadataStack.Descriptor class, then the value passed to this parameter must be the following, which will resolve to {ApplicationID}="Test":
  • "USER.AppMetadataStack.Test"
appSpecificInfo
A $LIST(...) of one or more values that is used in combination with the {ApplicationID}, which is obtained from the appClass parameter, that provides a unique identifier for the metadata string to be pushed onto the AMS.
metadataInfoFormat
A flag to determine the format of the metadataInfoList parameter:
1 = A $LIST(...) of metadata info <value>s only (primarily for static definitions)
2 = A $LIST(...) of metadata info <name>/<value> pairs in the following format: $LB(<name>,<value>) (primarily for dynamic data-driven definitions)
metadataInfoList
An optional $LIST(...) of information values that should be added to the AMS metadata string, which can be used by the application for further processing. This $LIST(...) must be defined in a format specified by the metadataInfoFormat parameter:
metadataInfoFormat=1: $LB(<info value 1>,...,<info value N>)
metadataInfoFormat=2: $LB($LB(<info name 1>,<info value 1>),...,$LB(<info name N>,<info value N>))
tSC
An Output parameter that returns the status of this method's invocation
1 = Successful Invocation
"0 <error details>" = Failed Invocation
actions (optional)
A comma-delimited string of additional actions to perform during method invocation: [DEFAULT: ""]
1 = Skip validating the appClass parameter against class existence
2 = Populate the Output parameter attributes
3 = Always process and populate {Metadata} helper lists
attributes (optional)
An Output parameter that returns an array of attributes associated with this AMS Descriptor class, which are created based on the values passed to the parameters of this method.
attributes("app",<component name>)=<component value>
attributes("metadata",<component name>)=<component value>
attributes("method",<component name>)=<component value>

NOTE:
This parameter is only populated if the actions parameter contains the value "2"
Return Value:

A metadata string, if this method is invoked directly, or a metadata string that will be stored in the Metadata property when this AMS Descriptor class gets instantiated via the invocation of the CreateDescriptor() method or the CreateDescriptorFromMetadata() method.

The metadata string returned from the invocation of this method can be pushed onto the Application Metadata Stack (AMS)

classmethod CreateMetadataString(appClass As %String = "", appSpecificInfo As %String = "", metadataInfoFormat As %Integer = 1, metadataInfoList As %List = "", returnMInfoFormat As %Integer = 1, Output tSC As %Status, actions As %String = "", Output attributes As %RawString) as %List
--------------------------------------------------------------------------------
INTERSYSTEMS INTERNAL USE ONLY
--------------------------------------------------------------------------------

This [private] super-method is used by the CreateMetadata() method, and other internal methods, to create an appropriately formatted metadata string requested by the invoker of this method. Please refer to these method separately for additional details regarding the type of metadata string that is created and returned from this method invocation.

The first two parameters of this method, appClass and appSpecificInfo, are used in combination to generate the {AppMetadataStackID}, which provides a unique identifier for the metadata string corresponding to a single entry of the Application Metadata Stack (AMS). The remaining parameters (defined below in the Parameters section), in combination with the first two parameters, will be used to generate the full metadata string, as specified by its respective method.

NOTE:
Since the structure of the metadata string may change in the future, this method allows the user to create the metadata string completely agnostic of its internal structure.

Parameters:
appClass
One of the following values that will be used to determine the {ApplicationID} and the {AppSpecificInfo} components of the {AppMetadataStackID}:
  • The full class name (including the package name) - identifies a user-specific AMS applications
  • The class name (without the package name) - identifies an InterSystems AMS application defined with the following package name: %SYS.AppMetadataStack

NOTE:
All InterSystems AMS applications will be prefixed with a percent-sign (%), similar to how we use this prefix to delineate between InterSystems-defined and user-defined classes and routines. Therefore, the {ApplicationID} for all InterSystems AMS applications will start with a percent-sign (%), while user-specific AMS applications will not.

Example #1:
If there exists an InterSystems AMS application Stats, which has a corresponding class %SYS.AppMetadataStack.Stats, then the value passed to this parameter can be any one of the following; each of which will resolve to {ApplicationID}="%Stats":
  • "%SYS.AppMetadataStack.Stats"
  • "%Stats"

Example #2:
If there exists a user-specific AMS application USER.AppMetadataStack.Test, which is defined to extend the %SYS.AppMetadataStack.Descriptor class, then the value passed to this parameter must be the following, which will resolve to {ApplicationID}="Test":
  • "USER.AppMetadataStack.Test"
appSpecificInfo
A $LIST(...) of one or more values that is used in combination with the {ApplicationID}, which is obtained from the appClass parameter, that provides a unique identifier for the metadata string to be pushed onto the AMS.
metadataInfoFormat
A flag to determine the format of the metadataInfoList parameter:
1 = A $LIST(...) of metadata info <value>s only (primarily for static definitions)
2 = A $LIST(...) of metadata info <name>/<value> pairs in the following format: $LB(<name>,<value>) (primarily for dynamic data-driven definitions)
metadataInfoList
An optional $LIST(...) of information values that should be added to the AMS metadata string, which can be used by the application for further processing. This $LIST(...) must be defined in a format specified by the metadataInfoFormat parameter:
metadataInfoFormat=1: $LB(<info value 1>,...,<info value N>)
metadataInfoFormat=2: $LB($LB(<info name 1>,<info value 1>),...,$LB(<info name N>,<info value N>))
returnMInfoFormat
A flag to determine the format that will be returned for the {MetadataInfo} component of the {MetadataString}, based on the value of the metadataInfoList parameter:
1 = Metadata info <value>s only
2 = Metadata info as <name>/<value> pairs
tSC
An Output parameter that returns the status of this method's invocation
1 = Successful Invocation
"0 <error details>" = Failed Invocation
actions (optional)
A comma-delimited string of additional actions to perform during method invocation: [DEFAULT: ""]
1 = Skip validating the appClass parameter against class existence
2 = Populate the Output parameter attributes
3 = Always process and populate {Metadata} helper lists
attributes (optional)
An Output parameter that returns an array of attributes associated with this AMS Descriptor class, which are created based on the values passed to the parameters of this method.
attributes("app",<component name>)=<component value>
attributes("metadata",<component name>)=<component value>
attributes("method",<component name>)=<component value>

NOTE:
This parameter is only populated if the actions parameter contains the value "2"
Return Value:

An appropriately formatted metadata string based on the value specified for the returnMInfoFormat parameter.

classmethod GetApplicationID(metadata As %String = "", Output attributes As %RawString) as %String
Get and return the ApplicationID from the associated application's metadata parameter corresponding to a single entry of the Application Metadata Stack (AMS).
classmethod GetApplicationROWID(metadata As %String = "", Output attributes As %RawString) as %String
Get and return the ApplicationROWID from the associated application's metadata parameter corresponding to a single entry of the Application Metadata Stack (AMS).
method GetAttributes(Output attributes As %RawString, skipProperties As %Boolean = 0)
Get the attributes from the associated application's metadata string corresponding to a single entry of the Application Metadata Stack (AMS) (for the currently instantiated AMS Descriptor object), and return this information in the output array parameter attributes.

NOTE:
All attributes that are associated with a <name>/<value> pair from the MetadataInfoNameList/MetadataInfoValueList properties will be returned in the attributes(1,...) array with one (1) as the first subscript, as shown below (a $LIST(...) positional index will also be returned):
attributes(1,<name>)=<value>
attributes("x-pos",<pos>)=<name> // Index based on $LIST(...) <pos>ition!
If class properties should also be returned from the invocation of this method, by passing a zero (0) [default] to the skipProperties parameter, then all properties from the instantiated class, in addition to the AMS Descriptor class (if different), will be returned in the attributes(0,...) array with zero (0) as the first subscript, as shown below:
attributes(0,"%Descriptor",<property>)=<value>
attributes(0,<property>)=<value>
method GetDisplayName() as %String
Get and return the display name (the application's class name) from the associated application's metadata string corresponding to a single entry of the Application Metadata Stack (AMS)
method GetProperties(Output properties As %RawString)
Get the class properties defined for the currently instantiated AMS Descriptor object and return this information in the output array parameter properties(...).

The properties associated with the %SYS.AppMetadataStack.Descriptor class will be returned in the properties("%Descriptor",...) array with "%Descriptor" as the first subscript, as shown below:
properties("%Descriptor",<property>)=<value>
properties(<property>)=<value>
classmethod ShowAMS(pid As %Integer = "")

Show the properties and attributes of all Metadata strings that are currently pushed onto the Application Metadata Stack (AMS) for the specified process pid parameter.

Parameters:
pid
The Process ID (e.g. $JOB) for which to inspect the AMS
Return Value:

NONE

method ShowDescriptor()

Show the properties and attributes of the currently instantiated AMS Descriptor object.

classmethod ShowMetadata(metadata As %String = "", MetadataInfoNameList As %List = "", offset As %Integer = 0)

Show the properties and attributes of the Metadata string that is specified by the metadata parameter.

Parameters:
metadata
The Metadata string corresponding to a single entry of the Application Metadata Stack (AMS)
MetadataInfoNameList (optional)
A $LIST(...) of <name>s that correspond to the $LIST(...) of <value>s that are contained within the {MetadataInfo} component of the metadata parameter.
See the MetadataInfoNameList property for additional information.
offset (optional)
The offset position in which to show the Metadata information
Return Value:

NONE

classmethod processMetadataInfoNameValueList(MetadataInfoNameValueList As %List = "", MetadataInfoNameListStatic As %List = "") as %List
This is a helper method of the CreateMetadataString() method used to process all $LIST(...) elements of the MetadataInfoNameValueList parameter.

This method will be invoked recursively if a $LIST(...) element (<name>/<value> pair) is itself a $LIST(...)
classmethod processMetadataInfoValueList(prefix As %String = "", MetadataInfoValueList As %List = "", MetadataInfoNameListStatic As %List = "") as %List
This is a helper method of the CreateMetadataString() method used to process all $LIST(...) elements of the MetadataInfoValueList parameter.

This method will be invoked recursively if a $LIST(...) element (<value>) is itself a $LIST(...)

Inherited Members

Inherited Methods

FeedbackOpens in a new tab