public abstract class AbstractValueFactoryProvider extends java.lang.Object implements ValueFactoryProvider
MultivaluedParameterExtractorProvider
to extract parameter
values from the supplied multivalued
parameter map
.ValueFactoryProvider.Priority, ValueFactoryProvider.PriorityType
Modifier and Type | Field and Description |
---|---|
private java.util.Set<Parameter.Source> |
compatibleSources |
private org.glassfish.hk2.api.ServiceLocator |
locator |
private MultivaluedParameterExtractorProvider |
mpep |
Modifier | Constructor and Description |
---|---|
protected |
AbstractValueFactoryProvider(MultivaluedParameterExtractorProvider mpep,
org.glassfish.hk2.api.ServiceLocator locator,
Parameter.Source... compatibleSources)
Initialize the provider.
|
Modifier and Type | Method and Description |
---|---|
protected abstract org.glassfish.hk2.api.Factory<?> |
createValueFactory(Parameter parameter)
Create a value factory for the parameter.
|
protected MultivaluedParameterExtractor<?> |
get(Parameter parameter)
Get a parameter extractor.
|
protected org.glassfish.hk2.api.ServiceLocator |
getLocator()
Get the service locator.
|
ValueFactoryProvider.PriorityType |
getPriority()
Gets the priority of this provider.
|
org.glassfish.hk2.api.Factory<?> |
getValueFactory(Parameter parameter)
Get an injected value factory for the parameter.
|
protected MultivaluedParameterExtractor<?> |
getWithoutDefaultValue(Parameter parameter)
Get a parameter extractor that ignores default value set on the parameter.
|
private final MultivaluedParameterExtractorProvider mpep
private final org.glassfish.hk2.api.ServiceLocator locator
private final java.util.Set<Parameter.Source> compatibleSources
protected AbstractValueFactoryProvider(MultivaluedParameterExtractorProvider mpep, org.glassfish.hk2.api.ServiceLocator locator, Parameter.Source... compatibleSources)
mpep
- multivalued map parameter extractor provider.locator
- HK2 service locator.compatibleSources
- compatible parameter sources.protected final MultivaluedParameterExtractor<?> getWithoutDefaultValue(Parameter parameter)
parameter
- parameter supported by the returned extractor.get(org.glassfish.jersey.server.model.Parameter)
protected final MultivaluedParameterExtractor<?> get(Parameter parameter)
getWithoutDefaultValue(org.glassfish.jersey.server.model.Parameter)
method, the extractor returned from this method will use the default value
set on the parameter, in case the parameter is not found in the supplied
multivalued parameter map
.parameter
- parameter supported by the returned extractor.protected abstract org.glassfish.hk2.api.Factory<?> createValueFactory(Parameter parameter)
null
in case
the parameter is not supported by the value factory provider.parameter
- parameter requesting the value factory instance.null
if parameter is
not supported.public final org.glassfish.hk2.api.Factory<?> getValueFactory(Parameter parameter)
null
in case the parameter is not supported by the value factory provider.getValueFactory
in interface ValueFactoryProvider
parameter
- parameter requesting the value factory instance.null
if parameter
is not supported.public ValueFactoryProvider.PriorityType getPriority()
ValueFactoryProvider
getPriority
in interface ValueFactoryProvider
ValueFactoryProvider.PriorityType
,
ValueFactoryProvider.Priority
protected final org.glassfish.hk2.api.ServiceLocator getLocator()