%Net.MIMEPart
class %Net.MIMEPart extends %Library.RegisteredObject
%Net.MIMEPart holds a MIME message partProperty Inventory (Including Private)
- Body
- Boundary
- ContentCharset
- ContentId
- ContentLocation
- ContentTransferEncoding
- ContentType
- PartOwnedStream
- Parts
Method Inventory (Including Private)
- %OnClose()
- %OnNew()
- BodySet()
- BoundaryGet()
- ClearHeaders()
- ContentCharsetGet()
- ContentCharsetSet()
- ContentIdSet()
- ContentLocationSet()
- ContentTransferEncodingGet()
- ContentTransferEncodingSet()
- ContentTypeGet()
- ContentTypeSet()
- GetContentTypeAttribute()
- GetHeader()
- NextHeader()
- NormalizeContentId()
- NormalizeContentLocation()
- RemoveHeader()
- SetHeader()
Properties (Including Private)
property Body as %RegisteredObject;
The body of the attachment as a stream.
Either Parts must contain MIMEParts or Body must be specified, but not both.
Property methods: BodyGet(), BodyGetSwizzled(), BodyIsValid(), BodyNewObject(), BodySet()
property Boundary as %String);
Boundary to used to separate parts of the message.
If none is specified, a default is created.
Property methods: BoundaryDisplayToLogical(), BoundaryGet(), BoundaryIsValid(), BoundaryLogicalToDisplay(), BoundaryLogicalToOdbc(), BoundaryNormalize(), BoundarySet()
property ContentCharset as %String) [ Calculated ];
If the ContentType starts with 'text/' then this is the
charset to encode the contents with. This is actually specified in the MIME
Content-Type header with something like:
Content-Type: text/html; charset=UTF-8
You must set this property after you set the ContentType or it will overwrite this value.
Property methods: ContentCharsetDisplayToLogical(), ContentCharsetGet(), ContentCharsetIsValid(), ContentCharsetLogicalToDisplay(), ContentCharsetLogicalToOdbc(), ContentCharsetNormalize(), ContentCharsetSet()
property ContentId as %String);
The normalized content-id.
Any leading or trailing whitespace and enclosing <> are removed.
Property methods: ContentIdDisplayToLogical(), ContentIdGet(), ContentIdIsValid(), ContentIdLogicalToDisplay(), ContentIdLogicalToOdbc(), ContentIdNormalize(), ContentIdSet()
property ContentLocation as %String);
The normalized content-location.
Any leading or trailing whitespace and comments are removed.
Property methods: ContentLocationDisplayToLogical(), ContentLocationGet(), ContentLocationIsValid(), ContentLocationLogicalToDisplay(), ContentLocationLogicalToOdbc(), ContentLocationNormalize(), ContentLocationSet()
property ContentTransferEncoding as %String (VALUELIST = ",base64,quoted-printable,7bit,8bit,binary");
Content-Transfer-Encoding header. Can be one of "base64", "quoted-printable", "7bit", "8bit", "binary".
Property methods: ContentTransferEncodingDisplayToLogical(), ContentTransferEncodingGet(), ContentTransferEncodingIsValid(), ContentTransferEncodingLogicalToDisplay(), ContentTransferEncodingLogicalToOdbc(), ContentTransferEncodingNormalize(), ContentTransferEncodingSet()
property ContentType as %String) [ Calculated ];
Sets/gets the 'Content-Type:' MIME header. A Content-Type specifies the media type
of the Body data. A Content-Transfer-Encoding header may be used
to indicate any additional content coding applied to the type.
Property methods: ContentTypeAttributesDisplayToLogical(), ContentTypeAttributesGet(), ContentTypeAttributesIsValid(), ContentTypeAttributesLogicalToDisplay(), ContentTypeAttributesLogicalToOdbc(), ContentTypeAttributesNormalize(), ContentTypeAttributesSet(), ContentTypeDisplayToLogical(), ContentTypeGet(), ContentTypeIsValid(), ContentTypeLogicalToDisplay(), ContentTypeLogicalToOdbc(), ContentTypeNormalize(), ContentTypeSet()
property PartOwnedStream as %Boolean;
If PartOwnedStream is true, then the part owns the stream and should cleasr it when
the part is deleted.
Property methods: PartOwnedStreamDisplayToLogical(), PartOwnedStreamGet(), PartOwnedStreamIsValid(), PartOwnedStreamLogicalToDisplay(), PartOwnedStreamNormalize(), PartOwnedStreamSet()
property Parts as list of %Net.MIMEPart;
Parts of a multipart message.
Either Parts must contain MIMEParts or Body must be specified, but not both.
Property methods: PartsBuildValueArray(), PartsCollectionToDisplay(), PartsCollectionToOdbc(), PartsDisplayToCollection(), PartsGet(), PartsGetObject(), PartsGetObjectId(), PartsGetSwizzled(), PartsIsValid(), PartsOdbcToCollection(), PartsSet(), PartsSetObject(), PartsSetObjectId()
Methods (Including Private)
private method %OnClose() as %Status [ Language = objectscript ]
Make sure stream is Clear'ed when this part is closed
method %OnNew(body As %CSP.BinaryStream = "") as %Status [ Language = objectscript ]
Optionally initialize the body (and possibly the headers) during construction.
method BodySet(body As %CSP.BinaryStream = "") as %Status [ Language = objectscript ]
Set the body of the attachment to a stream.
If the stream contains a Headers attribute, this attribute is used to
initialize the headers of the MIME part.
The %CSP.BinaryStream that is returned by the CSP engine is an example of such
a stream with Headers attribute.
method BoundaryGet() as %String [ Language = objectscript ]
method ClearHeaders() as %Status [ Language = objectscript ]
Clear the list of headers
method ContentCharsetGet() as %String [ Language = objectscript ]
method ContentTransferEncodingGet() as %String [ Language = objectscript ]
method ContentTypeGet() as %String [ Language = objectscript ]
method GetContentTypeAttribute(name As %String) [ Language = objectscript ]
Return an attribute of a previously stored Content-Type.
method GetHeader(name As %String, Output originalName As %String) as %String [ Language = objectscript ]
Lookup a previously set header. The lookup is not case sensitive.
However, the original name is returned.
Get the next header based on the upper case key used to store the headers.
Strip enclosing <> from Content-Id header.
Input must already be stripped of lleading and trailing whitespace
classmethod NormalizeContentLocation(contentLocation As %String) as %String [ Language = objectscript ]
Strip whitespace and comments from the Content-Location header.
Input must already be stripped of lleading and trailing whitespace
method RemoveHeader(name As %String) [ Language = objectscript ]
Remove a header to the MIME part.
Add a header to the MIME part. The basic Content headers that you may want are covered by
properties of this class: Content-Type, Content-Transfer-Encoding, Content-Id and Content-Location.
Inherited Members
Inherited Methods (Including Private)
- %AddToSaveSet()
- %ClassIsLatestVersion()
- %ClassName()
- %ConstructClone()
- %ConstructCloneInit()
- %DispatchClassMethod()
- %DispatchGetModified()
- %DispatchGetProperty()
- %DispatchMethod()
- %DispatchSetModified()
- %DispatchSetMultidimProperty()
- %DispatchSetProperty()
- %Extends()
- %GetParameter()
- %IsA()
- %IsModified()
- %New()
- %NormalizeObject()
- %ObjectModified()
- %OnAddToSaveSet()
- %OnConstructClone()
- %OnValidateObject()
- %OriginalNamespace()
- %PackageName()
- %RemoveFromSaveSet()
- %SerializeObject()
- %SetModified()
- %ValidateObject()