Class AttachmentSummaryUtils


  • public class AttachmentSummaryUtils
    extends Object
    Provides methods to create attachment summary XML data.

    Example Content

    The Attachment Summary XML structure is illustrated below:
     <AttachmentSummary>
       <Attachment>
           <attachmentKey/>
           <attachmentName/>
           <contentType/>
           <documentCode/>
           <fileName/>
           <fileSize/>
           <fileSizeFormatted/>
           <fileUploadType/>
           <required/>
           <submittedManually/>
           <userDescription/>
           <viewUrl/>
           <virusStatus/>
       </Attachment>
     </AttachmentSummary>
     
    Since:
    4.1.0
    • Field Detail

      • ATTACHMENT_SUMMARY_ELEMENT

        public static final String ATTACHMENT_SUMMARY_ELEMENT
        The attachment element name used by AttachmentSummaryUtils#populateAttachmentSummary(Document, String, Submission)
        See Also:
        Constant Field Values
      • ATTACHMENT_ELEMENT

        public static final String ATTACHMENT_ELEMENT
        The attachment element name used by AttachmentSummaryUtils#populateAttachmentSummary(Document, String, Submission)
        See Also:
        Constant Field Values
      • ATTACHMENT_KEY_ELEMENT

        public static final String ATTACHMENT_KEY_ELEMENT
        The attachment key element used by AttachmentSummaryUtils#populateAttachmentSummary(Document, String, Submission)
        See Also:
        Constant Field Values
      • ATTACHMENT_NAME_ELEMENT

        public static final String ATTACHMENT_NAME_ELEMENT
        The attachment name element used by AttachmentSummaryUtils#populateAttachmentSummary(Document, String, Submission)
        See Also:
        Constant Field Values
      • CONTENT_TYPE_ELEMENT

        public static final String CONTENT_TYPE_ELEMENT
        The content type element used by AttachmentSummaryUtils#populateAttachmentSummary(Document, String, Submission)
        See Also:
        Constant Field Values
      • DOCUMENT_CODE_ELEMENT

        public static final String DOCUMENT_CODE_ELEMENT
        The document name element used by AttachmentSummaryUtils#populateAttachmentSummary(Document, String, Submission)
        See Also:
        Constant Field Values
      • FILE_NAME_ELEMENT

        public static final String FILE_NAME_ELEMENT
        The file name element used by AttachmentSummaryUtils#populateAttachmentSummary(Document, String, Submission)
        See Also:
        Constant Field Values
      • FILE_SIZE_ELEMENT

        public static final String FILE_SIZE_ELEMENT
        The file size element used by AttachmentSummaryUtils#populateAttachmentSummary(Document, String, Submission)
        See Also:
        Constant Field Values
      • FILE_SIZE_FORMATTED_ELEMENT

        public static final String FILE_SIZE_FORMATTED_ELEMENT
        The formatted file size element used by AttachmentSummaryUtils#populateAttachmentSummary(Document, String, Submission)
        See Also:
        Constant Field Values
      • FILE_UPLOAD_TYPE_ELEMENT

        public static final String FILE_UPLOAD_TYPE_ELEMENT
        The file upload type element used by AttachmentSummaryUtils#populateAttachmentSummary(Document, String, Submission)
        See Also:
        Constant Field Values
      • REQUIRED_ELEMENT

        public static final String REQUIRED_ELEMENT
        The required flag element used by AttachmentSummaryUtils#populateAttachmentSummary(Document, String, Submission)
        See Also:
        Constant Field Values
      • SUBMITTED_MANUALLY_ELEMENT

        public static final String SUBMITTED_MANUALLY_ELEMENT
        The submitted manually flag element used by AttachmentSummaryUtils#populateAttachmentSummary(Document, String, Submission)
        See Also:
        Constant Field Values
      • USER_DESCRIPTION_ELEMENT

        public static final String USER_DESCRIPTION_ELEMENT
        The user description element used by AttachmentSummaryUtils#populateAttachmentSummary(Document, String, Submission)
        See Also:
        Constant Field Values
      • VIEW_URL_ELEMENT

        public static final String VIEW_URL_ELEMENT
        The view URL element used by AttachmentSummaryUtils#populateAttachmentSummary(Document, String, Submission)
        See Also:
        Constant Field Values
      • VIRUS_STATUS_ELEMENT

        public static final String VIRUS_STATUS_ELEMENT
        The virus status element used by AttachmentSummaryUtils#populateAttachmentSummary(Document, String, Submission)
        See Also:
        Constant Field Values
    • Constructor Detail

      • AttachmentSummaryUtils

        public AttachmentSummaryUtils()
    • Method Detail

      • populateAttachmentSummary

        public static void populateAttachmentSummary​(Submission submission,
                                                     Document document,
                                                     String xPath,
                                                     Set<String> attachmentNamesToInclude)
        Populates information about a submission's attachments into an XML document.
        Parameters:
        submission - the submission (required)
        document - the XML document where attachment information shall be written (required)
        xPath - the XPath that will serve as the parent element for the attachment elements (must point to a valid element in the document)
        attachmentNamesToInclude - the set of attachment names to include (optional; if not specified, all attachments will be included)