%Net.MIMEPart
class %Net.MIMEPart extends %Library.RegisteredObject
%Net.MIMEPart holds a MIME message partProperty Inventory
- Body
- Boundary
- ContentCharset
- ContentId
- ContentLocation
- ContentTransferEncoding
- ContentType
- PartOwnedStream
- Parts
Method Inventory
- %OnNew()
- BodySet()
- BoundaryGet()
- ClearHeaders()
- ContentCharsetGet()
- ContentCharsetSet()
- ContentIdSet()
- ContentLocationSet()
- ContentTransferEncodingGet()
- ContentTransferEncodingSet()
- ContentTypeGet()
- ContentTypeSet()
- GetContentTypeAttribute()
- GetHeader()
- NextHeader()
- NormalizeContentId()
- NormalizeContentLocation()
- RemoveHeader()
- SetHeader()
Properties
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()
property Boundary as %String);
Boundary to used to separate parts of the message.
If none is specified, a default is created.
Property methods: BoundaryDisplayToLogical(), 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(), ContentCharsetIsValid(), ContentCharsetLogicalToDisplay(), ContentCharsetLogicalToOdbc(), ContentCharsetNormalize()
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()
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()
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(), ContentTransferEncodingIsValid(), ContentTransferEncodingLogicalToDisplay(), ContentTransferEncodingLogicalToOdbc(), ContentTransferEncodingNormalize()
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: ContentTypeDisplayToLogical(), ContentTypeIsValid(), ContentTypeLogicalToDisplay(), ContentTypeLogicalToOdbc(), ContentTypeNormalize()
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
method %OnNew(body As %CSP.BinaryStream = "") as %Status
Optionally initialize the body (and possibly the headers) during construction.
method BodySet(body As %CSP.BinaryStream = "") as %Status
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
method ClearHeaders() as %Status
Clear the list of headers
method ContentCharsetGet() as %String
method ContentTransferEncodingGet() as %String
method ContentTypeGet() as %String
method GetContentTypeAttribute(name As %String)
Return an attribute of a previously stored Content-Type.
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
Strip whitespace and comments from the Content-Location header.
Input must already be stripped of lleading and trailing whitespace
method RemoveHeader(name As %String)
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
- %AddToSaveSet()
- %ClassIsLatestVersion()
- %ClassName()
- %ConstructClone()
- %DispatchClassMethod()
- %DispatchGetModified()
- %DispatchGetProperty()
- %DispatchMethod()
- %DispatchSetModified()
- %DispatchSetMultidimProperty()
- %DispatchSetProperty()
- %Extends()
- %GetParameter()
- %IsA()
- %IsModified()
- %New()
- %NormalizeObject()
- %ObjectModified()
- %OriginalNamespace()
- %PackageName()
- %RemoveFromSaveSet()
- %SerializeObject()
- %SetModified()
- %ValidateObject()