Interface AdminAbstractControllerExtensionHandler
- All Superinterfaces:
ExtensionHandler
- All Known Implementing Classes:
AbstractAdminAbstractControllerExtensionHandler,AdminOfferControllerExtensionHandler,TypedEntityBasicEntityExtensionHandler
Extension handler for methods present in
AdminAbstractController.- Author:
- Andre Azzolini (apazzolini)
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionaddAdditionalMainActions(String sectionClassName, List<EntityFormAction> actions) Invoked every timeAdminBasicEntityController#viewEntityList()is invoked to allow additional main form actions to be contributed.isAddRequest(Entity entity, ExtensionResultHolder<Boolean> resultHolder) Extension point to determine if the entity requested is a new empty add request.modifyDynamicForm(EntityForm form, String parentEntityId) Invoked wheneverAdminAbstractController#getBlankDynamicFieldTemplateFormorAdminAbstractController.getDynamicFieldTemplateForm(org.broadleafcommerce.openadmin.web.form.entity.DynamicEntityFormInfo, java.lang.String, org.broadleafcommerce.openadmin.web.form.entity.EntityForm)is invoked.modifyMainActions(ClassMetadata cmd, List<EntityFormAction> mainActions) Extension point to override the actions that are added by default when viewing a ceiling entity for a particular section (for instance, a list of Products in the 'Product' section).modifyModelForAddCollectionType(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, String sectionKey, String id, org.springframework.util.MultiValueMap<String, String> requestParams, MapMetadata md) Extension point to modify the model for specific collection typesmodifyPreAddEntityForm(EntityForm entityForm, ClassMetadata cmd, Map<String, String> pathVars) Extension point for setting values on an EntityForm before the initial object is persisted.overrideSaveEntityJsonResponse(jakarta.servlet.http.HttpServletResponse response, boolean hasValidationErrors, String sectionKey, String id, ExtensionResultHolder<String> resultHolder) Extension point to determine if the current save transaction is the first valid save.setAdditionalModelAttributes(org.springframework.ui.Model model, String sectionKey) Invoked every timeAdminAbstractController.setModelAttributes(Model, String)is invoked.Methods inherited from interface org.broadleafcommerce.common.extension.ExtensionHandler
getPriority, isEnabled
-
Field Details
-
NEW_CLASS_NAME
- See Also:
-
-
Method Details
-
addAdditionalMainActions
ExtensionResultStatusType addAdditionalMainActions(String sectionClassName, List<EntityFormAction> actions) Invoked every timeAdminBasicEntityController#viewEntityList()is invoked to allow additional main form actions to be contributed.- Parameters:
sectionClassName-actions-- Returns:
-
modifyMainActions
Extension point to override the actions that are added by default when viewing a ceiling entity for a particular section (for instance, a list of Products in the 'Product' section). Assuming that the user has proper permissions, the mainActions list would haveDefaultMainActions.ADD- Parameters:
cmd- the metadata for the ceiling entity that is being displayedmainActions- the actions that are added to the main form by default. Use this list to add more actions
-
setAdditionalModelAttributes
ExtensionResultStatusType setAdditionalModelAttributes(org.springframework.ui.Model model, String sectionKey) Invoked every timeAdminAbstractController.setModelAttributes(Model, String)is invoked.- Parameters:
model-sectionKey-- Returns:
- the extension result status
-
modifyDynamicForm
Invoked wheneverAdminAbstractController#getBlankDynamicFieldTemplateFormorAdminAbstractController.getDynamicFieldTemplateForm(org.broadleafcommerce.openadmin.web.form.entity.DynamicEntityFormInfo, java.lang.String, org.broadleafcommerce.openadmin.web.form.entity.EntityForm)is invoked. This method provides the ability to modify the dynamic form that is created as a result of those two methods.- Parameters:
form-parentEntityId-- Returns:
-
modifyModelForAddCollectionType
ExtensionResultStatusType modifyModelForAddCollectionType(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, String sectionKey, String id, org.springframework.util.MultiValueMap<String, String> requestParams, MapMetadata md) Extension point to modify the model for specific collection types- Parameters:
md-- Returns:
-
isAddRequest
Extension point to determine if the entity requested is a new empty add request.- Parameters:
entity-- Returns:
-
overrideSaveEntityJsonResponse
ExtensionResultStatusType overrideSaveEntityJsonResponse(jakarta.servlet.http.HttpServletResponse response, boolean hasValidationErrors, String sectionKey, String id, ExtensionResultHolder<String> resultHolder) Extension point to determine if the current save transaction is the first valid save.- Parameters:
response-hasValidationErrors-sectionKey-id-- Returns:
-
modifyPreAddEntityForm
ExtensionResultStatusType modifyPreAddEntityForm(EntityForm entityForm, ClassMetadata cmd, Map<String, String> pathVars) Extension point for setting values on an EntityForm before the initial object is persisted.- Parameters:
entityForm-pathVars-- Returns:
-