Package org.apache.cxf.jaxrs.provider
Class AbstractResponseViewProvider
java.lang.Object
org.apache.cxf.jaxrs.provider.AbstractConfigurableProvider
org.apache.cxf.jaxrs.provider.AbstractResponseViewProvider
- All Implemented Interfaces:
jakarta.ws.rs.ext.MessageBodyWriter<Object>
- Direct Known Subclasses:
RequestDispatcherProvider,SpringViewResolverProvider
@Produces("text/html")
@Provider
public abstract class AbstractResponseViewProvider
extends AbstractConfigurableProvider
implements jakarta.ws.rs.ext.MessageBodyWriter<Object>
-
Field Summary
Fields inherited from class org.apache.cxf.jaxrs.provider.AbstractConfigurableProvider
BUNDLE, LOG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanclassResourceSupported(Class<?> type) protected StringdoGetClassResourceName(Class<?> type) protected StringgetBeanName(Object bean) protected StringgetClassResourceName(Class<?> type) protected Stringprotected Stringprotected Stringprotected Stringprotected StringgetResourcePath(Class<?> cls, Object o) longgetSize(Object t, Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mt) protected voidhandleInternalViewRenderingException(Throwable exception) protected voidhandleViewRenderingException(String viewName, Throwable exception) By default we'll try to forward to the error handler.booleanbooleanbooleanisWriteable(Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mt) protected abstract booleanresourceAvailable(String resourceName) voidsetBeanName(String beanName) voidsetBeanNames(Map<String, String> beanNames) voidsetClassResources(Map<String, String> resources) voidsetEnumResources(Map<? extends Enum<?>, String> enumResources) voidsetErrorView(String errorView) voidsetLocationPrefix(String locationPrefix) voidsetLogRedirects(boolean logRedirects) voidsetMessageContext(MessageContext context) voidsetResourceExtension(String resourceExtension) voidsetResourcePath(String resourcePath) voidsetResourcePaths(Map<String, String> resourcePaths) voidsetStrictPathCheck(boolean use) voidsetUseClassNames(boolean use) Methods inherited from class org.apache.cxf.jaxrs.provider.AbstractConfigurableProvider
getBus, getConsumeMediaTypes, getEnableBuffering, getEnableStreaming, getProduceMediaTypes, init, isPayloadEmpty, isPayloadEmpty, reportEmptyContentLength, setBus, setConsumeMediaTypes, setEnableBuffering, setEnableStreaming, setProduceMediaTypesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface jakarta.ws.rs.ext.MessageBodyWriter
writeTo
-
Constructor Details
-
AbstractResponseViewProvider
public AbstractResponseViewProvider()
-
-
Method Details
-
setMessageContext
-
getMessageContext
-
setUseClassNames
public void setUseClassNames(boolean use) -
isUseClassNames
public boolean isUseClassNames() -
setStrictPathCheck
public void setStrictPathCheck(boolean use) -
setBeanNames
-
setBeanName
-
setResourcePath
-
setResourcePaths
-
getSize
public long getSize(Object t, Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mt) - Specified by:
getSizein interfacejakarta.ws.rs.ext.MessageBodyWriter<Object>
-
setClassResources
-
setEnumResources
-
setLocationPrefix
-
setResourceExtension
-
setErrorView
-
isWriteable
public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mt) - Specified by:
isWriteablein interfacejakarta.ws.rs.ext.MessageBodyWriter<Object>
-
classResourceSupported
-
getPathFromMessageContext
-
getBeanName
-
getResourcePath
-
getRequestPath
-
getClassResourceName
-
doGetClassResourceName
-
handleViewRenderingException
By default we'll try to forward to the error handler. If no such handler has been set, or if there is an error during error handling, we throw an error and let CXF handle the internal error.- Parameters:
viewName- name of the view that produced the rendering errorexception- rendering error
-
handleInternalViewRenderingException
-
getDefaultLocationPrefix
-
getDefaultResourceExtension
-
resourceAvailable
-
isLogRedirects
public boolean isLogRedirects() -
setLogRedirects
public void setLogRedirects(boolean logRedirects)
-