Interface AdminAbstractControllerExtensionHandler

All Superinterfaces:
org.broadleafcommerce.common.extension.ExtensionHandler
All Known Implementing Classes:
AbstractAdminAbstractControllerExtensionHandler

public interface AdminAbstractControllerExtensionHandler extends org.broadleafcommerce.common.extension.ExtensionHandler
Extension handler for methods present in AdminAbstractController.
Author:
Andre Azzolini (apazzolini)
  • Field Details

  • Method Details

    • addAdditionalMainActions

      org.broadleafcommerce.common.extension.ExtensionResultStatusType addAdditionalMainActions(String sectionClassName, List<EntityFormAction> actions)
      Invoked every time AdminBasicEntityController#viewEntityList() is invoked to allow additional main form actions to be contributed.
      Parameters:
      sectionClassName -
      actions -
      Returns:
    • modifyMainActions

      org.broadleafcommerce.common.extension.ExtensionResultStatusType 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). Assuming that the user has proper permissions, the mainActions list would have DefaultMainActions.ADD
      Parameters:
      cmd - the metadata for the ceiling entity that is being displayed
      mainActions - the actions that are added to the main form by default. Use this list to add more actions
    • setAdditionalModelAttributes

      org.broadleafcommerce.common.extension.ExtensionResultStatusType setAdditionalModelAttributes(org.springframework.ui.Model model, String sectionKey)
      Parameters:
      model -
      sectionKey -
      Returns:
      the extension result status
    • modifyDynamicForm

      org.broadleafcommerce.common.extension.ExtensionResultStatusType modifyDynamicForm(EntityForm form, String parentEntityId)
      Invoked whenever AdminAbstractController#getBlankDynamicFieldTemplateForm or AdminAbstractController.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

      org.broadleafcommerce.common.extension.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

      org.broadleafcommerce.common.extension.ExtensionResultStatusType isAddRequest(Entity entity, org.broadleafcommerce.common.extension.ExtensionResultHolder<Boolean> resultHolder)
      Extension point to determine if the entity requested is a new empty add request.
      Parameters:
      entity -
      Returns:
    • overrideSaveEntityJsonResponse

      org.broadleafcommerce.common.extension.ExtensionResultStatusType overrideSaveEntityJsonResponse(jakarta.servlet.http.HttpServletResponse response, boolean hasValidationErrors, String sectionKey, String id, org.broadleafcommerce.common.extension.ExtensionResultHolder<String> resultHolder)
      Extension point to determine if the current save transaction is the first valid save.
      Parameters:
      response -
      hasValidationErrors -
      sectionKey -
      id -
      Returns:
    • modifyPreAddEntityForm

      org.broadleafcommerce.common.extension.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: