Class AdminAdvancedOfferImportController
java.lang.Object
org.broadleafcommerce.common.web.controller.BroadleafAbstractController
org.broadleafcommerce.openadmin.web.controller.AdminAbstractController
com.broadleafcommerce.advancedoffer.admin.web.controller.AdminAdvancedOfferImportController
@ConditionalOnImport
@ConditionalOnAdmin
@Controller("blAdminAdvancedOfferImportController")
@RequestMapping("/import/offercode")
public class AdminAdvancedOfferImportController
extends org.broadleafcommerce.openadmin.web.controller.AdminAbstractController
The main import controller for importing offer codes into a group
- Author:
- Phillip Verheyden (phillipuniverse)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected static final Stringprotected AdvancedOfferImportServiceFields 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, LOG, MODAL_CONTAINER_VIEW, service, validationService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.core.io.ClassPathResourceexampleFile(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) getImportPrompt(jakarta.servlet.http.HttpServletRequest request, Long codeGroupId, org.springframework.ui.Model model) uploadImport(jakarta.servlet.http.HttpServletRequest request, Long codeGroupId, org.springframework.web.multipart.MultipartFile file, String importSpecification) 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, getSectionKey, 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
-
OFFER_DOCUMENTATION_URL
- See Also:
-
EXAMPLE_OFFER_IMPORT
- See Also:
-
offerImportService
-
-
Constructor Details
-
AdminAdvancedOfferImportController
public AdminAdvancedOfferImportController()
-
-
Method Details
-
getImportPrompt
@RequestMapping(value="{codeGroupId}", method=GET) public String getImportPrompt(jakarta.servlet.http.HttpServletRequest request, @PathVariable("codeGroupId") Long codeGroupId, org.springframework.ui.Model model) throws Exception - Throws:
Exception
-
uploadImport
@RequestMapping(value="{codeGroupId}", method=POST, produces="application/json") @ResponseBody public Map<String,String> uploadImport(jakarta.servlet.http.HttpServletRequest request, @PathVariable("codeGroupId") Long codeGroupId, @RequestParam("file") org.springframework.web.multipart.MultipartFile file, @RequestParam("importSpecification") String importSpecification) throws Exception - Throws:
Exception
-
exampleFile
@RequestMapping(value="/example-file", method=GET) @ResponseBody public org.springframework.core.io.ClassPathResource exampleFile(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws IOException - Throws:
IOException
-