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 Details

  • 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,String> requestParams) throws Exception
      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,String> requestParams) throws Exception
      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
    • updateAdminNavigation

      @RequestMapping(value="/update-navigation", method=GET) public String updateAdminNavigation(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars) 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 of owningClassName: 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 -