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 ClassResourceInfo createClassResourceInfo(Class<?> rClass, Class<?> sClass, boolean root, boolean enableStatic)
           
static ClassResourceInfo createClassResourceInfo(Map<String,UserResource> resources, UserResource model, boolean isRoot, boolean enableStatic)
           
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)
           
static Method findPostConstructMethod(Class<?> c)
           
static Method findPreDestroyMethod(Class<?> c)
           
static Constructor findResourceConstructor(Class<?> resourceClass, boolean perRequest)
           
static Map<Class<?>,Type> getAllRequestResponseTypes(List<ClassResourceInfo> cris, boolean jaxbOnly)
           
static InputStream getClasspathResourceStream(String path, Class<?> callingClass, Bus bus)
           
static Parameter getParameter(int index, Annotation[] anns)
           
static List<Parameter> getParameters(Method resourceMethod)
           
static List<UserResource> getResourcesFromElement(Element modelEl)
           
static InputStream getResourceStream(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)

createServiceClassResourceInfo

public static ClassResourceInfo createServiceClassResourceInfo(Map<String,UserResource> resources,
                                                               UserResource model,
                                                               Class<?> sClass,
                                                               boolean isRoot,
                                                               boolean enableStatic)

createClassResourceInfo

public static ClassResourceInfo createClassResourceInfo(Class<?> rClass,
                                                        Class<?> sClass,
                                                        boolean root,
                                                        boolean enableStatic)

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)

getUserResources

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

getResourceStream

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

getClasspathResourceStream

public static InputStream getClasspathResourceStream(String path,
                                                     Class<?> callingClass,
                                                     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 Map<Class<?>,Type> getAllRequestResponseTypes(List<ClassResourceInfo> cris,
                                                            boolean jaxbOnly)

createConstructorArguments

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

createApplication

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

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