net.stff.ical.beans
Class CalendarData

java.lang.Object
  extended bynet.stff.ical.beans.CalendarData
All Implemented Interfaces:
net.stff.util.Initializable

public class CalendarData
extends java.lang.Object
implements net.stff.util.Initializable

Stores calendar data for templating. Collates all currently known application data for the current user.

Author:
buntekuh

Field Summary
static int DAYMODE
           
static int EVENTMODE
           
static int MONTHMODE
           
static int NOMODE
           
static int RECURRENCEMODE
           
static int WEEKMODE
           
 
Constructor Summary
CalendarData()
           
 
Method Summary
 java.util.Calendar getCalendar()
          gets the user selected calendar.
 java.util.List getCalendarNames()
           
 java.util.List getCalendars()
           
 ICal getCurrentICal()
           
 java.lang.String getDayName(int day)
           
 int getDayOffset(int d)
           
 java.lang.Object getDays()
           
 int getEventMode()
           
 java.util.List getEventsForPeriod(java.util.Date s, java.util.Date e, java.lang.String user, int which)
           
 java.util.Locale getLocale()
           
 CalendarManager getManager()
           
 int getMode()
           
 java.lang.String getMonthName(int month)
           
 java.util.Calendar getToday()
           
 java.lang.String getUser()
           
 java.util.Vector getWeekDays()
           
 void init(javax.servlet.http.HttpServletRequest request)
           
 void nextDay()
          Adds a day to today
 void nextMonth()
          Adds a month to today
 void nextWeek()
          Adds a week to today
 void prevDay()
          Removes a day from today
 void prevMonth()
          Removes a month from today
 void prevWeek()
          Removes a week from today
 void setCalendar(java.util.Calendar cal)
          Selects a new calendar
 void setCurrentICal(ICal currentICal)
           
 void setCurrentICal(java.lang.String current, java.lang.String user)
           
 void setDay(java.lang.String selectedDay)
          Sets today to a Date relative to the month of today
 void setDays(java.lang.Object days)
          Sets the days property
 void setEventMode(int eventMode)
           
 void setLocale(java.util.Locale locale)
           
 void setMode(int mode)
          Sets the current view mode
 void setToday(java.util.Calendar today)
          Sets the today property
 void setUser(java.lang.String user)
           
 void setWeekDays(java.util.Vector weekdays)
          Sets the weekdays property
 void today()
          Sets today to the current Date
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DAYMODE

public static final int DAYMODE
See Also:
Constant Field Values

WEEKMODE

public static final int WEEKMODE
See Also:
Constant Field Values

MONTHMODE

public static final int MONTHMODE
See Also:
Constant Field Values

NOMODE

public static final int NOMODE
See Also:
Constant Field Values

EVENTMODE

public static final int EVENTMODE
See Also:
Constant Field Values

RECURRENCEMODE

public static final int RECURRENCEMODE
See Also:
Constant Field Values
Constructor Detail

CalendarData

public CalendarData()
Method Detail

init

public void init(javax.servlet.http.HttpServletRequest request)
Specified by:
init in interface net.stff.util.Initializable

getUser

public java.lang.String getUser()
Returns:
Returns the user.

setUser

public void setUser(java.lang.String user)
Parameters:
user - The user to set.

getCalendar

public java.util.Calendar getCalendar()
gets the user selected calendar.

Returns:

setCalendar

public void setCalendar(java.util.Calendar cal)
Selects a new calendar

Parameters:
cal -

setDays

public void setDays(java.lang.Object days)
Sets the days property

Parameters:
days - The days attribute encompasses the data for each day that is currently being viewed. It either is a @see CalendarDay or a @see List thereof.

setWeekDays

public void setWeekDays(java.util.Vector weekdays)
Sets the weekdays property

Parameters:
weekdays - Weekdays is a Vector of seven Integers consisting of @see java.util.Calendar.SUNDAY through to @see java.util.Calendar.SATURDAY ordered according to the current Locale.

getDays

public java.lang.Object getDays()
Returns:
Returns the days property

getWeekDays

public java.util.Vector getWeekDays()
Returns:
Returns the weekdays property

getMode

public int getMode()
Returns:
Returns the current view mode

setMode

public void setMode(int mode)
Sets the current view mode

Parameters:
mode -

getEventMode

public int getEventMode()
Returns:
Returns the eventMode.

setEventMode

public void setEventMode(int eventMode)
Parameters:
eventMode - The eventMode to set. The eventmode defines what additional data is to be viewed.

setToday

public void setToday(java.util.Calendar today)
Sets the today property

Parameters:
today - Today is the special Date that is to be shown

getToday

public java.util.Calendar getToday()
Returns:
Returns the today property

getDayOffset

public int getDayOffset(int d)

today

public void today()
Sets today to the current Date


nextMonth

public void nextMonth()
Adds a month to today


prevMonth

public void prevMonth()
Removes a month from today


nextWeek

public void nextWeek()
Adds a week to today


prevWeek

public void prevWeek()
Removes a week from today


nextDay

public void nextDay()
Adds a day to today


prevDay

public void prevDay()
Removes a day from today


setDay

public void setDay(java.lang.String selectedDay)
Sets today to a Date relative to the month of today

Parameters:
selectedDay - Represents the Date today is to be set to. A large value may change month and year to a respective Date in the future, a negative value to a month in the past.

getLocale

public java.util.Locale getLocale()
Returns:
Returns the locale.

setLocale

public void setLocale(java.util.Locale locale)
Parameters:
locale - The locale to set.

getMonthName

public java.lang.String getMonthName(int month)

getDayName

public java.lang.String getDayName(int day)

getManager

public CalendarManager getManager()
Returns:
Returns the manager.

getCurrentICal

public ICal getCurrentICal()
Returns:
Returns the current calendar.

setCurrentICal

public void setCurrentICal(ICal currentICal)
Parameters:
currentICal - The currentICal to set.

setCurrentICal

public void setCurrentICal(java.lang.String current,
                           java.lang.String user)

getEventsForPeriod

public java.util.List getEventsForPeriod(java.util.Date s,
                                         java.util.Date e,
                                         java.lang.String user,
                                         int which)

getCalendarNames

public java.util.List getCalendarNames()

getCalendars

public java.util.List getCalendars()


Copyright © 2004-2005 stoffwechsel development GbR. All Rights Reserved.