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 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.

    Since:
    3.2.0
    See Also:
    AttachmentResolver, RichTextUtils.createAttachmentResolver(com.sodius.mdw.core.model.Model), RichTextUtils.getAttachments(com.sodius.mdw.core.model.RichText), RichTextUtils.getMimeType(String, String), RichTextUtils.getAttachmentPreview(Attachment)
    • Method Detail

      • getPath

        String getPath()
        A logical path to get access to the content. Content shall be retrieved using an instance of AttachmentResolver
        Returns:
        the logical path.
        See Also:
        AttachmentResolver