@Override public Attachment to(UriInfo uriInfo, AttachmentRepresentation representation) { Attachment attachment = new Attachment( representation.getTitle(), representation.getMimeType(), representation.getUrl()); return attachment; }
@Override public Attachment update( UriInfo uriInfo, AttachmentRepresentation representation, Attachment target) { target.setTitle(representation.getTitle()); target.setMimeType(representation.getMimeType()); target.setUrl(representation.getUrl()); return target; }