Class AdminBasicOperationsController
java.lang.Object
org.broadleafcommerce.common.web.controller.BroadleafAbstractController
org.broadleafcommerce.openadmin.web.controller.AdminAbstractController
org.broadleafcommerce.openadmin.web.controller.entity.AdminBasicOperationsController
@Controller("blAdminBasicOperationsController")
public class AdminBasicOperationsController
extends AdminAbstractController
The operations in this controller are actions that do not necessarily depend on a section key being present.
- Author:
- Andre Azzolini (apazzolini)
-
Field Summary
FieldsFields 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, FILTER_VALUE_SEPARATOR, FILTER_VALUE_SEPARATOR_REGEX, filterProductTypeExtensionManager, formService, MODAL_CONTAINER_VIEW, service, validationService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected List<SectionCrumb>getLookupSectionCrumbs(List<SectionCrumb> sectionCrumbs, String owningClassName, String requestingEntityId) Returns the crumbs for a lookup request on a field ofowningClassName: the request's crumbs plus one for the owning entity itself.getTypeaheadResults(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, Map<String, String> pathVars, String owningClass, String collectionField, String query, String requestingEntityId, org.springframework.util.MultiValueMap<String, String> requestParams) logJavaScriptError(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.util.MultiValueMap<String, String> requestParams) protected voidmodifyFetchPersistencePackageRequest(PersistencePackageRequest ppr, Map<String, String> pathVars) Hook method to allow a user to modify the persistence package request for a fetch on a select lookup.sessionTimerReset(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) showSelectCollectionItem(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, Map<String, String> pathVars, String owningClass, String collectionField, String requestingEntityId, boolean dynamicField, org.springframework.util.MultiValueMap<String, String> requestParams) Shows the modal dialog that is used to select a "to-one" collection item.updateAdminNavigation(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, Map<String, String> pathVars) 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
-
extensionManager
-
searchFieldResolver
-
-
Constructor Details
-
AdminBasicOperationsController
public AdminBasicOperationsController()
-
-
Method Details
-
showSelectCollectionItem
@RequestMapping(value="/{owningClass:.*}/{collectionField:.*}/select", method=GET) public String showSelectCollectionItem(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String, String> pathVars, @PathVariable("owningClass") String owningClass, @PathVariable("collectionField") String collectionField, @RequestParam(required=false) String requestingEntityId, @RequestParam(defaultValue="false") boolean dynamicField, @RequestParam org.springframework.util.MultiValueMap<String, throws ExceptionString> requestParams) Shows the modal dialog that is used to select a "to-one" collection item. For example, this could be used to show a list of categories for the ManyToOne field "defaultCategory" in Product.- Parameters:
request-response-model-pathVars-owningClass-collectionField-- Returns:
- the return view path
- Throws:
Exception
-
getTypeaheadResults
@RequestMapping(value="/{owningClass:.*}/{collectionField:.*}/typeahead", method=GET) @ResponseBody public List<Map<String,String>> getTypeaheadResults(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String, String> pathVars, @PathVariable("owningClass") String owningClass, @PathVariable("collectionField") String collectionField, @RequestParam(required=false) String query, @RequestParam(required=false) String requestingEntityId, @RequestParam org.springframework.util.MultiValueMap<String, throws ExceptionString> requestParams) - Throws:
Exception
-
sessionTimerReset
@RequestMapping(value="/sessionTimerReset", method=GET) @ResponseBody public String sessionTimerReset(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws Exception - Throws:
Exception
-
logJavaScriptError
@RequestMapping(value="/logJavaScriptError", method=POST) @ResponseBody public String logJavaScriptError(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, @RequestParam org.springframework.util.MultiValueMap<String, String> requestParams) throws Exception- Throws:
Exception
-
getLookupSectionCrumbs
protected List<SectionCrumb> getLookupSectionCrumbs(List<SectionCrumb> sectionCrumbs, String owningClassName, String requestingEntityId) Returns the crumbs for a lookup request on a field ofowningClassName: the request's crumbs plus one for the owning entity itself. The owning class has been validated and was just inspected (and so security checked) by this request, and the looked-up field was read from its metadata, so the server knows the lookup target is reachable from it. Section crumbs only authorize an entity that is related to the request's target (see AdminSecurityServiceRemote#getRelatedSectionCrumbCeilings), so this is what lets a user who may edit the owning entity browse the entities its lookup field can point at. The crumbs used to render the view are unchanged. -
modifyFetchPersistencePackageRequest
protected void modifyFetchPersistencePackageRequest(PersistencePackageRequest ppr, Map<String, String> pathVars) Hook method to allow a user to modify the persistence package request for a fetch on a select lookup.- Parameters:
ppr-pathVars-
-