Class JAXRSPluginApplication

java.lang.Object
jakarta.ws.rs.core.Application
org.glassfish.jersey.server.ResourceConfig
org.pentaho.platform.web.servlet.jersey.JAXRSPluginApplication
All Implemented Interfaces:
jakarta.ws.rs.core.Configurable<org.glassfish.jersey.server.ResourceConfig>, jakarta.ws.rs.core.Configuration, org.glassfish.jersey.ApplicationSupplier, org.glassfish.jersey.ExtendedConfig, org.glassfish.jersey.server.ServerConfig

public class JAXRSPluginApplication extends org.glassfish.jersey.server.ResourceConfig
JAXRSPluginApplication is a class that extends ResourceConfig. This can be used to configure the JAX-RS application of the Pentaho-platform Plugins. PluginDispatchServlet will create JAX-RS application of each plugin. This class will be configured as an initialization parameter for the Pentaho-platform's PluginDispatchServlet in the web.xml file.

This class can be defined as bean with packages as constructor arguments in plugin.spring.xml of a plugin if there are any resources package to be scanned for jersey resources.
For Example:
     <bean class="org.pentaho.platform.web.servlet.jersey.JAXRSPluginApplication">
        <constructor-arg>
            <list>
                <value>org.pentaho</value>
            </list>
        </constructor-arg>
     </bean>
 
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    If a plugin has a use-case of customizing JAX-RS application, it can use this bean name to refer to the JAX-RS application to create bean.
  • Constructor Summary

    Constructors
    Constructor
    Description
    The constructor for the JAXRSPluginApplication class.
  • Method Summary

    Methods inherited from class org.glassfish.jersey.server.ResourceConfig

    addProperties, files, files, forApplication, forApplicationClass, forApplicationClass, getApplication, getApplicationName, getApplicationPath, getClasses, getClassLoader, getConfiguration, getContracts, getInstances, getProperties, getProperty, getPropertyNames, getResources, getRuntimeType, getSingletons, hasProperty, isEnabled, isEnabled, isProperty, isRegistered, isRegistered, packages, packages, packages, property, register, register, register, register, register, register, register, register, registerClasses, registerClasses, registerFinder, registerInstances, registerInstances, registerResources, registerResources, setApplicationName, setClassLoader, setProperties

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • APP_BEAN_NAME

      public static final String APP_BEAN_NAME
      If a plugin has a use-case of customizing JAX-RS application, it can use this bean name to refer to the JAX-RS application to create bean.
      See Also:
  • Constructor Details

    • JAXRSPluginApplication

      public JAXRSPluginApplication(String[] packages)

      The constructor for the JAXRSPluginApplication class. This constructor can be used for setting up the necessary configurations for the JAX-RS application. It does this by registering the necessary packages and features.


      Jersey application will scan packages automatically based on the beans defined in the plugin.spring.xml file for the jersey resources. In case if any package missed, then the plugin has to do the bean definition for the app

      Following features are registered as part of Platform Jersey application initialization.

    • MultiPartFeature : Provides support for handling multipart requests.