private List<MediaType> getEffectiveOutputTypes(final ResourceMethod resourceMethod) { if (!resourceMethod.getProducedTypes().isEmpty()) { return resourceMethod.getProducedTypes(); } List<MediaType> result = new LinkedList<>(); if (workers != null) { final Invocable invocable = resourceMethod.getInvocable(); result.addAll(workers.getMessageBodyWriterMediaTypes( invocable.getRawResponseType(), invocable.getResponseType(), invocable.getHandlingMethod().getAnnotations())); } return result.isEmpty() ? StarTypeList : result; }
private List<MediaType> getEffectiveOutputTypes(final ResourceMethod resourceMethod) { if (!resourceMethod.getProducedTypes().isEmpty()) { return resourceMethod.getProducedTypes(); } List<MediaType> result = new LinkedList<>(); if (workers != null) { final Invocable invocable = resourceMethod.getInvocable(); result.addAll(workers.getMessageBodyWriterMediaTypes( invocable.getRawResponseType(), invocable.getResponseType(), invocable.getHandlingMethod().getAnnotations())); } return result.isEmpty() ? StarTypeList : result; }
private void ensureMediaType() { if (getMediaType() == null) { // Content-Type is not present choose a default type final GenericType<?> entityType = new GenericType(getEntityType()); final List<MediaType> mediaTypes = workers.getMessageBodyWriterMediaTypes( entityType.getRawType(), entityType.getType(), getEntityAnnotations()); setMediaType(getMediaType(mediaTypes)); } }
private void ensureMediaType() { if (getMediaType() == null) { // Content-Type is not present choose a default type final GenericType<?> entityType = new GenericType(getEntityType()); final List<MediaType> mediaTypes = workers.getMessageBodyWriterMediaTypes( entityType.getRawType(), entityType.getType(), getEntityAnnotations()); setMediaType(getMediaType(mediaTypes)); } }
private void ensureMediaType() { if (getMediaType() == null) { // Content-Type is not present choose a default type final GenericType<?> entityType = new GenericType(getEntityType()); final List<MediaType> mediaTypes = workers.getMessageBodyWriterMediaTypes( entityType.getRawType(), entityType.getType(), getEntityAnnotations()); setMediaType(getMediaType(mediaTypes)); } }
private List<MediaType> getEffectiveOutputTypes(final ResourceMethod resourceMethod) { if (!resourceMethod.getProducedTypes().isEmpty()) { return resourceMethod.getProducedTypes(); } List<MediaType> result = new LinkedList<>(); if (workers != null) { final Invocable invocable = resourceMethod.getInvocable(); result.addAll(workers.getMessageBodyWriterMediaTypes( invocable.getRawResponseType(), invocable.getResponseType(), invocable.getHandlingMethod().getAnnotations())); } return result.isEmpty() ? StarTypeList : result; }
private List<MediaType> getEffectiveOutputTypes(final ResourceMethod resourceMethod) { if (!resourceMethod.getProducedTypes().isEmpty()) { return resourceMethod.getProducedTypes(); } List<MediaType> result = new LinkedList<>(); if (workers != null) { final Invocable invocable = resourceMethod.getInvocable(); result.addAll(workers.getMessageBodyWriterMediaTypes( invocable.getRawResponseType(), invocable.getResponseType(), invocable.getHandlingMethod().getAnnotations())); } return result.isEmpty() ? StarTypeList : result; }
private List<MediaType> getEffectiveOutputTypes(final ResourceMethod resourceMethod) { if (!resourceMethod.getProducedTypes().isEmpty()) { return resourceMethod.getProducedTypes(); } List<MediaType> result = new LinkedList<>(); if (workers != null) { final Invocable invocable = resourceMethod.getInvocable(); result.addAll(workers.getMessageBodyWriterMediaTypes( invocable.getRawResponseType(), invocable.getResponseType(), invocable.getHandlingMethod().getAnnotations())); } return result.isEmpty() ? StarTypeList : result; }
private List<MediaType> getEffectiveOutputTypes(final ResourceMethod resourceMethod) { if (!resourceMethod.getProducedTypes().isEmpty()) { return resourceMethod.getProducedTypes(); } List<MediaType> result = new LinkedList<>(); if (workers != null) { final Invocable invocable = resourceMethod.getInvocable(); result.addAll(workers.getMessageBodyWriterMediaTypes( invocable.getRawResponseType(), invocable.getResponseType(), invocable.getHandlingMethod().getAnnotations())); } return result.isEmpty() ? StarTypeList : result; }
private List<MediaType> getEffectiveOutputTypes(final ResourceMethod resourceMethod) { if (!resourceMethod.getProducedTypes().isEmpty()) { return resourceMethod.getProducedTypes(); } List<MediaType> result = new LinkedList<>(); if (workers != null) { final Invocable invocable = resourceMethod.getInvocable(); result.addAll(workers.getMessageBodyWriterMediaTypes( invocable.getRawResponseType(), invocable.getResponseType(), invocable.getHandlingMethod().getAnnotations())); } return result.isEmpty() ? StarTypeList : result; }
private void ensureMediaType() { if (getMediaType() == null) { // Content-Type is not present choose a default type final GenericType<?> entityType = new GenericType(getEntityType()); final List<MediaType> mediaTypes = workers.getMessageBodyWriterMediaTypes( entityType.getRawType(), entityType.getType(), getEntityAnnotations()); setMediaType(getMediaType(mediaTypes)); } }
private void ensureMediaType() { if (getMediaType() == null) { // Content-Type is not present choose a default type final GenericType<?> entityType = new GenericType(getEntityType()); final List<MediaType> mediaTypes = workers.getMessageBodyWriterMediaTypes( entityType.getRawType(), entityType.getType(), getEntityAnnotations()); setMediaType(getMediaType(mediaTypes)); } }
private void ensureMediaType() { if (getMediaType() == null) { // Content-Type is not present choose a default type final GenericType<?> entityType = new GenericType(getEntityType()); final List<MediaType> mediaTypes = workers.getMessageBodyWriterMediaTypes( entityType.getRawType(), entityType.getType(), getEntityAnnotations()); setMediaType(getMediaType(mediaTypes)); } }
private void ensureMediaType() { if (getMediaType() == null) { // Content-Type is not present choose a default type final GenericType<?> entityType = new GenericType(getEntityType()); final List<MediaType> mediaTypes = workers.getMessageBodyWriterMediaTypes( entityType.getRawType(), entityType.getType(), getEntityAnnotations()); setMediaType(getMediaType(mediaTypes)); } }
.getMessageBodyWriterMediaTypes( responseContext.getEntityClass(), responseContext.getEntityType(),