use of org.xwiki.rest.model.jaxb.Comment in project xwiki-platform by xwiki.
the class TextPlainCommentReader method readFrom.
@Override
public Comment readFrom(Class<Comment> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, String> httpHeaders, InputStream entityStream) throws IOException, WebApplicationException {
ObjectFactory objectFactory = new ObjectFactory();
Comment comment = objectFactory.createComment();
String text = getEntityAsString(entityStream);
comment.setText(text);
return comment;
}
Aggregations