Class AdminProductController

java.lang.Object
org.broadleafcommerce.common.web.controller.BroadleafAbstractController
org.broadleafcommerce.openadmin.web.controller.AdminAbstractController
org.broadleafcommerce.openadmin.web.controller.entity.AdminBasicEntityController
org.broadleafcommerce.admin.web.controller.entity.AdminProductController
Direct Known Subclasses:
AdminBaseProductController, AdminBundleProductController

@Controller("blAdminProductController") @RequestMapping("/product") public class AdminProductController extends org.broadleafcommerce.openadmin.web.controller.entity.AdminBasicEntityController
Handles admin operations for the Product entity. Editing a product requires custom criteria in order to properly invoke the ProductCustomPersistenceHandler
Author:
Andre Azzolini (apazzolini)
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected org.broadleafcommerce.core.catalog.service.CatalogService
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     

    Fields inherited from class org.broadleafcommerce.openadmin.web.controller.entity.AdminBasicEntityController

    adminUserDao, adornedTargetAutoPopulateExtensionManager, ALTERNATE_ID_PROPERTY, CURRENT_FOLDER_ID, CUSTOM_CRITERIA, duplicator, dynamicEntityDao, genericEntityService, IS_SELECTIZE_REQUEST, LOG, multipleCatalogExtensionManager, rowLevelSecurityService, sandBoxHelper

    Fields inherited from class org.broadleafcommerce.openadmin.web.controller.AdminAbstractController

    adminNavigationService, adminRemoteSecurityService, CURRENT_ADMIN_MODULE_ATTRIBUTE_NAME, CURRENT_ADMIN_SECTION_ATTRIBUTE_NAME, customCriteriaService, DEFAULT_CONTAINER_VIEW, entityConfiguration, entityFormValidator, eps, extensionManager, FILTER_VALUE_SEPARATOR, FILTER_VALUE_SEPARATOR_REGEX, filterProductTypeExtensionManager, formService, MODAL_CONTAINER_VIEW, service, validationService
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    addCollectionItem(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, Map<String,String> pathVars, String id, String collectionField, org.broadleafcommerce.openadmin.web.form.entity.EntityForm entityForm, org.springframework.validation.BindingResult result)
     
    protected String
    buildAddCollectionItemModel(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, String id, String collectionField, String sectionKey, org.broadleafcommerce.openadmin.dto.Property collectionProperty, org.broadleafcommerce.openadmin.dto.FieldMetadata md, org.broadleafcommerce.openadmin.server.domain.PersistencePackageRequest ppr, org.broadleafcommerce.openadmin.web.form.entity.EntityForm entityForm, org.broadleafcommerce.openadmin.dto.Entity entity)
     
    constructSelectizeOptionMap(org.broadleafcommerce.openadmin.dto.DynamicResultSet drs, org.broadleafcommerce.openadmin.dto.ClassMetadata cmd)
     
    protected String
     
    protected void
    modifyAddEntityForm(org.broadleafcommerce.openadmin.web.form.entity.EntityForm ef, Map<String,String> pathVars)
     
    protected void
    modifyCriteria(Map<String,org.broadleafcommerce.openadmin.dto.FilterAndSortCriteria> fasMap)
     
    protected void
    modifyEntityForm(org.broadleafcommerce.openadmin.web.form.entity.EntityForm entityForm, Map<String,String> pathVars)
     
    protected String
    showAddAdditionalSku(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, String id, Map<String,String> pathVars)
     
    showAddCollectionItem(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, Map<String,String> pathVars, String id, String collectionField, org.springframework.util.MultiValueMap<String,String> requestParams)
     
    protected String
    showUpdateAdditionalSku(jakarta.servlet.http.HttpServletRequest request, org.springframework.ui.Model model, String id, String collectionItemId, Map<String,String> pathVars, org.broadleafcommerce.openadmin.web.form.entity.EntityForm entityForm)
     
    showUpdateCollectionItem(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, Map<String,String> pathVars, String id, String collectionField, String collectionItemId)
     
    protected String
    showViewUpdateCollection(jakarta.servlet.http.HttpServletRequest request, org.springframework.ui.Model model, Map<String,String> pathVars, String id, String collectionField, String collectionItemId, String alternateId, String modalHeaderType, org.broadleafcommerce.openadmin.web.form.entity.EntityForm entityForm, org.broadleafcommerce.openadmin.dto.Entity entity)
     
    viewEntityForm(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, Map<String,String> pathVars, String id)
     
    viewEntityListSelectize(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, Map<String,String> pathVars, org.springframework.util.MultiValueMap<String,String> requestParams)
     

    Methods inherited from class org.broadleafcommerce.openadmin.web.controller.entity.AdminBasicEntityController

    addAddActionIfAllowed, addAuditableDisplayField, addAuditableDisplayFields, addCollectionItem, addEmptyCollectionItem, addEntity, addSelectizeCollectionItem, buildAuditableDisplayField, buildDirtyList, buildSelectizeCustomCriteria, declareShouldIgnoreAdditionStatusFilter, determineEntityType, duplicateEntity, getCollectionFieldRecords, getCollectionValueDetails, getCurrentFolderId, getCurrentTabName, getCustomCriteria, getErrorDuplicatingResponse, getModalForBlankEntityType, getSelectizeCollectionOptions, getViewSubRecords, initBinder, isAddActionAllowed, isNotReadOnly, modifyEntityForm, reinitializeEntityForm, removeCollectionItem, removeCollectionItem, removeEntity, resolveAppropriateEntityView, saveEntity, saveEntityJson, setTypedEntityModelAttributes, setupViewEntityListBasicModel, showUpdateCollectionItem, showViewCollectionItem, showViewCollectionItem, showViewUpdateCollection, showViewUpdateCollection, showViewUpdateCollection, updateCollectionItem, updateCollectionItem, updateCollectionItemSequence, updateCollectionItemSequence, viewAddEntityForm, viewCollectionItemDetails, viewCollectionItemTab, viewEntityList, viewEntityTab, viewReadOnlyCollectionItemTab

    Methods inherited from class org.broadleafcommerce.openadmin.web.controller.AdminAbstractController

    attachSectionSpecificInfo, attachSectionSpecificInfo, createSectionCrumb, declareForceUseAdditionStatusFilter, extractDynamicFormFields, getAddEntityTypes, getClassNameForSection, getCollectionListGrid, getCollectionListGrid, getCriteria, getDefaultEntityType, getDynamicFieldTemplateForm, getDynamicForm, getEntityForm, getEntityForm, getEntityForm, getFirstId, getLastId, getLowerCount, getMaxIndex, getMaxResults, getPageSize, getPersistencePackageRequest, getSectionCrumbs, getSectionCustomCriteria, getSectionPersistencePackageRequest, getSectionPersistencePackageRequest, getSectionPersistencePackageRequest, getSectionPersistencePackageRequest, getSortDirections, getSortPropertyNames, getStartIndex, getUpperCount, populateJsonValidationErrors, setModelAttributes, setSpecializedNameForFields, translateErrorMessage

    Methods inherited from class org.broadleafcommerce.common.web.controller.BroadleafAbstractController

    addDeepLink, getContextPath, isAjaxRequest, jsonResponse

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • AdminProductController

      public AdminProductController()
  • Method Details

    • getSectionKey

      protected String getSectionKey(Map<String,String> pathVars)
      Overrides:
      getSectionKey in class org.broadleafcommerce.openadmin.web.controller.AdminAbstractController
    • modifyAddEntityForm

      protected void modifyAddEntityForm(org.broadleafcommerce.openadmin.web.form.entity.EntityForm ef, Map<String,String> pathVars)
      Overrides:
      modifyAddEntityForm in class org.broadleafcommerce.openadmin.web.controller.AdminAbstractController
    • modifyEntityForm

      protected void modifyEntityForm(org.broadleafcommerce.openadmin.web.form.entity.EntityForm entityForm, Map<String,String> pathVars) throws Exception
      Overrides:
      modifyEntityForm in class org.broadleafcommerce.openadmin.web.controller.AdminAbstractController
      Throws:
      Exception
    • showAddAdditionalSku

      protected String showAddAdditionalSku(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, String id, Map<String,String> pathVars) throws Exception
      Throws:
      Exception
    • buildAddCollectionItemModel

      protected String buildAddCollectionItemModel(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, String id, String collectionField, String sectionKey, org.broadleafcommerce.openadmin.dto.Property collectionProperty, org.broadleafcommerce.openadmin.dto.FieldMetadata md, org.broadleafcommerce.openadmin.server.domain.PersistencePackageRequest ppr, org.broadleafcommerce.openadmin.web.form.entity.EntityForm entityForm, org.broadleafcommerce.openadmin.dto.Entity entity) throws org.broadleafcommerce.common.exception.ServiceException
      Overrides:
      buildAddCollectionItemModel in class org.broadleafcommerce.openadmin.web.controller.entity.AdminBasicEntityController
      Throws:
      org.broadleafcommerce.common.exception.ServiceException
    • showUpdateAdditionalSku

      protected String showUpdateAdditionalSku(jakarta.servlet.http.HttpServletRequest request, org.springframework.ui.Model model, String id, String collectionItemId, Map<String,String> pathVars, org.broadleafcommerce.openadmin.web.form.entity.EntityForm entityForm) throws Exception
      Throws:
      Exception
    • viewEntityListSelectize

      @RequestMapping(value="/selectize", method=GET) @ResponseBody public Map<String,Object> viewEntityListSelectize(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @RequestParam org.springframework.util.MultiValueMap<String,String> requestParams) throws Exception
      Overrides:
      viewEntityListSelectize in class org.broadleafcommerce.openadmin.web.controller.entity.AdminBasicEntityController
      Throws:
      Exception
    • constructSelectizeOptionMap

      public Map<String,Object> constructSelectizeOptionMap(org.broadleafcommerce.openadmin.dto.DynamicResultSet drs, org.broadleafcommerce.openadmin.dto.ClassMetadata cmd)
    • showUpdateCollectionItem

      @RequestMapping(value="/{id}/{collectionField:[^0-9].*}/{collectionItemId}", method=GET) public String showUpdateCollectionItem(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @PathVariable("id") String id, @PathVariable("collectionField") String collectionField, @PathVariable("collectionItemId") String collectionItemId) throws Exception
      Overrides:
      showUpdateCollectionItem in class org.broadleafcommerce.openadmin.web.controller.entity.AdminBasicEntityController
      Throws:
      Exception
    • showViewUpdateCollection

      protected String showViewUpdateCollection(jakarta.servlet.http.HttpServletRequest request, org.springframework.ui.Model model, Map<String,String> pathVars, String id, String collectionField, String collectionItemId, String alternateId, String modalHeaderType, org.broadleafcommerce.openadmin.web.form.entity.EntityForm entityForm, org.broadleafcommerce.openadmin.dto.Entity entity) throws org.broadleafcommerce.common.exception.ServiceException
      Overrides:
      showViewUpdateCollection in class org.broadleafcommerce.openadmin.web.controller.entity.AdminBasicEntityController
      Throws:
      org.broadleafcommerce.common.exception.ServiceException
    • showAddCollectionItem

      @RequestMapping(value="/{id}/{collectionField}/add", method=GET) public String showAddCollectionItem(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @PathVariable("id") String id, @PathVariable("collectionField") String collectionField, @RequestParam org.springframework.util.MultiValueMap<String,String> requestParams) throws Exception
      Overrides:
      showAddCollectionItem in class org.broadleafcommerce.openadmin.web.controller.entity.AdminBasicEntityController
      Throws:
      Exception
    • viewEntityForm

      @RequestMapping(value="/{id}", method=GET) public String viewEntityForm(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @PathVariable("id") String id) throws Exception
      Overrides:
      viewEntityForm in class org.broadleafcommerce.openadmin.web.controller.entity.AdminBasicEntityController
      Throws:
      Exception
    • modifyCriteria

      protected void modifyCriteria(Map<String,org.broadleafcommerce.openadmin.dto.FilterAndSortCriteria> fasMap)
      Overrides:
      modifyCriteria in class org.broadleafcommerce.openadmin.web.controller.AdminAbstractController
    • addCollectionItem

      public String addCollectionItem(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @PathVariable("id") String id, @PathVariable("collectionField") String collectionField, @ModelAttribute("entityForm") org.broadleafcommerce.openadmin.web.form.entity.EntityForm entityForm, org.springframework.validation.BindingResult result) throws Exception
      Overrides:
      addCollectionItem in class org.broadleafcommerce.openadmin.web.controller.entity.AdminBasicEntityController
      Throws:
      Exception