public class AttachmentResourceHandler extends DefaultResourceHandler<CreateAttachmentParameter,DefaultParameter,DeleteAttachmentParameter,GetAttachmentParameter,DefaultParameter>
Constructor and Description |
---|
AttachmentResourceHandler() |
Modifier and Type | Method and Description |
---|---|
protected javax.ws.rs.core.Response |
handleCreateInternally(CreateAttachmentParameter createParameter,
String requestedMimeType,
javax.ws.rs.core.UriInfo uriInfo,
String requestSessionId,
javax.ws.rs.core.Request request)
hook method, which should be implemented by subclasses, in order to perform actual resource
creation
|
protected javax.ws.rs.core.Response |
handleDeleteInternally(DeleteAttachmentParameter deleteParameter,
String requestedMimeType,
javax.ws.rs.core.UriInfo uriInfo,
String requestSessionId,
javax.ws.rs.core.Request request)
hook method, which should be implemented by subclasses, in order to perform actual resource
removal
|
javax.ws.rs.core.Response |
handleGetInternally(GetAttachmentParameter getAttachmentParameter,
String requestedMimeType,
javax.ws.rs.core.UriInfo uriInfo,
String requestSessionId,
javax.ws.rs.core.Request request)
Returns an existing attachment of a given note.
|
handleEditInternally, handleListInternally
handleCreate, handleDelete, handleEdit, handleGet, handleList, setValidator
protected javax.ws.rs.core.Response handleCreateInternally(CreateAttachmentParameter createParameter, String requestedMimeType, javax.ws.rs.core.UriInfo uriInfo, String requestSessionId, javax.ws.rs.core.Request request) throws ParameterValidationException, ResponseBuildException, ExtensionNotSupportedException, org.apache.commons.fileupload.FileUploadException, IOException, IllegalRequestParameterException, AttachmentIsEmptyException, AuthorizationException
DefaultResourceHandler
handleCreateInternally
in class DefaultResourceHandler<CreateAttachmentParameter,DefaultParameter,DeleteAttachmentParameter,GetAttachmentParameter,DefaultParameter>
createParameter
- create parameterrequestedMimeType
- mimeTypeuriInfo
- urirequestSessionId
- session idrequest
- requestParameterValidationException
ResponseBuildException
ExtensionNotSupportedException
org.apache.commons.fileupload.FileUploadException
IOException
IllegalRequestParameterException
AttachmentIsEmptyException
AuthorizationException
protected javax.ws.rs.core.Response handleDeleteInternally(DeleteAttachmentParameter deleteParameter, String requestedMimeType, javax.ws.rs.core.UriInfo uriInfo, String requestSessionId, javax.ws.rs.core.Request request) throws Exception
DefaultResourceHandler
handleDeleteInternally
in class DefaultResourceHandler<CreateAttachmentParameter,DefaultParameter,DeleteAttachmentParameter,GetAttachmentParameter,DefaultParameter>
deleteParameter
- delete parameterrequestedMimeType
- mimeTypeuriInfo
- urirequestSessionId
- session idrequest
- requestException
- if anything goes wrongpublic javax.ws.rs.core.Response handleGetInternally(GetAttachmentParameter getAttachmentParameter, String requestedMimeType, javax.ws.rs.core.UriInfo uriInfo, String requestSessionId, javax.ws.rs.core.Request request) throws ResponseBuildException, ExtensionNotSupportedException, ContentRepositoryException, AuthorizationException, IOException, NotFoundException
handleGetInternally
in class DefaultResourceHandler<CreateAttachmentParameter,DefaultParameter,DeleteAttachmentParameter,GetAttachmentParameter,DefaultParameter>
getAttachmentParameter
- the parameters of the attachmentrequestedMimeType
- MIME type requested by clienturiInfo
- additional information about requestrequestSessionId
- the session idrequest
- - javax requestResponseBuildException
- exception while building the responseExtensionNotSupportedException
- extension is not supportedAuthorizationException
- user is not authorizatedContentRepositoryException
- internal exception.IOException
- exception while i/o operation.NotFoundException
- in case the attachment does not existCopyright © 2019 Communote team. All rights reserved.