Interface Attachment
-
public interface Attachment
Describes a logical 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 theRichTextUtils.getAttachments()
methods. AnAttachmentResolver
can then be obtained to access the actual content using theRichTextUtils.createAttachmentResolver(Model)
method. Note that user defined attributes of typeText
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, anAttachment
object also be an instance ofcom.sodius.mdw.core.util.PropertySet
. If the Attachment instance was parsed from an XHTML<object/>
element, thePropertySet
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.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getMimeType()
Returns the MIME type of the content (e.g.String
getPath()
A logical path to get access to the content.
-
-
-
Method Detail
-
getPath
String getPath()
A logical path to get access to the content. Content shall be retrieved using an instance ofAttachmentResolver
- Returns:
- the logical path.
- See Also:
AttachmentResolver
-
getMimeType
String getMimeType()
Returns the MIME type of the content (e.g.image/jpeg
).- Returns:
- the MIME type of the content.
- See Also:
RichTextUtils.getMimeType(String, String)
-
-