Package org.apache.cxf.jaxrs.utils
Class JAXRSUtils
- java.lang.Object
-
- org.apache.cxf.jaxrs.utils.JAXRSUtils
-
public final class JAXRSUtils extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static javax.ws.rs.core.MediaTypeALL_TYPESstatic StringDOC_LOCATIONstatic StringEXCEPTION_FROM_MAPPERstatic StringIGNORE_MESSAGE_WRITERSstatic StringMEDIA_TYPE_Q_PARAMstatic StringMEDIA_TYPE_QS_PARAMstatic StringPARTIAL_HIERARCHICAL_MEDIA_SUBTYPE_CHECKstatic StringROOT_INSTANCEstatic StringROOT_PROVIDERstatic StringROOT_RESOURCE_CLASSstatic StringSECOND_JAXRS_EXCEPTION
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intcompareMediaTypes(javax.ws.rs.core.MediaType mt1, javax.ws.rs.core.MediaType mt2)static intcompareMediaTypes(javax.ws.rs.core.MediaType mt1, javax.ws.rs.core.MediaType mt2, String qs)static intcompareMediaTypesQualityFactors(javax.ws.rs.core.MediaType mt1, javax.ws.rs.core.MediaType mt2)static intcompareMediaTypesQualityFactors(javax.ws.rs.core.MediaType mt1, javax.ws.rs.core.MediaType mt2, String qs)static intcompareMethodParameters(Class<?>[] paraList1, Class<?>[] paraList2)static intcompareSortedAcceptMediaTypes(List<javax.ws.rs.core.MediaType> mts1, List<javax.ws.rs.core.MediaType> mts2, List<javax.ws.rs.core.MediaType> acceptTypes)static intcompareSortedConsumesMediaTypes(List<javax.ws.rs.core.MediaType> mts1, List<javax.ws.rs.core.MediaType> mts2, javax.ws.rs.core.MediaType ct)static intcompareSortedMediaTypes(List<javax.ws.rs.core.MediaType> mts1, List<javax.ws.rs.core.MediaType> mts2, String qs)static <T extends Throwable>
javax.ws.rs.core.ResponseconvertFaultToResponse(T ex, org.apache.cxf.message.Message currentMessage)static QNameconvertStringToQName(String name)static javax.ws.rs.core.ResponsecopyResponseIfNeeded(javax.ws.rs.core.Response response)static ObjectcreateBeanParamValue(org.apache.cxf.message.Message m, Class<?> clazz, OperationResourceInfo ori)static javax.ws.rs.ext.ContextResolver<?>createContextResolver(Type genericType, org.apache.cxf.message.Message m)static <T> TcreateContextValue(org.apache.cxf.message.Message m, Type genericType, Class<T> clazz)static ObjectcreateHttpParameterValue(Parameter parameter, Class<?> parameterClass, Type genericParam, Annotation[] paramAnns, org.apache.cxf.message.Message message, javax.ws.rs.core.MultivaluedMap<String,String> values, OperationResourceInfo ori)static ObjectcreateResourceValue(org.apache.cxf.message.Message m, Type genericType, Class<?> clazz)static javax.ws.rs.core.ResponsecreateResponse(List<ClassResourceInfo> cris, org.apache.cxf.message.Message msg, String responseMessage, int status, boolean addAllow)static booleandoMimeTypesIntersect(List<javax.ws.rs.core.MediaType> requiredMediaTypes, List<javax.ws.rs.core.MediaType> userMediaTypes)static booleandoMimeTypesIntersect(List<javax.ws.rs.core.MediaType> mimeTypesA, javax.ws.rs.core.MediaType mimeTypeB)static OperationResourceInfofindTargetMethod(Map<ClassResourceInfo,javax.ws.rs.core.MultivaluedMap<String,String>> matchedResources, org.apache.cxf.message.Message message, String httpMethod, javax.ws.rs.core.MultivaluedMap<String,String> matchedValues, String requestContentType, List<javax.ws.rs.core.MediaType> acceptContentTypes)static OperationResourceInfofindTargetMethod(Map<ClassResourceInfo,javax.ws.rs.core.MultivaluedMap<String,String>> matchedResources, org.apache.cxf.message.Message message, String httpMethod, javax.ws.rs.core.MultivaluedMap<String,String> matchedValues, String requestContentType, List<javax.ws.rs.core.MediaType> acceptContentTypes, boolean throwException, boolean recordMatchedUri)static javax.ws.rs.core.Response.ResponseBuilderfromResponse(javax.ws.rs.core.Response response)static javax.ws.rs.core.Response.ResponseBuilderfromResponse(javax.ws.rs.core.Response response, boolean copyEntity)static QNamegetClassQName(Class<?> type)static List<javax.ws.rs.core.MediaType>getConsumeTypes(javax.ws.rs.Consumes cm)static List<javax.ws.rs.core.MediaType>getConsumeTypes(javax.ws.rs.Consumes cm, List<javax.ws.rs.core.MediaType> defaultTypes)static org.apache.cxf.message.MessagegetContextMessage(org.apache.cxf.message.Message m)static org.apache.cxf.message.MessagegetCurrentMessage()static LevelgetExceptionLogLevel(org.apache.cxf.message.Message message, Class<? extends javax.ws.rs.WebApplicationException> exClass)static javax.ws.rs.core.MultivaluedMap<String,String>getMatrixParams(String path, boolean decode)static floatgetMediaTypeQualityFactor(String q)static List<javax.ws.rs.core.MediaType>getMediaTypes(String[] values)static List<javax.ws.rs.core.PathSegment>getPathSegments(String thePath, boolean decode)static List<javax.ws.rs.core.PathSegment>getPathSegments(String thePath, boolean decode, boolean ignoreLastSlash)Parses path segments taking into account the URI templates and template regexes.static List<javax.ws.rs.core.MediaType>getProduceTypes(javax.ws.rs.Produces pm)static List<javax.ws.rs.core.MediaType>getProduceTypes(javax.ws.rs.Produces pm, List<javax.ws.rs.core.MediaType> defaultTypes)static List<javax.ws.rs.core.MediaType>getProviderConsumeTypes(javax.ws.rs.ext.MessageBodyReader<?> provider)static List<javax.ws.rs.core.MediaType>getProviderProduceTypes(javax.ws.rs.ext.MessageBodyWriter<?> provider)static ClassResourceInfogetRootResource(org.apache.cxf.message.Message m)static List<ClassResourceInfo>getRootResources(org.apache.cxf.message.Message message)static javax.ws.rs.core.MultivaluedMap<String,String>getStructuredParams(String query, String sep, boolean decode, boolean decodePlus)Retrieve map of query parameters from the passed in messagestatic voidgetStructuredParams(javax.ws.rs.core.MultivaluedMap<String,String> queries, String query, String sep, boolean decode, boolean decodePlus)static voidgetStructuredParams(javax.ws.rs.core.MultivaluedMap<String,String> queries, String query, String sep, boolean decode, boolean decodePlus, boolean valueIsCollection)static StringgetUriTemplate(org.apache.cxf.message.Message message, ClassResourceInfo cri, OperationResourceInfo ori)Get path URI template, combining base path, class & method templatesstatic StringgetUriTemplate(org.apache.cxf.message.Message message, ClassResourceInfo cri, OperationResourceInfo ori, OperationResourceInfo subOri)Get path URI template, combining base path, class & method & subresource templatesstatic booleanheadMethodPossible(String expectedMethod, String httpMethod)static voidinjectParameters(OperationResourceInfo ori, Object requestObject, org.apache.cxf.message.Message message)static voidinjectParameters(OperationResourceInfo ori, BeanResourceInfo bri, Object requestObject, org.apache.cxf.message.Message message)static List<javax.ws.rs.core.MediaType>intersectMimeTypes(String mimeTypesA, String mimeTypesB)static List<javax.ws.rs.core.MediaType>intersectMimeTypes(List<javax.ws.rs.core.MediaType> requiredMediaTypes, List<javax.ws.rs.core.MediaType> userMediaTypes, boolean addRequiredParamsIfPossible)intersect two mime typesstatic List<javax.ws.rs.core.MediaType>intersectMimeTypes(List<javax.ws.rs.core.MediaType> requiredMediaTypes, List<javax.ws.rs.core.MediaType> userMediaTypes, boolean addRequiredParamsIfPossible, boolean addDistanceParameter)static List<javax.ws.rs.core.MediaType>intersectMimeTypes(List<javax.ws.rs.core.MediaType> mimeTypesA, javax.ws.rs.core.MediaType mimeTypeB)static booleanisStreamingLikeOutType(Class<?> cls, Type type)Consider additional types as stream-like and returns if the class and corresponding type refer to one of those.static booleanisStreamingOutType(Class<?> type)static StringlogMessageHandlerProblem(String name, Class<?> cls, javax.ws.rs.core.MediaType ct)static booleanmatchConsumeTypes(javax.ws.rs.core.MediaType requestContentType, OperationResourceInfo ori)static booleanmatchMimeTypes(javax.ws.rs.core.MediaType requestContentType, javax.ws.rs.core.MediaType acceptContentType, OperationResourceInfo ori)static booleanmatchProduceTypes(javax.ws.rs.core.MediaType acceptContentType, OperationResourceInfo ori)static StringmediaTypeToString(javax.ws.rs.core.MediaType mt, String... ignoreParams)static booleannoResourceMethodForOptions(javax.ws.rs.core.Response exResponse, String httpMethod)static List<javax.ws.rs.core.MediaType>parseMediaTypes(String types)static List<Object>processParameters(OperationResourceInfo ori, javax.ws.rs.core.MultivaluedMap<String,String> values, org.apache.cxf.message.Message message)static voidpushOntoStack(OperationResourceInfo ori, javax.ws.rs.core.MultivaluedMap<String,String> params, org.apache.cxf.message.Message msg)static ObjectreadFromMessageBodyReader(List<javax.ws.rs.ext.ReaderInterceptor> readers, Class<?> targetTypeClass, Type parameterType, Annotation[] parameterAnnotations, InputStream is, javax.ws.rs.core.MediaType mediaType, org.apache.cxf.message.Message m)static booleanrunContainerRequestFilters(ServerProviderFactory pf, org.apache.cxf.message.Message m, boolean preMatch, Set<String> names)static voidrunContainerResponseFilters(ServerProviderFactory pf, ResponseImpl r, org.apache.cxf.message.Message m, OperationResourceInfo ori, Method invoked)static Map<ClassResourceInfo,javax.ws.rs.core.MultivaluedMap<String,String>>selectResourceClass(List<ClassResourceInfo> resources, String path, org.apache.cxf.message.Message message)static voidsetMessageContentType(org.apache.cxf.message.Message message, javax.ws.rs.core.Response response)static List<javax.ws.rs.core.MediaType>sortMediaTypes(String mediaTypes, String qs)static List<javax.ws.rs.core.MediaType>sortMediaTypes(List<javax.ws.rs.core.MediaType> types, String qs)static javax.ws.rs.core.MediaTypetoMediaType(String value)static javax.ws.rs.core.ResponsetoResponse(int status)static javax.ws.rs.core.ResponsetoResponse(javax.ws.rs.core.Response.Status status)static javax.ws.rs.core.Response.ResponseBuildertoResponseBuilder(int status)static javax.ws.rs.core.Response.ResponseBuildertoResponseBuilder(javax.ws.rs.core.Response.Status status)static voidwriteMessageBody(List<javax.ws.rs.ext.WriterInterceptor> writers, Object entity, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders, org.apache.cxf.message.Message message)
-
-
-
Field Detail
-
ALL_TYPES
public static final javax.ws.rs.core.MediaType ALL_TYPES
-
ROOT_RESOURCE_CLASS
public static final String ROOT_RESOURCE_CLASS
- See Also:
- Constant Field Values
-
IGNORE_MESSAGE_WRITERS
public static final String IGNORE_MESSAGE_WRITERS
- See Also:
- Constant Field Values
-
ROOT_INSTANCE
public static final String ROOT_INSTANCE
- See Also:
- Constant Field Values
-
ROOT_PROVIDER
public static final String ROOT_PROVIDER
- See Also:
- Constant Field Values
-
EXCEPTION_FROM_MAPPER
public static final String EXCEPTION_FROM_MAPPER
- See Also:
- Constant Field Values
-
SECOND_JAXRS_EXCEPTION
public static final String SECOND_JAXRS_EXCEPTION
- See Also:
- Constant Field Values
-
PARTIAL_HIERARCHICAL_MEDIA_SUBTYPE_CHECK
public static final String PARTIAL_HIERARCHICAL_MEDIA_SUBTYPE_CHECK
- See Also:
- Constant Field Values
-
DOC_LOCATION
public static final String DOC_LOCATION
- See Also:
- Constant Field Values
-
MEDIA_TYPE_Q_PARAM
public static final String MEDIA_TYPE_Q_PARAM
- See Also:
- Constant Field Values
-
MEDIA_TYPE_QS_PARAM
public static final String MEDIA_TYPE_QS_PARAM
- See Also:
- Constant Field Values
-
-
Method Detail
-
isStreamingLikeOutType
public static boolean isStreamingLikeOutType(Class<?> cls, Type type)
Consider additional types as stream-like and returns if the class and corresponding type refer to one of those.- Parameters:
cls- class to checktype- type to check- Returns:
- "true" is the class and corresponding type could be considered streaming-like, "false" otherwise.
-
isStreamingOutType
public static boolean isStreamingOutType(Class<?> type)
-
getPathSegments
public static List<javax.ws.rs.core.PathSegment> getPathSegments(String thePath, boolean decode)
-
getPathSegments
public static List<javax.ws.rs.core.PathSegment> getPathSegments(String thePath, boolean decode, boolean ignoreLastSlash)
Parses path segments taking into account the URI templates and template regexes. Per RFC-3986, "A path consists of a sequence of path segments separated by a slash ("/") character.", however it is possible to include slash ("/") inside template regex, for example "/my/path/{a:b/c}", see pleaseURITemplate. In this case, the whole template definition is extracted as a path segment, without breaking it.- Parameters:
thePath- pathdecode- should the path segments be decoded or notignoreLastSlash- should the last slash be ignored or not- Returns:
-
getProviderConsumeTypes
public static List<javax.ws.rs.core.MediaType> getProviderConsumeTypes(javax.ws.rs.ext.MessageBodyReader<?> provider)
-
getProviderProduceTypes
public static List<javax.ws.rs.core.MediaType> getProviderProduceTypes(javax.ws.rs.ext.MessageBodyWriter<?> provider)
-
injectParameters
public static void injectParameters(OperationResourceInfo ori, Object requestObject, org.apache.cxf.message.Message message)
-
injectParameters
public static void injectParameters(OperationResourceInfo ori, BeanResourceInfo bri, Object requestObject, org.apache.cxf.message.Message message)
-
selectResourceClass
public static Map<ClassResourceInfo,javax.ws.rs.core.MultivaluedMap<String,String>> selectResourceClass(List<ClassResourceInfo> resources, String path, org.apache.cxf.message.Message message)
-
findTargetMethod
public static OperationResourceInfo findTargetMethod(Map<ClassResourceInfo,javax.ws.rs.core.MultivaluedMap<String,String>> matchedResources, org.apache.cxf.message.Message message, String httpMethod, javax.ws.rs.core.MultivaluedMap<String,String> matchedValues, String requestContentType, List<javax.ws.rs.core.MediaType> acceptContentTypes)
-
findTargetMethod
public static OperationResourceInfo findTargetMethod(Map<ClassResourceInfo,javax.ws.rs.core.MultivaluedMap<String,String>> matchedResources, org.apache.cxf.message.Message message, String httpMethod, javax.ws.rs.core.MultivaluedMap<String,String> matchedValues, String requestContentType, List<javax.ws.rs.core.MediaType> acceptContentTypes, boolean throwException, boolean recordMatchedUri)
-
getExceptionLogLevel
public static Level getExceptionLogLevel(org.apache.cxf.message.Message message, Class<? extends javax.ws.rs.WebApplicationException> exClass)
-
getRootResources
public static List<ClassResourceInfo> getRootResources(org.apache.cxf.message.Message message)
-
noResourceMethodForOptions
public static boolean noResourceMethodForOptions(javax.ws.rs.core.Response exResponse, String httpMethod)
-
createResponse
public static javax.ws.rs.core.Response createResponse(List<ClassResourceInfo> cris, org.apache.cxf.message.Message msg, String responseMessage, int status, boolean addAllow)
-
headMethodPossible
public static boolean headMethodPossible(String expectedMethod, String httpMethod)
-
getConsumeTypes
public static List<javax.ws.rs.core.MediaType> getConsumeTypes(javax.ws.rs.Consumes cm)
-
getConsumeTypes
public static List<javax.ws.rs.core.MediaType> getConsumeTypes(javax.ws.rs.Consumes cm, List<javax.ws.rs.core.MediaType> defaultTypes)
-
getProduceTypes
public static List<javax.ws.rs.core.MediaType> getProduceTypes(javax.ws.rs.Produces pm)
-
getProduceTypes
public static List<javax.ws.rs.core.MediaType> getProduceTypes(javax.ws.rs.Produces pm, List<javax.ws.rs.core.MediaType> defaultTypes)
-
compareSortedConsumesMediaTypes
public static int compareSortedConsumesMediaTypes(List<javax.ws.rs.core.MediaType> mts1, List<javax.ws.rs.core.MediaType> mts2, javax.ws.rs.core.MediaType ct)
-
compareSortedAcceptMediaTypes
public static int compareSortedAcceptMediaTypes(List<javax.ws.rs.core.MediaType> mts1, List<javax.ws.rs.core.MediaType> mts2, List<javax.ws.rs.core.MediaType> acceptTypes)
-
compareSortedMediaTypes
public static int compareSortedMediaTypes(List<javax.ws.rs.core.MediaType> mts1, List<javax.ws.rs.core.MediaType> mts2, String qs)
-
compareMethodParameters
public static int compareMethodParameters(Class<?>[] paraList1, Class<?>[] paraList2)
-
compareMediaTypes
public static int compareMediaTypes(javax.ws.rs.core.MediaType mt1, javax.ws.rs.core.MediaType mt2)
-
compareMediaTypes
public static int compareMediaTypes(javax.ws.rs.core.MediaType mt1, javax.ws.rs.core.MediaType mt2, String qs)
-
compareMediaTypesQualityFactors
public static int compareMediaTypesQualityFactors(javax.ws.rs.core.MediaType mt1, javax.ws.rs.core.MediaType mt2)
-
compareMediaTypesQualityFactors
public static int compareMediaTypesQualityFactors(javax.ws.rs.core.MediaType mt1, javax.ws.rs.core.MediaType mt2, String qs)
-
getMediaTypeQualityFactor
public static float getMediaTypeQualityFactor(String q)
-
processParameters
public static List<Object> processParameters(OperationResourceInfo ori, javax.ws.rs.core.MultivaluedMap<String,String> values, org.apache.cxf.message.Message message) throws IOException, javax.ws.rs.WebApplicationException
- Throws:
IOExceptionjavax.ws.rs.WebApplicationException
-
createHttpParameterValue
public static Object createHttpParameterValue(Parameter parameter, Class<?> parameterClass, Type genericParam, Annotation[] paramAnns, org.apache.cxf.message.Message message, javax.ws.rs.core.MultivaluedMap<String,String> values, OperationResourceInfo ori)
-
getMatrixParams
public static javax.ws.rs.core.MultivaluedMap<String,String> getMatrixParams(String path, boolean decode)
-
createBeanParamValue
public static Object createBeanParamValue(org.apache.cxf.message.Message m, Class<?> clazz, OperationResourceInfo ori)
-
getContextMessage
public static org.apache.cxf.message.Message getContextMessage(org.apache.cxf.message.Message m)
-
createContextValue
public static <T> T createContextValue(org.apache.cxf.message.Message m, Type genericType, Class<T> clazz)
-
createContextResolver
public static javax.ws.rs.ext.ContextResolver<?> createContextResolver(Type genericType, org.apache.cxf.message.Message m)
-
createResourceValue
public static Object createResourceValue(org.apache.cxf.message.Message m, Type genericType, Class<?> clazz)
-
getStructuredParams
public static javax.ws.rs.core.MultivaluedMap<String,String> getStructuredParams(String query, String sep, boolean decode, boolean decodePlus)
Retrieve map of query parameters from the passed in message- Returns:
- a Map of query parameters.
-
getStructuredParams
public static void getStructuredParams(javax.ws.rs.core.MultivaluedMap<String,String> queries, String query, String sep, boolean decode, boolean decodePlus)
-
getStructuredParams
public static void getStructuredParams(javax.ws.rs.core.MultivaluedMap<String,String> queries, String query, String sep, boolean decode, boolean decodePlus, boolean valueIsCollection)
-
readFromMessageBodyReader
public static Object readFromMessageBodyReader(List<javax.ws.rs.ext.ReaderInterceptor> readers, Class<?> targetTypeClass, Type parameterType, Annotation[] parameterAnnotations, InputStream is, javax.ws.rs.core.MediaType mediaType, org.apache.cxf.message.Message m) throws IOException, javax.ws.rs.WebApplicationException
- Throws:
IOExceptionjavax.ws.rs.WebApplicationException
-
writeMessageBody
public static void writeMessageBody(List<javax.ws.rs.ext.WriterInterceptor> writers, Object entity, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders, org.apache.cxf.message.Message message) throws javax.ws.rs.WebApplicationException, IOException
- Throws:
javax.ws.rs.WebApplicationExceptionIOException
-
matchConsumeTypes
public static boolean matchConsumeTypes(javax.ws.rs.core.MediaType requestContentType, OperationResourceInfo ori)
-
matchProduceTypes
public static boolean matchProduceTypes(javax.ws.rs.core.MediaType acceptContentType, OperationResourceInfo ori)
-
matchMimeTypes
public static boolean matchMimeTypes(javax.ws.rs.core.MediaType requestContentType, javax.ws.rs.core.MediaType acceptContentType, OperationResourceInfo ori)
-
doMimeTypesIntersect
public static boolean doMimeTypesIntersect(List<javax.ws.rs.core.MediaType> mimeTypesA, javax.ws.rs.core.MediaType mimeTypeB)
-
doMimeTypesIntersect
public static boolean doMimeTypesIntersect(List<javax.ws.rs.core.MediaType> requiredMediaTypes, List<javax.ws.rs.core.MediaType> userMediaTypes)
-
intersectMimeTypes
public static List<javax.ws.rs.core.MediaType> intersectMimeTypes(List<javax.ws.rs.core.MediaType> requiredMediaTypes, List<javax.ws.rs.core.MediaType> userMediaTypes, boolean addRequiredParamsIfPossible)
intersect two mime types- Parameters:
requiredMediaTypes-userMediaTypes-addRequiredParamsIfPossible-- Returns:
- return a list of intersected mime types
-
intersectMimeTypes
public static List<javax.ws.rs.core.MediaType> intersectMimeTypes(List<javax.ws.rs.core.MediaType> requiredMediaTypes, List<javax.ws.rs.core.MediaType> userMediaTypes, boolean addRequiredParamsIfPossible, boolean addDistanceParameter)
-
intersectMimeTypes
public static List<javax.ws.rs.core.MediaType> intersectMimeTypes(List<javax.ws.rs.core.MediaType> mimeTypesA, javax.ws.rs.core.MediaType mimeTypeB)
-
intersectMimeTypes
public static List<javax.ws.rs.core.MediaType> intersectMimeTypes(String mimeTypesA, String mimeTypesB)
-
sortMediaTypes
public static List<javax.ws.rs.core.MediaType> sortMediaTypes(String mediaTypes, String qs)
-
sortMediaTypes
public static List<javax.ws.rs.core.MediaType> sortMediaTypes(List<javax.ws.rs.core.MediaType> types, String qs)
-
convertFaultToResponse
public static <T extends Throwable> javax.ws.rs.core.Response convertFaultToResponse(T ex, org.apache.cxf.message.Message currentMessage)
-
setMessageContentType
public static void setMessageContentType(org.apache.cxf.message.Message message, javax.ws.rs.core.Response response)
-
runContainerRequestFilters
public static boolean runContainerRequestFilters(ServerProviderFactory pf, org.apache.cxf.message.Message m, boolean preMatch, Set<String> names) throws IOException
- Throws:
IOException
-
runContainerResponseFilters
public static void runContainerResponseFilters(ServerProviderFactory pf, ResponseImpl r, org.apache.cxf.message.Message m, OperationResourceInfo ori, Method invoked) throws IOException, Throwable
- Throws:
IOExceptionThrowable
-
mediaTypeToString
public static String mediaTypeToString(javax.ws.rs.core.MediaType mt, String... ignoreParams)
-
toMediaType
public static javax.ws.rs.core.MediaType toMediaType(String value)
-
toResponse
public static javax.ws.rs.core.Response toResponse(int status)
-
toResponse
public static javax.ws.rs.core.Response toResponse(javax.ws.rs.core.Response.Status status)
-
toResponseBuilder
public static javax.ws.rs.core.Response.ResponseBuilder toResponseBuilder(int status)
-
toResponseBuilder
public static javax.ws.rs.core.Response.ResponseBuilder toResponseBuilder(javax.ws.rs.core.Response.Status status)
-
fromResponse
public static javax.ws.rs.core.Response.ResponseBuilder fromResponse(javax.ws.rs.core.Response response)
-
fromResponse
public static javax.ws.rs.core.Response.ResponseBuilder fromResponse(javax.ws.rs.core.Response response, boolean copyEntity)
-
copyResponseIfNeeded
public static javax.ws.rs.core.Response copyResponseIfNeeded(javax.ws.rs.core.Response response)
-
getCurrentMessage
public static org.apache.cxf.message.Message getCurrentMessage()
-
getRootResource
public static ClassResourceInfo getRootResource(org.apache.cxf.message.Message m)
-
pushOntoStack
public static void pushOntoStack(OperationResourceInfo ori, javax.ws.rs.core.MultivaluedMap<String,String> params, org.apache.cxf.message.Message msg)
-
logMessageHandlerProblem
public static String logMessageHandlerProblem(String name, Class<?> cls, javax.ws.rs.core.MediaType ct)
-
getUriTemplate
public static String getUriTemplate(org.apache.cxf.message.Message message, ClassResourceInfo cri, OperationResourceInfo ori, OperationResourceInfo subOri)
Get path URI template, combining base path, class & method & subresource templates- Parameters:
message- message instancecri- class resource infoori- operation resource infosubOri- operation subresource info- Returns:
- the URI template for the method in question
-
getUriTemplate
public static String getUriTemplate(org.apache.cxf.message.Message message, ClassResourceInfo cri, OperationResourceInfo ori)
Get path URI template, combining base path, class & method templates- Parameters:
message- message instancecri- class resource infoori- operation resource info- Returns:
- the URI template for the method in question
-
-