@Controller(value="blAdminImportController")
@RequestMapping(value="/import/")
public class AdminImportController
extends org.broadleafcommerce.openadmin.web.controller.AdminAbstractController
Modifier and Type | Class and Description |
---|---|
protected static class |
AdminImportController.ExampleFileNotFoundException |
protected static class |
AdminImportController.InvalidImportTypeException |
protected static class |
AdminImportController.InvalidUploadException |
Modifier and Type | Field and Description |
---|---|
protected static String |
ASSET_DOCUMENTATION_URL |
protected static String |
CATEGORY_DOCUMENTATION_URL |
protected static String |
EXAMPLE_ASSET_IMPORT |
protected static String |
EXAMPLE_CATEGORY_IMPORT |
protected static String |
EXAMPLE_PRODUCT_IMPORT |
protected static String |
EXAMPLE_TRANSLATION_IMPORT |
protected ImportService |
importService |
protected static String |
PRODUCT_DOCUMENTATION_URL |
protected static String |
TRANSLATION_DOCUMENTATION_URL |
adminNavigationService, adminRemoteSecurityService, CURRENT_ADMIN_MODULE_ATTRIBUTE_NAME, CURRENT_ADMIN_SECTION_ATTRIBUTE_NAME, customCriteriaService, DEFAULT_CONTAINER_VIEW, entityConfiguration, entityFormValidator, extensionManager, FILTER_VALUE_SEPARATOR, FILTER_VALUE_SEPARATOR_REGEX, filterProductTypeExtensionManager, formService, MODAL_CONTAINER_VIEW, service, validationService
Constructor and Description |
---|
AdminImportController() |
Modifier and Type | Method and Description |
---|---|
protected org.springframework.core.io.ClassPathResource |
exampleFile(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String typeOfImport) |
Map<String,String> |
fileNotFound(AdminImportController.ExampleFileNotFoundException e) |
protected ExampleFile |
getExampleFile(ImportType importType) |
Map<String,String> |
invalidFileSize(AdminImportController.InvalidUploadException e) |
Map<String,String> |
invalidImportType(AdminImportController.InvalidImportTypeException e) |
Map<String,String> |
uploadImport(javax.servlet.http.HttpServletRequest request,
String typeOfImport,
org.springframework.web.multipart.MultipartFile file,
Long sandboxId,
String importSpecification)
Used by the Import/Export Prompt to upload a data file and then schedule a job
so that it can be processed later.
|
String |
viewConfigurePrompt(javax.servlet.http.HttpServletRequest request,
String typeOfImport,
org.springframework.ui.Model model)
Shows the form that the allows the user to upload an import file
|
attachSectionSpecificInfo, attachSectionSpecificInfo, createSectionCrumb, 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, translateErrorMessage
protected static final String ASSET_DOCUMENTATION_URL
protected static final String CATEGORY_DOCUMENTATION_URL
protected static final String PRODUCT_DOCUMENTATION_URL
protected static final String TRANSLATION_DOCUMENTATION_URL
protected static final String EXAMPLE_ASSET_IMPORT
protected static final String EXAMPLE_PRODUCT_IMPORT
protected static final String EXAMPLE_CATEGORY_IMPORT
protected static final String EXAMPLE_TRANSLATION_IMPORT
protected ImportService importService
@RequestMapping(value="{typeOfImport:.+}", method=GET) public String viewConfigurePrompt(javax.servlet.http.HttpServletRequest request, @PathVariable(value="typeOfImport") String typeOfImport, org.springframework.ui.Model model) throws Exception
Exception
protected ExampleFile getExampleFile(ImportType importType)
@RequestMapping(value="{typeOfImport:.+}", method=POST, produces="application/json") @ResponseBody public Map<String,String> uploadImport(javax.servlet.http.HttpServletRequest request, @PathVariable(value="typeOfImport") String typeOfImport, @RequestParam(value="file") org.springframework.web.multipart.MultipartFile file, @RequestParam(value="sandboxId",required=false) Long sandboxId, @RequestParam(value="importSpecification") String importSpecification) throws Exception
Exception
@RequestMapping(value="{typeOfImport:.+}/example-file", method=GET) @ResponseBody protected org.springframework.core.io.ClassPathResource exampleFile(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, @PathVariable(value="typeOfImport") String typeOfImport)
@ExceptionHandler(value=AdminImportController.ExampleFileNotFoundException.class) @ResponseStatus(value=NOT_FOUND) public Map<String,String> fileNotFound(AdminImportController.ExampleFileNotFoundException e)
@ExceptionHandler(value=AdminImportController.InvalidImportTypeException.class) @ResponseStatus(value=BAD_REQUEST) public Map<String,String> invalidImportType(AdminImportController.InvalidImportTypeException e)
@ExceptionHandler(value=AdminImportController.InvalidUploadException.class) @ResponseStatus(value=BAD_REQUEST) @ResponseBody public Map<String,String> invalidFileSize(AdminImportController.InvalidUploadException e)
Copyright © 2020. All rights reserved.