Interface WebResourcePackage

All Known Implementing Classes:
SimpleWebResourcePackage

public interface WebResourcePackage
Represents a collection of web resources or related rules that should be applied to a registry. A WebResourcePackage is usually identified by name in a particular package manager.
See Also:
  • Method Details

    • install

      void install(WebResourceRegistry registry)
      Install the resources contained in the package in the registry.
      Parameters:
      registry - Registry to which to add the resources.
    • uninstall

      @Deprecated default void uninstall(WebResourceRegistry registry)
      Deprecated.
      since 3.2.0 as the ability to uninstall is rarely needed and requires knowledge of the exact previous state of a registry
      Uninstall the package from the given registry.
      Parameters:
      registry - Registry where the package resource should be removed.
    • of

      static WebResourcePackage of(WebResourceRule... rules)
      Create a new package that executes the specified rules upon installation.
      Parameters:
      rules - to execute when installing the package in a registry
      Returns:
      package
    • of

      static WebResourcePackage of(@NonNull @NonNull Collection<WebResourceRule> rules)
      Create a new package that executes the specified rules upon installation.
      Parameters:
      rules - to execute when installing the package in a registry
      Returns:
      package
    • combine

      static WebResourcePackage combine(@NonNull @NonNull WebResourcePackage original, @NonNull @NonNull WebResourcePackage extension)
      Create a new package that combines two others: it first installs the original and then the extension.
      Parameters:
      original - package to install
      extension - package to install after the original
      Returns:
      package combine both