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
FieldsModifier and TypeFieldDescriptionprotected org.broadleafcommerce.core.catalog.service.CatalogServicestatic final Stringstatic final Stringstatic final Stringstatic final StringFields 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, sandBoxHelperFields 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 -
Method Summary
Modifier and TypeMethodDescriptionaddCollectionItem(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 StringbuildAddCollectionItemModel(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 StringgetSectionKey(Map<String, String> pathVars) protected voidmodifyAddEntityForm(org.broadleafcommerce.openadmin.web.form.entity.EntityForm ef, Map<String, String> pathVars) protected voidmodifyCriteria(Map<String, org.broadleafcommerce.openadmin.dto.FilterAndSortCriteria> fasMap) protected voidmodifyEntityForm(org.broadleafcommerce.openadmin.web.form.entity.EntityForm entityForm, Map<String, String> pathVars) protected StringshowAddAdditionalSku(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 StringshowUpdateAdditionalSku(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 StringshowViewUpdateCollection(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, postAddSubCollectionEntityHook, postUpdateSubCollectionEntityHook, reinitializeEntityForm, removeCollectionItem, removeCollectionItem, removeEntity, resolveAppropriateEntityView, saveEntity, saveEntityJson, setTypedEntityModelAttributes, setupViewEntityListBasicModel, showUpdateCollectionItem, showViewCollectionItem, showViewCollectionItem, showViewUpdateCollection, showViewUpdateCollection, showViewUpdateCollection, updateCollectionItem, updateCollectionItem, updateCollectionItemSequence, updateCollectionItemSequence, viewAddEntityForm, viewCollectionItemDetails, viewCollectionItemTab, viewEntityList, viewEntityTab, viewReadOnlyCollectionItemTabMethods 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, translateErrorMessageMethods inherited from class org.broadleafcommerce.common.web.controller.BroadleafAbstractController
addDeepLink, getContextPath, isAjaxRequest, jsonResponse
-
Field Details
-
SECTION_KEY
- See Also:
-
DEFAULT_SKU_NAME
- See Also:
-
SELECTIZE_NAME_PROPERTY
- See Also:
-
PRODUCT_OPTIONS_COLLECTION_FIELD
- See Also:
-
catalogService
protected org.broadleafcommerce.core.catalog.service.CatalogService catalogService
-
-
Constructor Details
-
AdminProductController
public AdminProductController()
-
-
Method Details
-
getSectionKey
- Overrides:
getSectionKeyin classorg.broadleafcommerce.openadmin.web.controller.AdminAbstractController
-
modifyAddEntityForm
protected void modifyAddEntityForm(org.broadleafcommerce.openadmin.web.form.entity.EntityForm ef, Map<String, String> pathVars) - Overrides:
modifyAddEntityFormin classorg.broadleafcommerce.openadmin.web.controller.AdminAbstractController
-
modifyEntityForm
protected void modifyEntityForm(org.broadleafcommerce.openadmin.web.form.entity.EntityForm entityForm, Map<String, String> pathVars) throws Exception- Overrides:
modifyEntityFormin classorg.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:
buildAddCollectionItemModelin classorg.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, throws ExceptionString> requestParams) - Overrides:
viewEntityListSelectizein classorg.broadleafcommerce.openadmin.web.controller.entity.AdminBasicEntityController- Throws:
Exception
-
constructSelectizeOptionMap
-
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:
showUpdateCollectionItemin classorg.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:
showViewUpdateCollectionin classorg.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, throws ExceptionString> requestParams) - Overrides:
showAddCollectionItemin classorg.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:
viewEntityFormin classorg.broadleafcommerce.openadmin.web.controller.entity.AdminBasicEntityController- Throws:
Exception
-
modifyCriteria
protected void modifyCriteria(Map<String, org.broadleafcommerce.openadmin.dto.FilterAndSortCriteria> fasMap) - Overrides:
modifyCriteriain classorg.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:
addCollectionItemin classorg.broadleafcommerce.openadmin.web.controller.entity.AdminBasicEntityController- Throws:
Exception
-