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 transfer object
|
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 NoteData
newNoteResource
- NoteResource
public static void buildNoteResourceNotifications(NoteData note, NoteResource newNoteResource)
note
- note of NoteData
newNoteResource
- NoteResource
public static NoteStoringTO buildNoteStoringTO(CreateNoteParameter createNoteParameter) throws IllegalRequestParameterException
createNoteParameter
- parameters to create an noteNoteStoringTO
IllegalRequestParameterException
- text value is wrongpublic static NoteStoringTO buildNoteStoringTO(EditNoteParameter editNoteParameter) throws IllegalRequestParameterException
editNoteParameter
- parameters to edit an noteNoteStoringTO
IllegalRequestParameterException
- text value is wrongpublic static TagResource[] buildTags(Collection<TagData> tagListItems)
TagData
tagListItems
- Collection of TagData
TagResource
public 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
- NoteStoringTO
Copyright © 2019 Communote team. All rights reserved.