org.blojsom.plugin.calendar
Class VelocityHelper

java.lang.Object
  extended byorg.blojsom.plugin.calendar.VelocityHelper

public class VelocityHelper
extends java.lang.Object

VelocityHelper is a class used to help render a visual calendar using the VTL.

Version:
$Id: VelocityHelper.java,v 1.17 2006/01/04 16:53:00 czarneckid Exp $
Author:
Mark Lussier

Constructor Summary
VelocityHelper()
          Public Constructor
VelocityHelper(BlogCalendar calendar)
          Public Constructor
 
Method Summary
 void buildCalendar()
          Builds the visual calendar model
 BlogCalendar getBlogCalendar()
          Retrieve the BlogCalendar object used to construct this object
 java.lang.String getCalendarRow(int row)
          Get the visual content for a given calendar row.
 java.lang.String getCalendarRow(int row, java.lang.String clazz)
          Get the visual content for a given calendar row.
 java.lang.String getCurrentMonthLink()
          Get the link for navigating to the current month
 java.lang.String getCurrentMonthName()
          Get the link for navigating to the next month
 java.lang.String getNextMonth()
          Get the visual control for navigating to the next month
 java.lang.String getNextMonthLink()
          Get the link for navigating to the next month
 java.lang.String getNextMonthName()
          Get the name for navigating to the next month
 java.lang.String getPreviousMonth()
          Get the visual control for navigating to the previous month
 java.lang.String getPreviousMonthLink()
          Get the link for navigating to the previous month
 java.lang.String getPreviousMonthName()
          Get the visual control for navigating to the previous month
 java.lang.String getToday()
          Get the visual control for navigating to Today
 java.lang.String getTodayText()
          Retrieve the text displayed for the "Today" link
 void setCalendar(BlogCalendar calendar)
          Sets the BlogCalendar to render
 void setTodayText(java.lang.String today)
          Set the text displayed for the "Today" link
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VelocityHelper

public VelocityHelper()
Public Constructor


VelocityHelper

public VelocityHelper(BlogCalendar calendar)
Public Constructor

Parameters:
calendar - BlogCalendar to render
Method Detail

setCalendar

public void setCalendar(BlogCalendar calendar)
Sets the BlogCalendar to render

Parameters:
calendar - BlogCalendar

getBlogCalendar

public BlogCalendar getBlogCalendar()
Retrieve the BlogCalendar object used to construct this object

Returns:
BlogCalendar
Since:
blojsom 2.21

buildCalendar

public void buildCalendar()
Builds the visual calendar model


getCalendarRow

public java.lang.String getCalendarRow(int row)
Get the visual content for a given calendar row. If clazz is null, no class attribute will be included in the <td> tag.

Parameters:
row - the row
Returns:
the visual calendar row

getCalendarRow

public java.lang.String getCalendarRow(int row,
                                       java.lang.String clazz)
Get the visual content for a given calendar row. If clazz is null, no class attribute will be included in the <td> tag.

Parameters:
row - the row
clazz - the css style apply
Returns:
the visual calendar row

getToday

public java.lang.String getToday()
Get the visual control for navigating to Today

Returns:
the today navigation control

getPreviousMonth

public java.lang.String getPreviousMonth()
Get the visual control for navigating to the previous month

Returns:
the previous month navigation control

getNextMonth

public java.lang.String getNextMonth()
Get the visual control for navigating to the next month

Returns:
the next month navigation control

getPreviousMonthLink

public java.lang.String getPreviousMonthLink()
Get the link for navigating to the previous month

Returns:
the previous month link
Since:
blojsom 2.21

getPreviousMonthName

public java.lang.String getPreviousMonthName()
Get the visual control for navigating to the previous month

Returns:
the previous month navigation control
Since:
blojsom 2.21

getCurrentMonthLink

public java.lang.String getCurrentMonthLink()
Get the link for navigating to the current month

Returns:
the current month link
Since:
blojsom 2.21

getCurrentMonthName

public java.lang.String getCurrentMonthName()
Get the link for navigating to the next month

Returns:
the next month link
Since:
blojsom 2.21

getNextMonthLink

public java.lang.String getNextMonthLink()
Get the link for navigating to the next month

Returns:
the next month link
Since:
blojsom 2.21

getNextMonthName

public java.lang.String getNextMonthName()
Get the name for navigating to the next month

Returns:
the next month name
Since:
blojsom 2.21

setTodayText

public void setTodayText(java.lang.String today)
Set the text displayed for the "Today" link

Parameters:
today - Text for "Today" link
Since:
blojsom 2.22

getTodayText

public java.lang.String getTodayText()
Retrieve the text displayed for the "Today" link

Returns:
Text for "Today link
Since:
blojsom 2.25