Interface AdornedTargetAutoPopulateExtensionHandler
- All Superinterfaces:
ExtensionHandler
Extension handler for methods present in
AdminBasicEntityController.- Author:
- Jeff Fischer
-
Method Summary
Modifier and TypeMethodDescriptionautoSetAdornedTargetManagedFields(FieldMetadata md, String mainClassName, String id, String collectionField, String collectionItemId, Map<String, Object> managedFields) Provides a hook for automatically setting the values for one or more adorned target collection managed fields.validateSubmittedAdornedTargetManagedFields(Entity entity, Serializable instance, Map<String, FieldMetadata> entityFieldMetadata, BasicFieldMetadata propertyMetadata, String propertyName, String value, ExtensionResultHolder<Boolean> validationResult) Provide validation during persistence.Methods inherited from interface org.broadleafcommerce.common.extension.ExtensionHandler
getPriority, isEnabled
-
Method Details
-
autoSetAdornedTargetManagedFields
ExtensionResultStatusType autoSetAdornedTargetManagedFields(FieldMetadata md, String mainClassName, String id, String collectionField, String collectionItemId, Map<String, Object> managedFields) Provides a hook for automatically setting the values for one or more adorned target collection managed fields. This can allow, through code, partial or total completion of the form in the second tab on an adorned target add interaction. Note, a special key/value pair can be included put into the managedField map to cause the second tab to be skipped and the adorned target item add form to auto submit after completing the first tab.- Parameters:
md- the metadata describing the adorned target collection fieldmainClassName- the class name of the entity that contains this adorned target fieldid- the id of the containing entitycollectionField- the name of the adorned target fieldcollectionItemId- the id of the adorned target collection membermanagedFields- the map containing the adorned target field values that should be auto populated- Returns:
- the final status of the operation
-
validateSubmittedAdornedTargetManagedFields
ExtensionResultStatusType validateSubmittedAdornedTargetManagedFields(Entity entity, Serializable instance, Map<String, FieldMetadata> entityFieldMetadata, BasicFieldMetadata propertyMetadata, String propertyName, String value, ExtensionResultHolder<Boolean> validationResult) Provide validation during persistence. The implementation is responsible for determining suitability based on the property information passed in.- Parameters:
entity- all the values passed from the client for persistenceinstance- the entity instance that is being populatedentityFieldMetadata- theFieldMetadatafor all the fieldspropertyMetadata- theFieldMetadatafor the propertypropertyName- the name of the fieldvalue- the value being assigned to the propertyvalidationResult- whether or not the property passes validation- Returns:
- the final status of the operation
-