Class DefaultFieldPersistenceProvider
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.DefaultFieldPersistenceProvider
- All Implemented Interfaces:
FieldPersistenceProvider,org.springframework.core.Ordered
@Component("blDefaultFieldPersistenceProvider")
@Scope("prototype")
public class DefaultFieldPersistenceProvider
extends FieldPersistenceProviderAdapter
- Author:
- Jeff Fischer
-
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 TypeMethodDescriptionextractValue(ExtractValueRequest extractValueRequest, Property property) Retrieve the property value from the requestedValue field from the request.populateValue(PopulateValueRequest populateValueRequest, Serializable instance) Set the property value on the target object.Methods inherited from class org.broadleafcommerce.openadmin.server.service.persistence.module.provider.FieldPersistenceProviderAdapter
addSearchMapping, checkDirtyState, filterProperties, getOrder, isFieldDirty, setNonDisplayableValuesMethods inherited from class org.broadleafcommerce.openadmin.server.service.persistence.module.provider.AbstractFieldPersistenceProvider
alwaysRun, buildFieldInfo, canHandlePopulateNull, getListFieldType, getMapFieldType
-
Constructor Details
-
DefaultFieldPersistenceProvider
public DefaultFieldPersistenceProvider()
-
-
Method Details
-
populateValue
public MetadataProviderResponse populateValue(PopulateValueRequest populateValueRequest, Serializable instance) throws PersistenceException Description copied from interface:FieldPersistenceProviderSet the property value on the target object. Implementations should translate the requestedValue field from the request and set on the instance parameter. You are basically taking the string value submitted by the admin application and converting it into the format required to set on the target field of instance (which should be a JPA managed entity). Used during admin create and update events.- Specified by:
populateValuein interfaceFieldPersistenceProvider- Overrides:
populateValuein classFieldPersistenceProviderAdapter- Parameters:
populateValueRequest- contains the requested value and support classes.instance- the persistence entity instance on which to set the value harvested from the request- Returns:
- whether or not the implementation handled the persistence request
- Throws:
PersistenceException
-
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
-