public interface Attachment
An attachment does not contain on its own a content (i.e. the bytes). It is a descriptor of the content, with a combination of logical path and
MIME type. The actual bytes shall be obtained with an AttachmentResolver
.
An Object Text read from DOORS might contain OLE objects. Those OLE Object can be obtained as Attachment
instances using the
RichTextUtils.getAttachments()
methods. An AttachmentResolver
can then be obtained to access the actual content using the
RichTextUtils.createAttachmentResolver(Model)
method. Note that user defined attributes of type Text
might also contain
OLE objects.
A preview image of the attachment might be available using the RichTextUtils.getAttachmentPreview()
method.
Attachment properties
Since 3.8.1, an Attachment
object also be an instance of com.sodius.mdw.core.util.PropertySet
. If the Attachment instance
was parsed from an XHTML <object/>
element, the PropertySet
contains a property corresponding to each nested
<param/>
element. Typically the following XHTML construct:
<object data="path"><param name="inline" value="true"/></object>
results in Attachment instance on which the following call returns true:
boolean isInline = myAttachment.getProperty("inline", false);
Clients may implement this interface.
Modifier and Type | Method and Description |
---|---|
String |
getMimeType()
Returns the MIME type of the content (e.g.
|
String |
getPath()
A logical path to get access to the content.
|
String getPath()
AttachmentResolver
AttachmentResolver
String getMimeType()
image/jpeg
).RichTextUtils.getMimeType(String, String)