%SYS.AppMetadataStack.Descriptor
hidden class %SYS.AppMetadataStack.Descriptor extends %Library.RegisteredObject
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).
- Each metadata string must specify an AppMetadataStackID to uniquely identify each metadata string entry of the Application Metadata Stack (AMS), as defined above
- The ApplicationID must begin with a percent sign "%" for all InterSystems applications (e.g. %SQL), while all user-defined applications must not be prefixed with a percent sign (e.g. Test), as defined above
-
The AMS metadata format is defined by InterSystems. Therefore, users should invoke
one of the following methods to create either the metadata string itself or the
AMS Descriptor object from which the metadata string can be obtained:
- CreateMetadata() (for lightweight applications)
set metadata=##class(%SYS.AppMetadataStack.Descriptor).CreateMetadata(...)
- CreateDescriptor() (for full feature applications)
set descriptor=##class(%SYS.AppMetadataStack.Descriptor).CreateDescriptor(...)
- CreateMetadata() (for lightweight applications)
- When defining a new InterSystems ApplicationID, a corresponding AMS Descriptor class should also be created under the %SYS.AppMetadataStack package.
- When defining a new user-specific ApplicationID, the class definition must extend the following AMS Descriptor class: %SYS.AppMetadataStack.Descriptor
-
The class name (without the package name) must match the ApplicationID without
the leading "%" (if one exists).
For example, the ApplicationID "%SQL" corresponds to class: %SYS.AppMetadataStack.SQL. - All such classes must extend the following class: %SYS.AppMetadataStack.Descriptor
-
To create an AMS Descriptor object, which provides all of the appropriate
information needed for use of the Application Metadata Stack (AMS), users
should invoke one of the following methods:
- CreateDescriptor()
set descriptor=##class(%SYS.AppMetadataStack.Descriptor).CreateDescriptor(...)
- CreateDescriptorFromMetadata()
set descriptor=##class(%SYS.AppMetadataStack.Descriptor).CreateDescriptorFromMetadata(...)
- CreateDescriptor()
// 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
- ApplicationClass
- ApplicationID
- ApplicationROWID
- Metadata
- MetadataInfoNameList
- MetadataInfoValueList
- RawMetadata
Method Inventory
- %OnNew()
- CreateDescriptor()
- CreateDescriptorFromMetadata()
- CreateMetadata()
- CreateMetadataString()
- GetApplicationID()
- GetApplicationROWID()
- GetAttributes()
- GetDisplayName()
- GetProperties()
- ShowAMS()
- ShowDescriptor()
- ShowMetadata()
- processMetadataInfoNameValueList()
- processMetadataInfoValueList()
Parameters
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
For additional information, please see the Metadata Components section of the class documentation above.
For additional information, please see the Metadata Components section of the class documentation above.
For additional information, please see the Metadata Components section of the class documentation above.
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.
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")} ];
}
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.
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.
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!
Methods
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).
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!
- 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:
- "%SYS.AppMetadataStack.Stats"
- "%Stats"
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":
-
Example #2:
- "USER.AppMetadataStack.Test"
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": - The full class name (including the package name) - identifies a user-specific
AMS applications
- 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)
- 1 = A $LIST(...) of metadata info <value>s only (primarily for static 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>))
- metadataInfoFormat=1: $LB(<info value 1>,...,<info value N>)
- tSC
- An Output parameter that returns the status of this method's invocation
- 1 = Successful Invocation
- "0 <error details>" = Failed Invocation
- 1 = Successful 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
- 1 = Skip validating the appClass parameter against class existence
- 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"
- attributes("app",<component name>)=<component value>
An AMS Descriptor object
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!
- 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
- 1 = Successful 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
- 1 = Skip validating the appClass parameter against class existence
- 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"
- attributes("app",<component name>)=<component value>
An AMS Descriptor object
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.
- 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:
- "%SYS.AppMetadataStack.Stats"
- "%Stats"
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":
-
Example #2:
- "USER.AppMetadataStack.Test"
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": - The full class name (including the package name) - identifies a user-specific
AMS applications
- 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)
- 1 = A $LIST(...) of metadata info <value>s only (primarily for static 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>))
- metadataInfoFormat=1: $LB(<info value 1>,...,<info value N>)
- tSC
- An Output parameter that returns the status of this method's invocation
- 1 = Successful Invocation
- "0 <error details>" = Failed Invocation
- 1 = Successful 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
- 2 = Populate the Output parameter attributes
- 1 = Skip validating the appClass parameter against class existence
- 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>
- attributes("metadata",<component name>)=<component value>
-
NOTE:
- This parameter is only populated if the actions parameter contains the value "2"
- attributes("app",<component name>)=<component 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)
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.
- 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:
- "%SYS.AppMetadataStack.Stats"
- "%Stats"
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":
-
Example #2:
- "USER.AppMetadataStack.Test"
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": - The full class name (including the package name) - identifies a user-specific
AMS applications
- 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)
- 1 = A $LIST(...) of metadata info <value>s only (primarily for static 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>))
- metadataInfoFormat=1: $LB(<info value 1>,...,<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
- 1 = Metadata info <value>s only
- tSC
- An Output parameter that returns the status of this method's invocation
- 1 = Successful Invocation
- "0 <error details>" = Failed Invocation
- 1 = Successful 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
- 2 = Populate the Output parameter attributes
- 1 = Skip validating the appClass parameter against class existence
- 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>
- attributes("metadata",<component name>)=<component value>
-
NOTE:
- This parameter is only populated if the actions parameter contains the value "2"
- attributes("app",<component name>)=<component value>
An appropriately formatted metadata string based on the value specified for the returnMInfoFormat parameter.
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!
- attributes(0,"%Descriptor",<property>)=<value>
- attributes(0,<property>)=<value>
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>
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
NONE
Show the properties and attributes of the currently instantiated AMS Descriptor object.
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
NONE
This method will be invoked recursively if a $LIST(...) element (<name>/<value> pair) is itself a $LIST(...)
This method will be invoked recursively if a $LIST(...) element (<value>) is itself a $LIST(...)
Inherited Members
Inherited Methods
- %AddToSaveSet()
- %ClassIsLatestVersion()
- %ClassName()
- %ConstructClone()
- %DispatchClassMethod()
- %DispatchGetModified()
- %DispatchGetProperty()
- %DispatchMethod()
- %DispatchSetModified()
- %DispatchSetMultidimProperty()
- %DispatchSetProperty()
- %Extends()
- %GetParameter()
- %IsA()
- %IsModified()
- %New()
- %NormalizeObject()
- %ObjectModified()
- %OriginalNamespace()
- %PackageName()
- %RemoveFromSaveSet()
- %SerializeObject()
- %SetModified()
- %ValidateObject()