Apache CXF API

org.apache.cxf.jaxrs.utils
Class ResourceUtils

java.lang.Object
  extended by org.apache.cxf.jaxrs.utils.ResourceUtils

public final class ResourceUtils
extends Object


Method Summary
static JAXRSServerFactoryBean createApplication(javax.ws.rs.core.Application app, boolean ignoreAppPath)
           
static JAXRSServerFactoryBean createApplication(javax.ws.rs.core.Application app, boolean ignoreAppPath, boolean staticSubresourceResolution)
           
static ClassResourceInfo createClassResourceInfo(Class<?> rClass, Class<?> sClass, boolean root, boolean enableStatic)
           
static ClassResourceInfo createClassResourceInfo(Class<?> rClass, Class<?> sClass, boolean root, boolean enableStatic, Bus bus)
           
static ClassResourceInfo createClassResourceInfo(Map<String,UserResource> resources, UserResource model, boolean isRoot, boolean enableStatic)
           
static ClassResourceInfo createClassResourceInfo(Map<String,UserResource> resources, UserResource model, boolean isRoot, boolean enableStatic, Bus bus)
           
static Object[] createConstructorArguments(Constructor<?> c, Message m)
           
static javax.xml.bind.JAXBContext createJaxbContext(Set<Class<?>> classes, Class<?>[] extraClass, Map<String,Object> contextProperties)
           
static ClassResourceInfo createServiceClassResourceInfo(Map<String,UserResource> resources, UserResource model, Class<?> sClass, boolean isRoot, boolean enableStatic, Bus bus)
           
static Method findPostConstructMethod(Class<?> c)
           
static Method findPreDestroyMethod(Class<?> c)
           
static Constructor<?> findResourceConstructor(Class<?> resourceClass, boolean perRequest)
           
static Class<?> getActualJaxbType(Class<?> type, Method resourceMethod, boolean inbound)
           
static ResourceTypes getAllRequestResponseTypes(List<ClassResourceInfo> cris, boolean jaxbOnly)
           
static InputStream getClasspathResourceStream(String path, Class<?> callingClass, Bus bus)
           
static URL getClasspathResourceURL(String path, Class<?> callingClass, Bus bus)
           
static Parameter getParameter(int index, Annotation[] anns, Class<?> type)
           
static List<Parameter> getParameters(Method resourceMethod)
           
static
<T> T
getResource(String path, Class<T> resourceClass, Bus bus)
           
static List<UserResource> getResourcesFromElement(Element modelEl)
           
static InputStream getResourceStream(String loc, Bus bus)
           
static URL getResourceURL(String loc, Bus bus)
           
static List<UserResource> getUserResources(InputStream is)
           
static List<UserResource> getUserResources(String loc)
           
static List<UserResource> getUserResources(String loc, Bus bus)
           
static boolean isValidResourceClass(Class<?> c)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

findPostConstructMethod

public static Method findPostConstructMethod(Class<?> c)

findPreDestroyMethod

public static Method findPreDestroyMethod(Class<?> c)

createClassResourceInfo

public static ClassResourceInfo createClassResourceInfo(Map<String,UserResource> resources,
                                                        UserResource model,
                                                        boolean isRoot,
                                                        boolean enableStatic)

createClassResourceInfo

public static ClassResourceInfo createClassResourceInfo(Map<String,UserResource> resources,
                                                        UserResource model,
                                                        boolean isRoot,
                                                        boolean enableStatic,
                                                        Bus bus)

createServiceClassResourceInfo

public static ClassResourceInfo createServiceClassResourceInfo(Map<String,UserResource> resources,
                                                               UserResource model,
                                                               Class<?> sClass,
                                                               boolean isRoot,
                                                               boolean enableStatic,
                                                               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,
                                                        Bus bus)

findResourceConstructor

public static Constructor<?> findResourceConstructor(Class<?> resourceClass,
                                                     boolean perRequest)

getParameters

public static List<Parameter> getParameters(Method resourceMethod)

getParameter

public static Parameter getParameter(int index,
                                     Annotation[] anns,
                                     Class<?> type)

getUserResources

public static List<UserResource> getUserResources(String loc,
                                                  Bus bus)

getResourceStream

public static InputStream getResourceStream(String loc,
                                            Bus bus)
                                     throws Exception
Throws:
Exception

getResourceURL

public static URL getResourceURL(String loc,
                                 Bus bus)
                          throws Exception
Throws:
Exception

getClasspathResourceStream

public static InputStream getClasspathResourceStream(String path,
                                                     Class<?> callingClass,
                                                     Bus bus)

getClasspathResourceURL

public static URL getClasspathResourceURL(String path,
                                          Class<?> callingClass,
                                          Bus bus)

getResource

public static <T> T getResource(String path,
                                Class<T> resourceClass,
                                Bus bus)

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)

getActualJaxbType

public static Class<?> getActualJaxbType(Class<?> type,
                                         Method resourceMethod,
                                         boolean inbound)

createConstructorArguments

public static Object[] createConstructorArguments(Constructor<?> c,
                                                  Message m)

createApplication

public static JAXRSServerFactoryBean createApplication(javax.ws.rs.core.Application app,
                                                       boolean ignoreAppPath)

createApplication

public static JAXRSServerFactoryBean createApplication(javax.ws.rs.core.Application app,
                                                       boolean ignoreAppPath,
                                                       boolean staticSubresourceResolution)

isValidResourceClass

public static boolean isValidResourceClass(Class<?> c)

createJaxbContext

public static javax.xml.bind.JAXBContext createJaxbContext(Set<Class<?>> classes,
                                                           Class<?>[] extraClass,
                                                           Map<String,Object> contextProperties)

Apache CXF API

Apache CXF