Class AdminAssetController


@Controller("blAdminAssetController") @RequestMapping("/assets") public class AdminAssetController extends AdminBasicEntityController
Handles admin operations for the Asset entity. This is mostly to support displaying image assets inline in listgrids.
Author:
Andre Azzolini (apazzolini)
  • Field Details

  • Constructor Details

    • AdminAssetController

      public AdminAssetController()
  • Method Details

    • getSectionKey

      protected String getSectionKey(Map<String,String> pathVars)
      Description copied from class: AdminAbstractController
      This method is used to determine the current section key. For this default implementation, the sectionKey is pulled from the pathVariable, {sectionKey}, as defined by the request mapping on this controller. To support controller inheritance and allow more specialized controllers to delegate some methods to this basic controller, overridden implementations of this method could return a hardcoded value instead of reading the map
      Overrides:
      getSectionKey in class AdminAbstractController
      Parameters:
      pathVars - - the map of all currently bound path variables for this request
      Returns:
      the sectionKey for this request
    • 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,String> requestParams) throws Exception
      Description copied from class: AdminBasicEntityController
      Renders the main entity listing for the specified class, which is based on the current sectionKey with some optional criteria.
      Overrides:
      viewEntityList in class AdminBasicEntityController
      requestParams - a Map of property name -> list critiera values
      Returns:
      the return view path
      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
      Description copied from class: AdminBasicEntityController
      Renders the main entity form for the specified entity
      Overrides:
      viewEntityForm in class AdminBasicEntityController
      Returns:
      the return view path
      Throws:
      Exception
    • saveEntity

      @RequestMapping(value="/{id}", method=POST) public String saveEntity(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") EntityForm entityForm, org.springframework.validation.BindingResult result, org.springframework.web.servlet.mvc.support.RedirectAttributes ra) throws Exception
      Description copied from class: AdminBasicEntityController
      Attempts to save the given entity. If validation is unsuccessful, it will re-render the entity form with error fields highlighted. On a successful save, it will refresh the entity page.
      Overrides:
      saveEntity in class AdminBasicEntityController
      Returns:
      the return view path
      Throws:
      Exception
    • getDefaultEntityType

      protected String getDefaultEntityType()
      Description copied from class: AdminAbstractController
      This method is called when attempting to add new entities that have a polymorphic tree.

      If this method returns null, there is no default type set for this particular entity type, and the user will be presented with a selection of possible types to utilize.

      If it returns a non-null value, the returned fullyQualifiedClassname will be used and will bypass the selection step.

      Overrides:
      getDefaultEntityType in class AdminAbstractController
      Returns:
      null if there is no default type, otherwise the default type