Interface ConfluenceWebResourceService

  • All Known Implementing Classes:
    DefaultConfluenceWebResourceService

    public interface ConfluenceWebResourceService
    Provides services related to writing Confluence html resource tags.

    This service is meant to replace ConfluenceWebResourceManager that implements the now deprecated WebResourceManager interface.

    Since:
    5.5
    • Method Detail

      • writeConfluenceResourceTags

        void writeConfluenceResourceTags​(@NonNull Writer writer,
                                         @Nullable ConfluenceWebResourceService.Style style,
                                         @Nullable String spaceKey)
        Write all html resource tags to the given writer.

        Internally Web Resources module is used to output most of the resources, with some Confluence theme specific resources added to the mix.

        Parameters:
        writer - writer to write the tags to
        style - style to apply if any
        spaceKey - current space if any
      • computeConfluenceResourceUris

        @Deprecated
        Map<ResourceType,​Iterable<String>> computeConfluenceResourceUris​(com.atlassian.fugue.Option<ConfluenceWebResourceService.Style> style,
                                                                               com.atlassian.fugue.Option<String> spaceKey)
        Computes the resource uris required by the given space. If null is given for spaceKey, then this method will not take space styles into account.
        Parameters:
        style - style to apply, or none() if not displaying an admin page.
        spaceKey - current space or none() if not displaying in the context of a space
        Returns:
        a map of resource types to the list of uris of that type. The list of uris should be in a deterministic, and correct order.
      • calculateConfluenceResourceUris

        default Map<ResourceType,​Iterable<String>> calculateConfluenceResourceUris​(@Nullable ConfluenceWebResourceService.Style style,
                                                                                         @Nullable String spaceKey)
        Computes the resource uris required by the given space. If null is given for spaceKey, then this method will not take space styles into account.
        Parameters:
        style - style to apply, or null if not displaying an admin page.
        spaceKey - current space or null if not displaying in the context of a space
        Returns:
        a map of resource types to the list of uris of that type. The list of uris should be in a deterministic, and correct order.
        Since:
        7.0.1