Class VaadinResourceServiceImpl

    • Constructor Detail

      • VaadinResourceServiceImpl

        public VaadinResourceServiceImpl()
    • Method Detail

      • start

        public void start​(org.osgi.framework.BundleContext context)
                   throws Exception
        Throws:
        Exception
      • stop

        public void stop()
      • publishTheme

        public void publishTheme​(String themeName,
                                 org.osgi.service.http.HttpService httpService)
                          throws org.osgi.service.http.NamespaceException
        Description copied from interface: VaadinResourceService
        Register the theme with the given name under the VaadinResourceService versioned namespace. The theme folder is expected to be compiled and under "/VAADIN/themes/" in the calling bundle. The theme will become accessible under the url "/vaadin-x.x.x/VAADIN/themes/themeName" where x.x.x is the version of the Vaadin Shared bundle
        Specified by:
        publishTheme in interface VaadinResourceService
        Parameters:
        themeName - the name of the theme
        httpService - the HttpService instance for the calling bundle
        Throws:
        org.osgi.service.http.NamespaceException - if there is a clash during the theme registration
      • publishResource

        public void publishResource​(String resource,
                                    org.osgi.service.http.HttpService httpService)
                             throws org.osgi.service.http.NamespaceException
        Description copied from interface: VaadinResourceService
        Register the resource with the given name under the VaadinResourceService versioned namespace. The resource is expected to be under "/VAADIN/" in the calling bundle. The resource will become accessible under the url "/vaadin-x.x.x/VAADIN/" where x.x.x is the version of the Vaadin Shared bundle
        Specified by:
        publishResource in interface VaadinResourceService
        Parameters:
        resource - the name of the resource
        httpService - the HttpService instance for the calling bundle
        Throws:
        org.osgi.service.http.NamespaceException - if there is a clash during the theme registration
      • publishWidgetset

        public void publishWidgetset​(String widgetset,
                                     org.osgi.service.http.HttpService httpService)
                              throws org.osgi.service.http.NamespaceException
        Description copied from interface: VaadinResourceService
        Register the widgetset with the given name under the VaadinResourceService versioned namespace. The resource is expected to be under "/VAADIN/widgetsets" in the calling bundle. The resource will become accessible under the url "/vaadin-x.x.x/VAADIN/widgetsets" where x.x.x is the version of the Vaadin Shared bundle
        Specified by:
        publishWidgetset in interface VaadinResourceService
        Parameters:
        widgetset - the name of the resource
        httpService - the HttpService instance for the calling bundle
        Throws:
        org.osgi.service.http.NamespaceException - if there is a clash during the theme registration
      • getResourcePathPrefix

        public String getResourcePathPrefix()
        Description copied from interface: VaadinResourceService
        Returns the prefix of the versioned namespace for the resources. The result can't be null and is of the format "vaadin-x.x.x" where x.x.x the version of the Vaadin Shared bundle.
        Specified by:
        getResourcePathPrefix in interface VaadinResourceService
        Returns:
        the prefix of the resources folder managed by this service