pulse - the web application framework Get pulse at SourceForge.net. Fast, secure and Free Open Source software downloads Ohloh project report for pulse-java

org.torweg.pulse.component.core.site.content.filter
Class FilterContentDisplayer

java.lang.Object
  extended by org.torweg.pulse.bundle.Controller
      extended by org.torweg.pulse.component.core.site.content.filter.FilterContentDisplayer
All Implemented Interfaces:
DeprecatedConfigurable

public class FilterContentDisplayer
extends Controller
implements DeprecatedConfigurable

Is used to display FilterContents.

Version:
$Revision: 1956 $
Author:
Thomas Weber

Nested Class Summary
 
Nested classes/interfaces inherited from class org.torweg.pulse.bundle.Controller
Controller.AlwaysRun
 
Constructor Summary
FilterContentDisplayer()
           
 
Method Summary
 FilterContentDisplayerResult displayFilterContent(FilterContentRequestBean requestBean)
          returns a FilterContentDisplayerResult for the given FilterContent and the selected FilterRulePropertys.
 FilterContentDisplayerResult displayFilterContentAJAX(FilterContentRequestBean requestBean)
          uses an XSLTOutputEvent to display the results using AJAX.
 CalendarSheet filterPageCalendarAJAX(FilterContentRequestBean requestBean)
          does the paging of the calendar for filter contents having a filter assigned which is enabled for reference duration filtering.
protected  FilterContent getFilterContent(Command command, org.hibernate.Session s)
          returns the requested Filter.
protected  FilterContentDisplayerResult getFilterContentDisplayerResult(FilterContentRequestBean requestBean)
          actually retrieves the content.
 void init(ConfigBean conf)
          configures the controller.
 
Methods inherited from class org.torweg.pulse.bundle.Controller
getAlwaysRun, isAlwaysRun, setAlwaysRun
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilterContentDisplayer

public FilterContentDisplayer()
Method Detail

displayFilterContent

@Action(value="displayFilter", security=NEVER)
@Permission(value="displayFilterContent")
public FilterContentDisplayerResult displayFilterContent(@RequestBean
                                                                                                  FilterContentRequestBean requestBean)
returns a FilterContentDisplayerResult for the given FilterContent and the selected FilterRulePropertys.

The FilterContent can be specified in two ways:

  1. If the Command contains a Parameter named "contentId", the displayer will try to load a FilterContent with the given id.
  2. If no "contentId" is given, the displayer will try to load a FilterContent as the Content of the given sitemapNodeID of the current Command.

Parameters:
requestBean - the displayer's request bean
Returns:
a FilterContentDisplayerResult for the given FilterContent and the selected FilterRuleProperty s

displayFilterContentAJAX

@Action(value="displayFilterAJAX", generate=true, stripSitemapID=false, security=NEVER)
@Permission(value="displayFilterContent")
public FilterContentDisplayerResult displayFilterContentAJAX(@RequestBean
                                                                                                                            FilterContentRequestBean requestBean)
uses an XSLTOutputEvent to display the results using AJAX.

Otherwise this method behaves exactly like displayFilterContent(FilterContentRequestBean) .

Parameters:
requestBean - the displayer's request bean
Returns:
null

getFilterContentDisplayerResult

protected final FilterContentDisplayerResult getFilterContentDisplayerResult(FilterContentRequestBean requestBean)
actually retrieves the content.

Parameters:
requestBean - the current request
Returns:
the initialised FilterContentDisplayerResult

getFilterContent

protected FilterContent getFilterContent(Command command,
                                         org.hibernate.Session s)
returns the requested Filter.

The method first checks for a request parameter named <em>contentId</em> with the id of the FilterContent, and then looks for the sitemap-id of the Command. If any of the both methods fails to retrieve a FilterContent, a RuntimeException is thrown.

Parameters:
command - the current command
s - the HibernateTM session
Returns:
the requested filter

filterPageCalendarAJAX

@Action(value="filterGetCalendarSheetAJAX", generate=true, stripSitemapID=false, security=NEVER)
@Permission(value="displayFilterContent")
public CalendarSheet filterPageCalendarAJAX(@RequestBean
                                                                                                           FilterContentRequestBean requestBean)
does the paging of the calendar for filter contents having a filter assigned which is enabled for reference duration filtering.

Parameters:
requestBean - the displayer's request bean
Returns:
a CalendarSheet

init

public void init(ConfigBean conf)
configures the controller.

Specified by:
init in interface DeprecatedConfigurable
Parameters:
conf - the configuration