Package com.adobe.granite.rest
Interface ApiResourceProviderFactory
The
ApiResourceProviderFactory defines the service interface to get
and create ApiResourceProviders's dynamically on a per usage base.
Implementations of this interface must be defined as OSGi services and define
a service registration property
PROVIDER_TYPE. The
ApiResourceProviderFactory will be selected by the value returned by
getContextPath().
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe name of the service registration property containing the API type this provider is registered with (value is "provider.type"). -
Method Summary
Modifier and TypeMethodDescriptionReturns the context path of the ApiResourceProviderFactory under which theApiResourceProviderwill be responsible to returnresources.getResourceProvider(String rootContextPath) Returns a newApiResourceProviderinstance.
-
Field Details
-
PROVIDER_TYPE
The name of the service registration property containing the API type this provider is registered with (value is "provider.type").- See Also:
-
-
Method Details
-
getContextPath
String getContextPath()Returns the context path of the ApiResourceProviderFactory under which theApiResourceProviderwill be responsible to returnresources.- Returns:
- The context path this ApiResourceProviderFactory is responsible for
-
getResourceProvider
Returns a newApiResourceProviderinstance.- Parameters:
rootContextPath- The root context path of the default API servlet. By default the value is/api.- Returns:
- A
ApiResourceProvider.
-