Interface URIProvider
-
@ProviderType public interface URIProvider
Provides a URI in exchange for a Resource. Typically the Resource will represent something where is a URI is valiable and usefull. Implementations of this interface must ensure that the any underlying security model is delegated securely and not circumvented. Typically resource provider bundles should implement this provider as in most cases internal implementation details of the resource will be required to achieve the implementation. Ideally implementations should be carefully reviewed by peers.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
URIProvider.Operation
Defines which operation the URI may be used to perform.static class
URIProvider.Scope
Defines the scope in which the URI may be used.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @NotNull java.net.URI
toURI(@NotNull Resource resource, URIProvider.Scope scope, URIProvider.Operation operation)
Return a URI applicable to the defined scope.
-
-
-
Method Detail
-
toURI
@NotNull @NotNull java.net.URI toURI(@NotNull @NotNull Resource resource, @NotNull URIProvider.Scope scope, @NotNull URIProvider.Operation operation)
Return a URI applicable to the defined scope.- Parameters:
resource
- the resource to convert from.scope
- the required scope.operation
- the required operation.- Returns:
- a URI if the resource has a URI suitable for the requested scope and operation, otherwise the implementation should throw an IlleagalArgumentException.
- Throws:
java.lang.IllegalArgumentException
- if a URI for the requested scope and operation cannot be provided to the caller.
-
-