@Override protected Marshaller getMarshaller( final Class<?> type, final Annotation[] annotations, final MediaType mediaType) { final Marshaller marshaller = super.getMarshaller(type, annotations, mediaType); marshaller.setAdapter(PersistentEntityAdapter.class, new PersistentEntityAdapter() { @Override protected BookmarkService getBookmarkService() { return getServicesInjector().lookupServiceElseFail(BookmarkService.class); } }); return marshaller; }
@Override protected boolean isReadWritable( final Class<?> type, final Type genericType, final Annotation[] annotations, final MediaType mediaType) { return super.isReadWritable(type, genericType, annotations, mediaType) && hasXRoDomainTypeParameter(mediaType); }