Class ConfigureContentController

java.lang.Object
org.jasig.portlet.cms.mvc.portlet.ConfigureContentController

@Controller
@RequestMapping("CONFIG")
public class ConfigureContentController
extends Object
ConfigureContentController allows administrative users to set the content to be displayed by the portlet. This controller is responsible for performing any required content validation, removing any unwanted or dangerous tags and attributes from the configured HTML, and persisting it to the configured content store.
Version:
$Revision$
Author:
Jen Bourey, jbourey@unicon.net
  • Field Details

    • log

      protected final org.apache.commons.logging.Log log
  • Constructor Details

  • Method Details

    • setContentDao

      @Autowired public void setContentDao​(IContentDao contentDao)
    • setStringCleaningService

      @Autowired public void setStringCleaningService​(IStringCleaningService cleaningService)
    • showContentForm

      @RequestMapping public String showContentForm()
      Show the main configuration view.
      Returns:
      main configuration view
    • updateConfiguration

      @RequestMapping(params="action=updateConfiguration") public void updateConfiguration​(javax.portlet.ActionRequest request, javax.portlet.ActionResponse response, @ModelAttribute("form") ContentForm form) throws javax.portlet.PortletModeException
      Update the portlet's configuration according to the submitted form object.
      Parameters:
      request - ActionRequest
      response - ActionResponse
      form - configuration form
      Throws:
      javax.portlet.PortletModeException - exception
    • getPreview

      @ResourceMapping("preview") public org.springframework.web.servlet.ModelAndView getPreview​(@RequestParam("content") String content)
    • getForm

      @ModelAttribute("form") public ContentForm getForm​(javax.portlet.PortletRequest request)
      Get the form object for the portlet configuration. If this portlet has already been configured with content, the current HTML will be pre-populated into the form object. If this is a new portlet, the initial content will be an empty string.
      Parameters:
      request - PortletRequest
      Returns:
      form object for the portlet configuration
    • isCleanContent

      @ModelAttribute("cleanContent") public boolean isCleanContent​(javax.portlet.PortletRequest request)
      Adds clean content attribute to the model.
      Parameters:
      request - PortletRequest
      Returns:
      true if the clean content portlet preference is set