public class ComponentDefaultProviderImpl extends Object implements ComponentDefaultProvider
Constructor and Description |
---|
ComponentDefaultProviderImpl(PropertyAccess propertyAccess,
BindingSource bindingSource,
ValueEncoderSource valueEncoderSource,
FieldTranslatorSource fieldTranslatorSource,
FieldValidatorDefaultSource fieldValidatorDefaultSource) |
Modifier and Type | Method and Description |
---|---|
Binding |
defaultBinding(String parameterName,
ComponentResources resources)
Checks to see if the container of the component (identified by its resources) contains a property matching the
component's id.
|
String |
defaultLabel(ComponentResources resources)
Computes the default label for the component (which will generally be a
Field ). |
FieldTranslator |
defaultTranslator(String parameterName,
ComponentResources resources)
Provides a translator based on the bound parameter type, if possible.
|
Binding |
defaultTranslatorBinding(String parameterName,
ComponentResources resources)
Provides a binding that itself provides the field translator.
|
FieldValidator |
defaultValidator(String parameterName,
ComponentResources resources)
Provides a validator based on the bound parameter type.
|
Binding |
defaultValidatorBinding(String parameterName,
ComponentResources resources)
Provides a binding that itself provides the field translator.
|
ValueEncoder |
defaultValueEncoder(String parameterName,
ComponentResources resources)
Gets or creates a value encoder based on the type of the named parameter.
|
public ComponentDefaultProviderImpl(PropertyAccess propertyAccess, BindingSource bindingSource, ValueEncoderSource valueEncoderSource, FieldTranslatorSource fieldTranslatorSource, FieldValidatorDefaultSource fieldValidatorDefaultSource)
public String defaultLabel(ComponentResources resources)
ComponentDefaultProvider
Field
).defaultLabel
in interface ComponentDefaultProvider
ComponentResourcesCommon.getId()
.public Binding defaultBinding(String parameterName, ComponentResources resources)
ComponentDefaultProvider
Field
's
value parameter (or equivalent).defaultBinding
in interface ComponentDefaultProvider
parameterName
- the name of the parameterresources
- the resources of the component for which a binding is neededpublic ValueEncoder defaultValueEncoder(String parameterName, ComponentResources resources)
ComponentDefaultProvider
defaultValueEncoder
in interface ComponentDefaultProvider
parameterName
- the name of the parameter whose type is used to locate a ValueEncoderFactory
resources
- the resources of the component, from which parameter and its type are extractedpublic FieldTranslator defaultTranslator(String parameterName, ComponentResources resources)
ComponentDefaultProvider
defaultTranslator
in interface ComponentDefaultProvider
public Binding defaultTranslatorBinding(String parameterName, ComponentResources resources)
ComponentDefaultProvider
defaultTranslatorBinding
in interface ComponentDefaultProvider
FieldTranslator
public FieldValidator defaultValidator(String parameterName, ComponentResources resources)
ComponentDefaultProvider
defaultValidator
in interface ComponentDefaultProvider
public Binding defaultValidatorBinding(String parameterName, ComponentResources resources)
ComponentDefaultProvider
defaultValidatorBinding
in interface ComponentDefaultProvider
FieldTranslator
${project.version} - Copyright © 2003-2015 The Apache Software Foundation.