Package org.apache.cxf.jaxrs.utils
Class ResourceUtils
- java.lang.Object
-
- org.apache.cxf.jaxrs.utils.ResourceUtils
-
public final class ResourceUtils extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static JAXRSServerFactoryBeancreateApplication(javax.ws.rs.core.Application app, boolean ignoreAppPath, boolean staticSubresourceResolution, boolean useSingletonResourceProvider, org.apache.cxf.Bus bus)static ClassResourceInfocreateClassResourceInfo(Class<?> rClass, Class<?> sClass, boolean root, boolean enableStatic)static ClassResourceInfocreateClassResourceInfo(Class<?> rClass, Class<?> sClass, boolean root, boolean enableStatic, org.apache.cxf.Bus bus)static ClassResourceInfocreateClassResourceInfo(Class<?> rClass, Class<?> sClass, ClassResourceInfo parent, boolean root, boolean enableStatic, org.apache.cxf.Bus bus)static ClassResourceInfocreateClassResourceInfo(Class<?> rClass, Class<?> sClass, ClassResourceInfo parent, boolean root, boolean enableStatic, org.apache.cxf.Bus bus, List<javax.ws.rs.core.MediaType> defaultConsumes, List<javax.ws.rs.core.MediaType> defaultProduces)static ClassResourceInfocreateClassResourceInfo(Map<String,UserResource> resources, UserResource model, Class<?> defaultClass, boolean isRoot, boolean enableStatic, org.apache.cxf.Bus bus)static Object[]createConstructorArguments(Constructor<?> c, org.apache.cxf.message.Message m, boolean perRequest)static Object[]createConstructorArguments(Constructor<?> c, org.apache.cxf.message.Message m, boolean perRequest, Map<Class<?>,Object> contextValues)static Object[]createConstructorArguments(Constructor<?> c, org.apache.cxf.message.Message m, boolean perRequest, Map<Class<?>,Object> contextValues, Class<?>[] params, Annotation[][] anns, Type[] genericTypes)static org.apache.cxf.feature.FeaturecreateFeatureInstance(Class<? extends org.apache.cxf.feature.Feature> cls)static ObjectcreateProviderInstance(Class<?> cls)static ClassResourceInfocreateServiceClassResourceInfo(Map<String,UserResource> resources, UserResource model, Class<?> sClass, boolean isRoot, boolean enableStatic, org.apache.cxf.Bus bus)static MethodfindPostConstructMethod(Class<?> c)static MethodfindPostConstructMethod(Class<?> c, String name)static MethodfindPreDestroyMethod(Class<?> c)static MethodfindPreDestroyMethod(Class<?> c, String name)static Constructor<?>findResourceConstructor(Class<?> resourceClass, boolean perRequest)static Class<?>getActualJaxbType(Class<?> type, Method resourceMethod, boolean inbound)static ResourceTypesgetAllRequestResponseTypes(List<ClassResourceInfo> cris, boolean jaxbOnly)static ResourceTypesgetAllRequestResponseTypes(List<ClassResourceInfo> cris, boolean jaxbOnly, javax.ws.rs.ext.MessageBodyWriter<?> jaxbWriter)static InputStreamgetClasspathResourceStream(String path, Class<?> callingClass, org.apache.cxf.Bus bus)static URLgetClasspathResourceURL(String path, Class<?> callingClass, org.apache.cxf.Bus bus)static ParametergetParameter(int index, Annotation[] anns, Class<?> type)static List<Parameter>getParameters(Method resourceMethod)static <T> TgetResource(String path, Class<T> resourceClass, org.apache.cxf.Bus bus)static List<UserResource>getResourcesFromElement(Element modelEl)static InputStreamgetResourceStream(String loc, org.apache.cxf.Bus bus)static URLgetResourceURL(String loc, org.apache.cxf.Bus bus)static List<UserResource>getUserResources(InputStream is)static List<UserResource>getUserResources(String loc)static List<UserResource>getUserResources(String loc, org.apache.cxf.Bus bus)static booleanisValidResourceClass(Class<?> c)static PropertiesloadProperties(String propertiesLocation, org.apache.cxf.Bus bus)static javax.ws.rs.ApplicationPathlocateApplicationPath(Class<?> appClass)
-
-
-
Method Detail
-
createClassResourceInfo
public static ClassResourceInfo createClassResourceInfo(Map<String,UserResource> resources, UserResource model, Class<?> defaultClass, boolean isRoot, boolean enableStatic, org.apache.cxf.Bus bus)
-
createServiceClassResourceInfo
public static ClassResourceInfo createServiceClassResourceInfo(Map<String,UserResource> resources, UserResource model, Class<?> sClass, boolean isRoot, boolean enableStatic, org.apache.cxf.Bus bus)
-
createClassResourceInfo
public static ClassResourceInfo createClassResourceInfo(Class<?> rClass, Class<?> sClass, boolean root, boolean enableStatic)
-
createClassResourceInfo
public static ClassResourceInfo createClassResourceInfo(Class<?> rClass, Class<?> sClass, boolean root, boolean enableStatic, org.apache.cxf.Bus bus)
-
createClassResourceInfo
public static ClassResourceInfo createClassResourceInfo(Class<?> rClass, Class<?> sClass, ClassResourceInfo parent, boolean root, boolean enableStatic, org.apache.cxf.Bus bus)
-
createClassResourceInfo
public static ClassResourceInfo createClassResourceInfo(Class<?> rClass, Class<?> sClass, ClassResourceInfo parent, boolean root, boolean enableStatic, org.apache.cxf.Bus bus, List<javax.ws.rs.core.MediaType> defaultConsumes, List<javax.ws.rs.core.MediaType> defaultProduces)
-
findResourceConstructor
public static Constructor<?> findResourceConstructor(Class<?> resourceClass, boolean perRequest)
-
getParameter
public static Parameter getParameter(int index, Annotation[] anns, Class<?> type)
-
getUserResources
public static List<UserResource> getUserResources(String loc, org.apache.cxf.Bus bus)
-
getResourceStream
public static InputStream getResourceStream(String loc, org.apache.cxf.Bus bus) throws IOException
- Throws:
IOException
-
getResourceURL
public static URL getResourceURL(String loc, org.apache.cxf.Bus bus) throws IOException
- Throws:
IOException
-
getClasspathResourceStream
public static InputStream getClasspathResourceStream(String path, Class<?> callingClass, org.apache.cxf.Bus bus)
-
getClasspathResourceURL
public static URL getClasspathResourceURL(String path, Class<?> callingClass, org.apache.cxf.Bus bus)
-
getResource
public static <T> T getResource(String path, Class<T> resourceClass, org.apache.cxf.Bus bus)
-
loadProperties
public static Properties loadProperties(String propertiesLocation, org.apache.cxf.Bus bus) throws IOException
- Throws:
IOException
-
getUserResources
public static List<UserResource> getUserResources(String loc)
-
getUserResources
public static List<UserResource> getUserResources(InputStream is) throws Exception
- Throws:
Exception
-
getResourcesFromElement
public static List<UserResource> getResourcesFromElement(Element modelEl)
-
getAllRequestResponseTypes
public static ResourceTypes getAllRequestResponseTypes(List<ClassResourceInfo> cris, boolean jaxbOnly)
-
getAllRequestResponseTypes
public static ResourceTypes getAllRequestResponseTypes(List<ClassResourceInfo> cris, boolean jaxbOnly, javax.ws.rs.ext.MessageBodyWriter<?> jaxbWriter)
-
getActualJaxbType
public static Class<?> getActualJaxbType(Class<?> type, Method resourceMethod, boolean inbound)
-
createConstructorArguments
public static Object[] createConstructorArguments(Constructor<?> c, org.apache.cxf.message.Message m, boolean perRequest)
-
createConstructorArguments
public static Object[] createConstructorArguments(Constructor<?> c, org.apache.cxf.message.Message m, boolean perRequest, Map<Class<?>,Object> contextValues)
-
createConstructorArguments
public static Object[] createConstructorArguments(Constructor<?> c, org.apache.cxf.message.Message m, boolean perRequest, Map<Class<?>,Object> contextValues, Class<?>[] params, Annotation[][] anns, Type[] genericTypes)
-
createApplication
public static JAXRSServerFactoryBean createApplication(javax.ws.rs.core.Application app, boolean ignoreAppPath, boolean staticSubresourceResolution, boolean useSingletonResourceProvider, org.apache.cxf.Bus bus)
-
createFeatureInstance
public static org.apache.cxf.feature.Feature createFeatureInstance(Class<? extends org.apache.cxf.feature.Feature> cls)
-
isValidResourceClass
public static boolean isValidResourceClass(Class<?> c)
-
locateApplicationPath
public static javax.ws.rs.ApplicationPath locateApplicationPath(Class<?> appClass)
-
-