Interface ModifiableIssueNotes
- All Superinterfaces:
IssueNotes
- Since:
- 10.0.146
-
Method Summary
Modifier and TypeMethodDescriptionThe method creates and adds a note to anIssue
If the text is invalid or too long to be stored persistently, aValidationException
will be thrown by the method.addNote
(String html, User user, Set<NoteAttachmentDataSource> attachments) The method creates and adds a note with valid html content to anIssue
.Methods inherited from interface com.novomind.ecom.api.iagent.model.IssueNotes
getNotes, getNotes, getNotesCount
-
Method Details
-
addNote
The method creates and adds a note to anIssue
If the text is invalid or too long to be stored persistently, aValidationException
will be thrown by the method.- Parameters:
text
- the text of the note as plain text stringuser
- 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
IssueNote addNote(String html, User user, Set<NoteAttachmentDataSource> attachments) throws PersistencyException, ValidationException The method creates and adds a note with valid html content to anIssue
. 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 ofNoteAttachmentDataSource
. 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.or
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 aValidationException
is thrown by the method. Please note that all content-ID's passed within the html and the Set ofNoteAttachmentDataSource
) 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 stringuser
- the author of the noteattachments
- a Set ofNoteAttachmentDataSource
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
-