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 Summary
Modifier and TypeMethodDescriptionstatic WebResourcePackage
combine
(@NonNull WebResourcePackage original, @NonNull WebResourcePackage extension) Create a new package that combines two others: it first installs theoriginal
and then theextension
.void
install
(WebResourceRegistry registry) Install the resources contained in the package in the registry.static WebResourcePackage
of
(@NonNull Collection<WebResourceRule> rules) Create a new package that executes the specified rules upon installation.static WebResourcePackage
of
(WebResourceRule... rules) Create a new package that executes the specified rules upon installation.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
-
Method Details
-
install
Install the resources contained in the package in the registry.- Parameters:
registry
- Registry to which to add the resources.
-
uninstall
Deprecated.since 3.2.0 as the ability to uninstall is rarely needed and requires knowledge of the exact previous state of a registryUninstall the package from the given registry.- Parameters:
registry
- Registry where the package resource should be removed.
-
of
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
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 theoriginal
and then theextension
.- Parameters:
original
- package to installextension
- package to install after the original- Returns:
- package combine both
-