Class AdminOfferController
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.AdminOfferController
@Controller("blAdminOfferController")
@RequestMapping("/offer")
public class AdminOfferController
extends org.broadleafcommerce.openadmin.web.controller.entity.AdminBasicEntityController
Handles admin operations for the
Offer entity. Certain Offer fields should only render when specific values
are set for other fields; we provide the support for that in this controller.- Author:
- Andre Azzolini (apazzolini)
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic String[]protected org.broadleafcommerce.core.offer.service.OfferServicestatic 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 TypeMethodDescriptionaddEntity(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, Map<String, String> pathVars, org.broadleafcommerce.openadmin.web.form.entity.EntityForm entityForm, org.springframework.validation.BindingResult result) duplicateEntity(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, Map<String, String> pathVars, String id, org.broadleafcommerce.openadmin.web.form.entity.EntityForm entityForm, org.springframework.validation.BindingResult result) Deprecated.Moved method to superclassString[]protected StringgetSectionKey(Map<String, String> pathVars) protected voidmodifyModelAttributes(org.springframework.ui.Model model) Offer field visibility is dependent on other fields in the entity.viewAddEntityForm(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, Map<String, String> pathVars, String entityType) viewEntityForm(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, Map<String, String> pathVars, String id) viewEntityList(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, addCollectionItem, addEmptyCollectionItem, addSelectizeCollectionItem, buildAddCollectionItemModel, buildAuditableDisplayField, buildDirtyList, buildSelectizeCustomCriteria, declareShouldIgnoreAdditionStatusFilter, determineEntityType, getCollectionFieldRecords, getCollectionValueDetails, getCurrentFolderId, getCurrentTabName, getCustomCriteria, getErrorDuplicatingResponse, getModalForBlankEntityType, getSelectizeCollectionOptions, getViewSubRecords, initBinder, isAddActionAllowed, isNotReadOnly, modifyEntityForm, postAddSubCollectionEntityHook, postUpdateSubCollectionEntityHook, reinitializeEntityForm, removeCollectionItem, removeCollectionItem, removeEntity, resolveAppropriateEntityView, saveEntity, saveEntityJson, setTypedEntityModelAttributes, setupViewEntityListBasicModel, showAddCollectionItem, showUpdateCollectionItem, showUpdateCollectionItem, showViewCollectionItem, showViewCollectionItem, showViewUpdateCollection, showViewUpdateCollection, showViewUpdateCollection, showViewUpdateCollection, updateCollectionItem, updateCollectionItem, updateCollectionItemSequence, updateCollectionItemSequence, viewCollectionItemDetails, viewCollectionItemTab, viewEntityListSelectize, 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, getSectionPersistencePackageRequest, getSectionPersistencePackageRequest, getSectionPersistencePackageRequest, getSectionPersistencePackageRequest, getSortDirections, getSortPropertyNames, getStartIndex, getUpperCount, modifyAddEntityForm, modifyCriteria, modifyEntityForm, populateJsonValidationErrors, setModelAttributes, setSpecializedNameForFields, translateErrorMessageMethods inherited from class org.broadleafcommerce.common.web.controller.BroadleafAbstractController
addDeepLink, getContextPath, isAjaxRequest, jsonResponse
-
Field Details
-
SECTION_KEY
- See Also:
-
customCriteria
-
offerService
protected org.broadleafcommerce.core.offer.service.OfferService offerService
-
-
Constructor Details
-
AdminOfferController
public AdminOfferController()
-
-
Method Details
-
getSectionKey
- Overrides:
getSectionKeyin classorg.broadleafcommerce.openadmin.web.controller.AdminAbstractController
-
getSectionCustomCriteria
- Overrides:
getSectionCustomCriteriain classorg.broadleafcommerce.openadmin.web.controller.AdminAbstractController
-
viewEntityList
@RequestMapping(value="", method=GET) public String viewEntityList(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:
viewEntityListin 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
-
viewAddEntityForm
@RequestMapping(value="/add", method=GET) public String viewAddEntityForm(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String, String> pathVars, @RequestParam(defaultValue="") String entityType) throws Exception- Overrides:
viewAddEntityFormin classorg.broadleafcommerce.openadmin.web.controller.entity.AdminBasicEntityController- Throws:
Exception
-
addEntity
@RequestMapping(value="/add", method=POST) public String addEntity(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String, String> pathVars, @ModelAttribute("entityForm") org.broadleafcommerce.openadmin.web.form.entity.EntityForm entityForm, org.springframework.validation.BindingResult result) throws Exception- Overrides:
addEntityin classorg.broadleafcommerce.openadmin.web.controller.entity.AdminBasicEntityController- Throws:
Exception
-
duplicateEntity
@Deprecated @RequestMapping(value="/{id}/duplicate", method=POST) public String duplicateEntity(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String, String> pathVars, @PathVariable("id") String id, @ModelAttribute("entityForm") org.broadleafcommerce.openadmin.web.form.entity.EntityForm entityForm, org.springframework.validation.BindingResult result) throws ExceptionDeprecated.Moved method to superclass- Overrides:
duplicateEntityin classorg.broadleafcommerce.openadmin.web.controller.entity.AdminBasicEntityController- Throws:
Exception
-
modifyModelAttributes
protected void modifyModelAttributes(org.springframework.ui.Model model) Offer field visibility is dependent on other fields in the entity. Mark the form with the appropriate class so that the Javascript will know to handle this form.We also want to tell the UI to make item target criteria required. We cannot manage this at the entity level via an
-