Package com.adobe.granite.rest
Interface ApiResourceProviderFactory
-
@ConsumerType public interface ApiResourceProviderFactory
TheApiResourceProviderFactorydefines the service interface to get and createApiResourceProviders'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. TheApiResourceProviderFactorywill be selected by the value returned bygetContextPath().
-
-
Field Summary
Fields Modifier and Type Field Description static StringPROVIDER_TYPEThe name of the service registration property containing the API type this provider is registered with (value is "provider.type").
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetContextPath()Returns the context path of the ApiResourceProviderFactory under which theApiResourceProviderwill be responsible to returnresources.ApiResourceProvidergetResourceProvider(String rootContextPath)Returns a newApiResourceProviderinstance.
-
-
-
Field Detail
-
PROVIDER_TYPE
static final String PROVIDER_TYPE
The name of the service registration property containing the API type this provider is registered with (value is "provider.type").- See Also:
- Constant Field Values
-
-
Method Detail
-
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
ApiResourceProvider getResourceProvider(String rootContextPath)
Returns a newApiResourceProviderinstance.- Parameters:
rootContextPath- The root context path of the default API servlet. By default the value is/api.- Returns:
- A
ApiResourceProvider.
-
-