public class LikeResourceHandler extends DefaultResourceHandler<CreateLikeParameter,DefaultParameter,DeleteLikeParameter,DefaultParameter,GetCollectionLikeParameter>
Modifier and Type | Field and Description |
---|---|
static String |
PROPERTY_KEY_LIKE
Property key for the like feature.
|
Constructor and Description |
---|
LikeResourceHandler() |
Modifier and Type | Method and Description |
---|---|
NoteService |
getNoteManagement()
Getter for the
NoteService |
PropertyManagement |
getPropertyManagement()
Getter for the
PropertyManagement |
javax.ws.rs.core.Response |
handleCreateInternally(CreateLikeParameter createLikeParameter,
String requestedMimeType,
javax.ws.rs.core.UriInfo uriInfo,
String requestSessionId,
javax.ws.rs.core.Request request)
Request to set note as favorite
|
javax.ws.rs.core.Response |
handleDeleteInternally(DeleteLikeParameter deleteLikeParameter,
String requestedMimeType,
javax.ws.rs.core.UriInfo uriInfo,
String requestSessionId,
javax.ws.rs.core.Request request)
Request to delete note as favorite
|
javax.ws.rs.core.Response |
handleListInternally(GetCollectionLikeParameter getCollectionLikeParameter,
String requestedMimeType,
javax.ws.rs.core.UriInfo uriInfo,
String requestSessionId,
javax.ws.rs.core.Request request)
Request to list the likes of note
|
handleEditInternally, handleGetInternally
handleCreate, handleDelete, handleEdit, handleGet, handleList, setValidator
public static final String PROPERTY_KEY_LIKE
public NoteService getNoteManagement()
NoteService
NoteService
public PropertyManagement getPropertyManagement()
PropertyManagement
PropertyManagement
public javax.ws.rs.core.Response handleCreateInternally(CreateLikeParameter createLikeParameter, String requestedMimeType, javax.ws.rs.core.UriInfo uriInfo, String requestSessionId, javax.ws.rs.core.Request request) throws AuthorizationException, NotFoundException, ResponseBuildException, ExtensionNotSupportedException
handleCreateInternally
in class DefaultResourceHandler<CreateLikeParameter,DefaultParameter,DeleteLikeParameter,DefaultParameter,GetCollectionLikeParameter>
createLikeParameter
- - an object that contains all the parameter that can or have to be used for such a
requestrequestedMimeType
- - is the mime type that indicates which data exchange format to useuriInfo
- - this object is created by the request and contains some request specific datarequestSessionId
- - The sessionId for the sessionrequest
- - javax requestLikeResource
AuthorizationException
- user is not authorizedNotFoundException
- can note found propertyResponseBuildException
- exception while building the responseExtensionNotSupportedException
- extension is not supportedpublic javax.ws.rs.core.Response handleDeleteInternally(DeleteLikeParameter deleteLikeParameter, String requestedMimeType, javax.ws.rs.core.UriInfo uriInfo, String requestSessionId, javax.ws.rs.core.Request request) throws AuthorizationException, NotFoundException, ResponseBuildException, ExtensionNotSupportedException
handleDeleteInternally
in class DefaultResourceHandler<CreateLikeParameter,DefaultParameter,DeleteLikeParameter,DefaultParameter,GetCollectionLikeParameter>
deleteLikeParameter
- - an object that contains all the parameter that can or have to be used for such a
requestrequestedMimeType
- - is the mime type that indicates which data exchange format to useuriInfo
- - this object is created by the request and contains some request specific datarequestSessionId
- - The sessionId for the sessionrequest
- - javax requestLikeResource
AuthorizationException
- user is not authorizedNotFoundException
- can not found propertyResponseBuildException
- exception while building the responseExtensionNotSupportedException
- extension is not supportedpublic javax.ws.rs.core.Response handleListInternally(GetCollectionLikeParameter getCollectionLikeParameter, String requestedMimeType, javax.ws.rs.core.UriInfo uriInfo, String requestSessionId, javax.ws.rs.core.Request request) throws AuthorizationException, ResponseBuildException, ExtensionNotSupportedException
handleListInternally
in class DefaultResourceHandler<CreateLikeParameter,DefaultParameter,DeleteLikeParameter,DefaultParameter,GetCollectionLikeParameter>
getCollectionLikeParameter
- - an object that contains all the parameter that can or have to be used for such a
requestrequestedMimeType
- - is the mime type that indicates which data exchange format to useuriInfo
- - this object is created by the request and contains some request specific datarequestSessionId
- - The sessionId for the sessionrequest
- - javax requestLikeResource
AuthorizationException
- user is not authorizedResponseBuildException
- exception while building the responseExtensionNotSupportedException
- extension is not supportedCopyright © 2019 Communote team. All rights reserved.