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 FilterContentRequestBean

java.lang.Object
  extended by org.torweg.pulse.util.requestbean.RequestAwareRequestBean
      extended by org.torweg.pulse.component.core.site.content.filter.FilterContentRequestBean

public class FilterContentRequestBean
extends RequestAwareRequestBean

the request bean for the FilterContentDisplayer.

Version:
$Revision$
Author:
Thomas Weber

Constructor Summary
FilterContentRequestBean()
           
 
Method Summary
 void buildRulePropertyMap(ServiceRequest req)
          builds the mapping for the selected FilterRuleProperty elements and their corresponding FilterRules.
 Period.Scroll getCalendarSheetScrollDirection()
          returns the Period.Scroll.
 Duration getDuration()
          returns the duration for the reference date filtering or null.
 java.lang.Long getDurationOffset()
          returns the offset to be used for the reference Duration filtering.
 int getMaxResults()
          returns the maximum results for result pagination.
 int getOffset()
          returns the offset.
 java.util.Map<java.lang.Long,java.util.List<java.lang.Long>> getRulePropertyMap()
          returns an unmodifiable view of the rule-id to property-ids mappings.
 boolean isDurationGiven()
          returns whether a duration for the optional reference date filtering exists.
 void setCalendarSheetScrollDirection(java.lang.String stringValue)
          sets the Period.Scroll.
 void setDurationEnd(java.lang.String ts)
          sets the end of the duration for the optional reference date filtering ( Content.getReferenceDuration()).
 void setDurationOffset(java.lang.String stringValue)
          sets the offset to be used for the reference Duration filtering.
 void setDurationStart(java.lang.String ts)
          sets the start of the duration for the optional reference date filtering (Content.getReferenceDuration()).
 void setMaxResults(java.lang.String max)
          sets the maximum results for one page during result pagination.
 void setOffset(java.lang.String off)
          sets the offset for result pagination.
 
Methods inherited from class org.torweg.pulse.util.requestbean.RequestAwareRequestBean
addEvent, getServiceRequest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilterContentRequestBean

public FilterContentRequestBean()
Method Detail

getRulePropertyMap

public final java.util.Map<java.lang.Long,java.util.List<java.lang.Long>> getRulePropertyMap()
returns an unmodifiable view of the rule-id to property-ids mappings.

Returns:
an unmodifiable view of the rule-id to property-ids mappings

buildRulePropertyMap

@RequestBean.ServiceRequest
public final void buildRulePropertyMap(ServiceRequest req)
builds the mapping for the selected FilterRuleProperty elements and their corresponding FilterRules.

Each activated FilterRuleProperty of the ContentFilter is transmitted in the following way: prop_ FilterRule.id ={FilterRuleProperty.id}}. For example, if the properties with the ids 12, 9 of rule 1 and property 27 of rule 4 are selected the query string would be prop_1=12&prop_1=9&prop_4=27.

Parameters:
req - the current request

getOffset

public final int getOffset()
returns the offset.

Returns:
the offset

setOffset

@RequestBean.Parameter(value="offset")
public final void setOffset(java.lang.String off)
sets the offset for result pagination.

Parameters:
off - the offset to set

getMaxResults

public final int getMaxResults()
returns the maximum results for result pagination.

Returns:
the maximum results for one page

setMaxResults

@RequestBean.Parameter(value="maxResults")
public final void setMaxResults(java.lang.String max)
sets the maximum results for one page during result pagination.

Parameters:
max - the max results to set

setDurationStart

@RequestBean.Parameter(value="durationStart")
public final void setDurationStart(java.lang.String ts)
sets the start of the duration for the optional reference date filtering (Content.getReferenceDuration()).

Parameters:
ts - the start time in milliseconds since the epoch

setDurationEnd

@RequestBean.Parameter(value="durationEnd")
public final void setDurationEnd(java.lang.String ts)
sets the end of the duration for the optional reference date filtering ( Content.getReferenceDuration()).

Parameters:
ts - the start time in milliseconds since the epoch

getDurationOffset

public final java.lang.Long getDurationOffset()
returns the offset to be used for the reference Duration filtering.

Returns:
the duration offset or 0L if the duration offset is null

setDurationOffset

@RequestBean.Parameter(value="durationOffset")
public final void setDurationOffset(java.lang.String stringValue)
sets the offset to be used for the reference Duration filtering.

Parameters:
stringValue - the offset as string

isDurationGiven

public final boolean isDurationGiven()
returns whether a duration for the optional reference date filtering exists.

Returns:
true, if and only if a filter exists.

getDuration

public final Duration getDuration()
returns the duration for the reference date filtering or null.

If both start and end are set, a corresponding Duration is returned. If the start is set but the end is not set, a Duration of one day beginning at start is returned.
In all other cases this method returns null.

Returns:
the duration for the reference date filtering or null, if undefined

getCalendarSheetScrollDirection

public final Period.Scroll getCalendarSheetScrollDirection()
returns the Period.Scroll.

Returns:
the Period.Scroll

setCalendarSheetScrollDirection

@RequestBean.Parameter(value="scrollDirection")
public final void setCalendarSheetScrollDirection(java.lang.String stringValue)
sets the Period.Scroll.

Parameters:
stringValue - the scroll direction as string