Ens.Util.MessageBodyMethods
abstract class Ens.Util.MessageBodyMethods
Method Inventory
- %CompareContents()
- %DrawHTMLForm()
- %DrawHTMLTable()
- %GetContentType()
- %OnTimeout()
- %ProcessSubmit()
- %ShowContents()
- %ShowContentsHead()
- GenerateGenericDAOFromObject()
- GetStatsDimension()
- OnShowJSONContents()
- OnShowXMLContents()
- OutputFormattedJSON()
- WriteNoJSONFormat()
Parameters
parameter DOMAIN;
To prevent possible errors for AutoFormGeneration of
custom classes the DOMAIN needs to be not specified.
parameter JSONINDENT = 2;
Default indentation for JSON formatter
parameter UNSUPPORTEDFORMATS;
Used to prevent trying conversion to one or
more formats.
System code checks for "JSON".
System code checks for "JSON".
Methods
classmethod %CompareContents(pMsg1 As Ens.MessageBody, pMsg2 As Ens.MessageBody)
classmethod %DrawHTMLForm(pObj As %RegisteredObject, ByRef pID As %String, pActionURL As %String = "", ByRef pButtons As %CSP.Util.FormButton, pTarget As %String = "") as %Status
This method is called by the Management Portal to
display a message-specific content editor.
classmethod %DrawHTMLTable(pObj As %RegisteredObject, ByRef pID As %String) as %Status
This method is called by the Management Portal to
display a message-specific content viewer.
method %GetContentType() as %String
This method is called by the Management Portal to determine
the content type that will be returned by the %ShowContents()
method.
The return value is a string containing an HTTP content type.
method %OnTimeout() as %Status
This method is called when this message has timed out
The time out moment happens when the timer response arrives,
and the request is being removed from pending request list.
The timeout moment is not when the response arrives and is being marked as "discarded"
classmethod %ProcessSubmit(pRequest As %CSP.Request, ByRef pID As %String = "", Output pErrorMsg As %String) as %RegisteredObject
This method is called by the Management Portal to
display a message-specific content editor.
method %ShowContents(pZenOutput As %Boolean = 0)
This method is called by the Management Portal to
display a message-specific content viewer for messages that
extend %XML.Adaptor or %JSON.Adaptor or where JSON
has been requested explicitly.
This method displays its content by writing out to the current device.
For XML content , non XML characters are suppressed and there is an optional size limit of output.
The content should match the type returned by the %GetContentType() method or in the case of JSON explicitly to %response.ContentType.
This method is called from EnsPortal.MessageContents when:
class extends both %XML.Adaptor and Ens.Util.MessageBodyMethods
class neither extends %XML.Adaptor nor %Stream.Object
class extends %JSON.Adaptor and Ens.Util.MessageBodyMethods and
UNSUPPORTEDFORMATS does not include JSON
In all cases the parameter, pZenOutput is passed in as 1.
This method can be overridden.
This method calls OnShowJSONContents() and OnShowXMLContents() which can also be overridden.
This method displays its content by writing out to the current device.
For XML content , non XML characters are suppressed and there is an optional size limit of output.
The content should match the type returned by the %GetContentType() method or in the case of JSON explicitly to %response.ContentType.
This method is called from EnsPortal.MessageContents when:
This method can be overridden.
This method calls OnShowJSONContents() and OnShowXMLContents() which can also be overridden.
method %ShowContentsHead(pZenOutput As %Boolean = 0)
This method is called by the Management Portal to
display a portion of the HEAD section of a
message-specific content viewer.
classmethod GenerateGenericDAOFromObject(pObject As %RegisteredObject) as %Library.DynamicAbstractObject
Wrapper method for Generic dynamic object generator API used to
serialize as JSON
method GetStatsDimension() as %String
This method is used to provide the Statistics Site Dimension if not already set
Override and implement as needed.
method OnShowJSONContents(pZenOutput As %Boolean = 0)
Override to customize JSON output.
This does not truncate data by size.
This does not truncate data by size.
method OnShowXMLContents(pZenOutput As %Boolean = 0)
Override to customize XML output
classmethod OutputFormattedJSON(pJSONStreamOrAET)
Helper method to use the JSON formatter
classmethod WriteNoJSONFormat(pObject As %RegisteredObject, pStatusToReport As %Status = $$$OK)
This method is used by OnShowJSONContents() to output that JSON format not avalaible
and to report any error if attempted JSON serialization.
Subclasses
- Ens.MessageBody
- Ens.StreamContainer
- Ens.Util.RequestBodyMethods
- Ens.Util.ResponseBodyMethods
- EnsLib.EDI.EDIFACT.MsgBodyMethods
- EnsLib.EDI.X12.MsgBodyMethods
- EnsLib.EDI.XML.MsgBodyMethods
- EnsLib.PrivateSession.Message.Ack
- EnsLib.PrivateSession.Message.Poll
- EnsLib.PrivateSession.Message.Start
- EnsLib.PrivateSession.Message.Stop
- EnsLib.ebXML.Message