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)
note
- is a note object that contains also user/author specific datapublic static javax.ws.rs.core.Response buildNoteResponse(javax.ws.rs.core.Request request, NoteModificationResult result) throws ResponseBuildException, ExtensionNotSupportedException
request
- Request
result
- NoteModificationStatus
Response
ResponseBuildException
- 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
- HttpSession
noteStoringTO
- NoteStoringTO
Copyright © 2019 Communote team. All rights reserved.