Class AbstractJAXRSFactoryBean

    • Constructor Detail

    • Method Detail

      • getServiceFactory

        public JAXRSServiceFactoryBean getServiceFactory()
        Returns the service factory
        Returns:
        the factory
      • setServiceFactory

        public void setServiceFactory​(JAXRSServiceFactoryBean serviceFactory)
        Sets the custom service factory which processes the registered classes and providers
        Parameters:
        serviceFactory - the factory
      • setSchemaLocation

        public void setSchemaLocation​(String schema)
        Sets the location of the schema which can be used to validate the incoming XML or JAXB-driven JSON. JAX-RS MessageBodyReader implementations which have the setSchemaLocations method accepting a list of schema locations will be injected with this value.
        Parameters:
        schema - the schema location
      • setSchemaLocations

        public void setSchemaLocations​(List<String> schemas)
        Sets the locations of the schemas which can be used to validate the incoming XML or JAXB-driven JSON. JAX-RS MessageBodyReader implementations which have the setSchemaLocations method accepting a list of schema locations will be injected with this value. For example, if A.xsd imports B.xsd then both A.xsd and B.xsd need to be referenced.
        Parameters:
        schemas - the schema locations
      • getProviders

        public List<?> getProviders()
        Returns:
        the list of custom JAX-RS providers
      • setProviders

        public void setProviders​(List<? extends Object> providers)
        Add custom JAX-RS providers to the list of providers
        Parameters:
        providers - the entity providers
      • setProvider

        public void setProvider​(Object provider)
        Add custom JAX-RS provider to the list of providers
        Parameters:
        provider - the custom provider.
      • checkResources

        protected void checkResources​(boolean server)
      • isValidClassResourceInfo

        protected boolean isValidClassResourceInfo​(ClassResourceInfo cri)
      • setModelBeans

        public void setModelBeans​(UserResource... resources)
        Sets the description of root resources. Can be used to 'attach' the JAX-RS like description to the application classes without adding JAX-RS annotations.
        Parameters:
        resources - root resource descriptions
      • setModelBeans

        public void setModelBeans​(List<UserResource> resources)
        Sets the description of root resources. Can be used to 'attach' the JAX-RS like description to the application classes without adding JAX-RS annotations.
        Parameters:
        resources - root resource descriptions
      • setModelBeansWithServiceClass

        public void setModelBeansWithServiceClass​(List<UserResource> resources,
                                                  Class<?>... sClasses)
        Sets the description of root resources with the list of concrete classes. Can be used to 'attach' the JAX-RS like description to the application classes without adding JAX-RS annotations. Some models may only reference interfaces, thus providing a list of concrete classes that will be instantiated is required in such cases.
        Parameters:
        resources - root resource descriptions.
        sClasses - concrete root resource classes
      • setModelRef

        public void setModelRef​(String modelRef)
        Sets a reference to the external user model, Example: "classpath:/model/resources.xml"
        Parameters:
        modelRef - the reference to the external model resource.
      • setModelRefWithServiceClass

        public void setModelRefWithServiceClass​(String modelRef,
                                                Class<?>... sClasses)
        Sets a reference to the external user model, Example: "classpath:/model/resources.xml". Some models may only reference interfaces, thus providing a list of concrete classes that will be instantiated is required in such cases.
        Parameters:
        modelRef - the reference to the external model resource.
        sClasses - concrete root resource classes
      • setProviderComparator

        public void setProviderComparator​(Comparator<?> providerComparator)