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 Summary
Fields Modifier and Type Field Description protected org.apache.commons.logging.Loglog -
Constructor Summary
Constructors Constructor Description ConfigureContentController() -
Method Summary
Modifier and Type Method Description ContentFormgetForm(javax.portlet.PortletRequest request)Get the form object for the portlet configuration.org.springframework.web.servlet.ModelAndViewgetPreview(String content)booleanisCleanContent(javax.portlet.PortletRequest request)Adds clean content attribute to the model.voidsetContentDao(IContentDao contentDao)voidsetStringCleaningService(IStringCleaningService cleaningService)StringshowContentForm()Show the main configuration view.voidupdateConfiguration(javax.portlet.ActionRequest request, javax.portlet.ActionResponse response, ContentForm form)Update the portlet's configuration according to the submitted form object.
-
Field Details
-
log
protected final org.apache.commons.logging.Log log
-
-
Constructor Details
-
ConfigureContentController
public ConfigureContentController()
-
-
Method Details
-
setContentDao
-
setStringCleaningService
-
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.PortletModeExceptionUpdate the portlet's configuration according to the submitted form object.- Parameters:
request- ActionRequestresponse- ActionResponseform- configuration form- Throws:
javax.portlet.PortletModeException- exception
-
getPreview
@ResourceMapping("preview") public org.springframework.web.servlet.ModelAndView getPreview(@RequestParam("content") String content) -
getForm
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
-