public final class NoteResourceHelper extends Object
NoteResourceHandler| Modifier and Type | Method and Description |
|---|---|
static void |
buildNoteResourceAttachments(NoteData note,
NoteResource newNoteResource)
Build the attachment part of the note
|
static void |
buildNoteResourceNotifications(NoteData note,
NoteResource newNoteResource)
Build the notification part of the note
|
static NoteStoringTO |
buildNoteStoringTO(CreateNoteParameter createNoteParameter)
Get note storing transferobject
|
static NoteStoringTO |
buildNoteStoringTO(EditNoteParameter editNoteParameter)
Get note storing transferobject
|
static TagResource[] |
buildTags(Collection<TagData> tagListItems)
Build TagResources form Collection of
TagData |
static NoteRenderContext |
createNoteRenderContext(Boolean filterHtml,
boolean beautifyPlainText,
javax.ws.rs.core.Request request)
Creates a suitable note render context.
|
static void |
setToForParameterUnspecificElements(Boolean isHtml,
NoteStoringTO noteStoringTO)
Set elements of
NoteStoringTO object that are the same in create or edit method |
public static void buildNoteResourceAttachments(NoteData note, NoteResource newNoteResource)
note - note of NoteDatanewNoteResource - NoteResourcepublic static void buildNoteResourceNotifications(NoteData note, NoteResource newNoteResource)
note - note of NoteDatanewNoteResource - NoteResourcepublic static NoteStoringTO buildNoteStoringTO(CreateNoteParameter createNoteParameter) throws IllegalRequestParameterException
createNoteParameter - parameters to create an noteNoteStoringTOIllegalRequestParameterException - text value is wrongpublic static NoteStoringTO buildNoteStoringTO(EditNoteParameter editNoteParameter) throws IllegalRequestParameterException
editNoteParameter - parameters to edit an noteNoteStoringTOIllegalRequestParameterException - text value is wrongpublic static TagResource[] buildTags(Collection<TagData> tagListItems)
TagDatatagListItems - Collection of TagDataTagResourcepublic static NoteRenderContext createNoteRenderContext(Boolean filterHtml, boolean beautifyPlainText, javax.ws.rs.core.Request request)
filterHtml - if true the content should be returned as plain textbeautifyPlainText - if true beautifications can be applied when creating the plain text. Will be
ignored if filterHtml is false.request - the current requestpublic static void setToForParameterUnspecificElements(Boolean isHtml, NoteStoringTO noteStoringTO)
NoteStoringTO object that are the same in create or edit methodisHtml - is note text content htmlnoteStoringTO - NoteStoringTOCopyright © 2019 Communote team. All rights reserved.