Interface ModifiableIssueNotes

All Superinterfaces:
IssueNotes

public interface ModifiableIssueNotes extends IssueNotes
Represents a Collection of IssueNote associated with an Issue Allows to add new notes to the issue.
Since:
10.0.146
  • Method Details

    • addNote

      The method creates and adds a note to an Issue If the text is invalid or too long to be stored persistently, a ValidationException will be thrown by the method.
      Parameters:
      text - the text of the note as plain text string
      user - the author of the note
      Returns:
      the IssueNote that has been successfully added to the issue.
      Throws:
      PersistencyException - if the note could not be added to the issue.
      ValidationException - if the text is invalid or to large to be added as note.
      Since:
      10.0.146
    • addNote

      The method creates and adds a note with valid html content to an Issue. Any invalid or unsupported html elements will be sanitized. Allowed html elements are: "a", "b", "blockquote", "br", "div", "em", "h1", "h2", "h3", "h4", "h5", "h6", "i", "img", "li", "ol", "p", "pre", "small", "span", "strike", "strong", "table", "tbody", "td", "tfoot", "th", "thead", "tr", "u", "ul" Each element permits specific attributes and protocols, e.g. the element "img" permits the attribute "src" with the protocols "http:","https:" or "cid:". The method also allows to store and associate attachments with the created note passed as Set of NoteAttachmentDataSource. The html may contain inline image references. The image tags must define a content-ID within the "src" attribute starting with "cid:" to identify the image data source. e.g. demo or demo The passed Set of NoteAttachmentDataSource must contain an entry with matching content-ID (s. RelatedAttachmentDataSource.getContentId()) and isInline() == true (s. RelatedAttachmentDataSource.isInline()) to retrieve the name, the content type and the binary data of the referenced images. Allowed content types for referenced images are "image/jpeg", "image/gif", "image/png", "image/bmp". If the html is invalid or too long to be stored persistently or any referenced image has an invalid content type or could not be retrieved from the Set then a ValidationException is thrown by the method. Please note that all content-ID's passed within the html and the Set of NoteAttachmentDataSource) may be changed after the note and the associated attachments have been stored in the database.
      Parameters:
      html - the html content of the note as string
      user - the author of the note
      attachments - a Set of NoteAttachmentDataSource to be attached to the note.
      Returns:
      the IssueNote that has been successfully added to the issue.
      Throws:
      PersistencyException - if the note could not be added to the issue.
      ValidationException - if the html is invalid html or too large to be added as note.
      Since:
      13.3