Class AbstractMoneyFieldPersistenceProvider
java.lang.Object
org.broadleafcommerce.openadmin.server.service.persistence.module.provider.AbstractFieldPersistenceProvider
org.broadleafcommerce.openadmin.server.service.persistence.module.provider.FieldPersistenceProviderAdapter
org.broadleafcommerce.openadmin.server.service.persistence.module.provider.AbstractMoneyFieldPersistenceProvider
- All Implemented Interfaces:
FieldPersistenceProvider,org.springframework.core.Ordered
- Direct Known Subclasses:
MoneyFieldPersistenceProvider
Abstract persistence provider that provides a method to actually handle formatting moneys.
- Author:
- Andre Azzolini (apazzolini)
-
Field Summary
Fields inherited from interface org.broadleafcommerce.openadmin.server.service.persistence.module.provider.FieldPersistenceProvider
BASIC, HTML, MAP_FIELD, MEDIA, MONEY, RULEFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract booleancanHandleExtraction(ExtractValueRequest extractValueRequest, Property property) extractValue(ExtractValueRequest extractValueRequest, Property property) Retrieve the property value from the requestedValue field from the request.protected StringformatDisplayValue(BigDecimal value, ExtractValueRequest extractValueRequest, Property property) protected StringformatValue(BigDecimal value, ExtractValueRequest extractValueRequest, Property property) protected abstract CurrencygetCurrency(ExtractValueRequest extractValueRequest, Property property) protected abstract LocalegetLocale(ExtractValueRequest extractValueRequest, Property property) Methods inherited from class org.broadleafcommerce.openadmin.server.service.persistence.module.provider.FieldPersistenceProviderAdapter
addSearchMapping, checkDirtyState, filterProperties, getOrder, isFieldDirty, populateValue, setNonDisplayableValuesMethods inherited from class org.broadleafcommerce.openadmin.server.service.persistence.module.provider.AbstractFieldPersistenceProvider
alwaysRun, buildFieldInfo, canHandlePopulateNull, getListFieldType, getMapFieldType
-
Constructor Details
-
AbstractMoneyFieldPersistenceProvider
public AbstractMoneyFieldPersistenceProvider()
-
-
Method Details
-
extractValue
public MetadataProviderResponse extractValue(ExtractValueRequest extractValueRequest, Property property) throws PersistenceException Description copied from interface:FieldPersistenceProviderRetrieve the property value from the requestedValue field from the request. Implementations should translate the requestedValue and set on the property parameter. The requestedValue is the field value taken from the JPA managed entity instance. You are taking this field value and converting it into a string representation appropriate for the property instance parameter. Used during admin fetch events.- Specified by:
extractValuein interfaceFieldPersistenceProvider- Overrides:
extractValuein classFieldPersistenceProviderAdapter- Parameters:
extractValueRequest- contains the requested value and support classes.property- the property for the admin that will contain the information harvested from the persistence value- Returns:
- whether or not the implementation handled the persistence request
- Throws:
PersistenceException
-
formatValue
protected String formatValue(BigDecimal value, ExtractValueRequest extractValueRequest, Property property) -
formatDisplayValue
protected String formatDisplayValue(BigDecimal value, ExtractValueRequest extractValueRequest, Property property) -
canHandleExtraction
protected abstract boolean canHandleExtraction(ExtractValueRequest extractValueRequest, Property property) -
getLocale
-
getCurrency
-