public class NoteBuildHelper extends Object
| Modifier and Type | Method and Description |
|---|---|
static NoteResource |
buildNoteResource(NoteData note)
Create a resource object for a userListItem to send back only the values specified by the
webservice definition
|
static javax.ws.rs.core.Response |
buildNoteResponse(javax.ws.rs.core.Request request,
NoteModificationResult result)
Build the response of an note.
|
static void |
setAttachmentsFromSession(String attribute,
javax.servlet.http.HttpSession session,
NoteStoringTO noteStoringTO)
Adds an list with attachment identifier to
NoteStoringTO. |
public static NoteResource buildNoteResource(NoteData note) throws AuthorizationException, NoteNotFoundException
note - is a note object that contains also user/author specific dataNoteNotFoundException - in case the note was removed after filling the NoteData objectAuthorizationException - in case the access rights to the topic/note were changed after filling the
NoteData objectpublic static javax.ws.rs.core.Response buildNoteResponse(javax.ws.rs.core.Request request,
NoteModificationResult result)
throws ResponseBuildException,
ExtensionNotSupportedException
request - Requestresult - NoteModificationStatusResponseResponseBuildException - exception while building the responseExtensionNotSupportedException - extension is not supportedpublic static void setAttachmentsFromSession(String attribute, javax.servlet.http.HttpSession session, NoteStoringTO noteStoringTO)
NoteStoringTO. The set of attachment
identifier gets this function from an specific session attribute. The key of the attribute is
the parameter of NoteResource.attribute - of sessionsession - HttpSessionnoteStoringTO - NoteStoringTOCopyright © 2019 Communote team. All rights reserved.