org.jasig.portlet.cms.mvc.portlet
Class ConfigureContentController

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

@Controller
@RequestMapping(value="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: 20736 $
Author:
Jen Bourey, jbourey@unicon.net

Field Summary
protected  org.apache.commons.logging.Log log
           
 
Constructor Summary
ConfigureContentController()
           
 
Method Summary
 void cancelUpdate(javax.portlet.ActionRequest request, javax.portlet.ActionResponse response)
          Cancel any pending portlet configuration edits and exit configuration mode.
 ContentForm getForm(javax.portlet.PortletRequest request)
          Get the form object for the portlet configuration.
 boolean isCleanContent(javax.portlet.PortletRequest request)
           
 void setContentDao(IContentDao contentDao)
           
 void setStringCleaningService(IStringCleaningService cleaningService)
           
 String showContentForm()
          Show the main configuration view.
 void updateConfiguration(javax.portlet.ActionRequest request, javax.portlet.ActionResponse response, ContentForm form)
          Update the portlet's configuration according to the submitted form object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected final org.apache.commons.logging.Log log
Constructor Detail

ConfigureContentController

public ConfigureContentController()
Method Detail

setContentDao

public void setContentDao(IContentDao contentDao)

setStringCleaningService

public void setStringCleaningService(IStringCleaningService cleaningService)

showContentForm

@RequestMapping
public String showContentForm()
Show the main configuration view.

Returns:

updateConfiguration

@RequestMapping(params="action=updateConfiguration")
public void updateConfiguration(javax.portlet.ActionRequest request,
                                                     javax.portlet.ActionResponse response,
                                                     @ModelAttribute(value="form")
                                                     ContentForm form)
                         throws javax.portlet.PortletModeException
Update the portlet's configuration according to the submitted form object.

Parameters:
request -
response -
form -
Throws:
javax.portlet.PortletModeException

cancelUpdate

@RequestMapping(params="action=cancelUpdate")
public void cancelUpdate(javax.portlet.ActionRequest request,
                                              javax.portlet.ActionResponse response)
                  throws javax.portlet.PortletModeException
Cancel any pending portlet configuration edits and exit configuration mode.

Parameters:
request -
response -
Throws:
javax.portlet.PortletModeException

getForm

@ModelAttribute(value="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 -
Returns:

isCleanContent

@ModelAttribute(value="cleanContent")
public boolean isCleanContent(javax.portlet.PortletRequest request)
Parameters:
request -
Returns:


Copyright © 2010 Jasig. All Rights Reserved.