private OSGi deployApplication()

in jax-rs.whiteboard/src/main/java/org/apache/aries/jax/rs/whiteboard/internal/Whiteboard.java [646:679]


    private OSGi<CxfJaxrsServiceRegistrator> deployApplication(
        ServiceTuple<Application> tuple,
        CachingServiceReference<ServletContextHelper> contextReference) {

        CachingServiceReference<Application> serviceReference =
            tuple.getCachingServiceReference();

        Map<String, Object> properties = getApplicationProperties(
            serviceReference);

        properties.put(
            "original.service.id",
            serviceReference.getProperty("service.id"));

        properties.put(
            "original.service.bundleid",
            serviceReference.getProperty("service.bundleid"));

        return
            getCxfExtensions(tuple.getCachingServiceReference()).
                flatMap(extensions ->
            createRegistrator(extensions, tuple, properties).
                flatMap(registrator ->
            waitForApplicationDependencies(
                tuple.getCachingServiceReference(),
                _applicationRegistry.registerService(
                    registrator, registrator.getProperties())).
                then(
            registerCXFServletService(
                    registrator.getBus(), properties, contextReference).
                then(
            just(registrator)
        ))));
    }