Package com.adobe.granite.rest
Interface ApiResourceProviderFactory
-
@ConsumerType public interface ApiResourceProviderFactory
TheApiResourceProviderFactory
defines 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
. TheApiResourceProviderFactory
will be selected by the value returned bygetContextPath()
.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
PROVIDER_TYPE
The 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 java.lang.String
getContextPath()
Returns the context path of the ApiResourceProviderFactory under which theApiResourceProvider
will be responsible to returnresources
.ApiResourceProvider
getResourceProvider(java.lang.String rootContextPath)
Returns a newApiResourceProvider
instance.
-
-
-
Field Detail
-
PROVIDER_TYPE
static final java.lang.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
java.lang.String getContextPath()
Returns the context path of the ApiResourceProviderFactory under which theApiResourceProvider
will be responsible to returnresources
.- Returns:
- The context path this ApiResourceProviderFactory is responsible for
-
getResourceProvider
ApiResourceProvider getResourceProvider(java.lang.String rootContextPath)
Returns a newApiResourceProvider
instance.- Parameters:
rootContextPath
- The root context path of the default API servlet. By default the value is/api
.- Returns:
- A
ApiResourceProvider
.
-
-