org.sakaiproject.tool.calendar
Class CalendarActionState

java.lang.Object
  extended byorg.sakaiproject.cheftool.ControllerState
      extended byorg.sakaiproject.tool.calendar.CalendarActionState
All Implemented Interfaces:
EventListener, Observer, SessionBindingListener

public class CalendarActionState
extends ControllerState
implements SessionBindingListener

Maintains user interface state for the MyCalendar action class.


Nested Class Summary
 class CalendarActionState.LocalEvent
          Used in the MyCalendar action and associated Velocity templates to store a single calendar event in an arbitrary calendar, not necessary the current primary calendar.
 
Constructor Summary
CalendarActionState()
           
 
Method Summary
 void clearData()
           
 String getAddfields()
           
 List getAttachments()
          Get
 String getCalendarEventId()
           
 org.sakaiproject.tool.calendar.CalendarFilter getCalendarFilter()
          Returns the calendar filter that is currently being used for the list view and printing.
 CalendarUtil getCalObj()
           
 int getcurrentDate()
           
 int getcurrentDay()
           
 int getcurrentMonth()
           
 String getCurrentPage()
           
 int getcurrentYear()
           
 boolean getDelfieldAlertOff()
          Get the status of delfield alert off: true - no alert shown; false - alert shown
 String getfromAttachmentFlag()
           
 String getImportWizardState()
           
 String getImportWizardType()
           
 boolean getIsNewCalendar()
          Get the status of preview: true - view new created; false - view revised existed
 boolean getIsPastAlertOff()
          Get the status of past alert off: true - no alert shown; false - alert shown
 CalendarActionState.LocalEvent getNewData()
           
 int getnewDate()
           
 String getnextDate()
           
 String getprevDate()
           
 String getPrevState()
           
 CalendarEventEdit getPrimaryCalendarEdit()
          Get edit object
 String getPrimaryCalendarReference()
          Gets the main calendar ID associated with the event list.
 String getReturnState()
           
 String getSelectedCalendarReference()
          Gets the currently selected calendar.
 String getState()
           
 List getWizardImportedEvents()
           
protected  void init()
          Init to startup values
 void recycle()
          Release any resources and restore the object to initial conditions to be reused.
 void setAttachments(List attachments)
          Set
 void setCalendarEventId(String calendarReference, String eventId)
           
 void setCalObj(CalendarUtil calObj)
           
 void setcurrentDate(int currentday)
           
 void setcurrentDay(int currentday)
           
 void setcurrentMonth(int currentmonth)
           
 void setCurrentPage(String page)
           
 void setcurrentYear(int currentyear)
           
 void setDelfieldAlertOff(boolean DelfieldAlertOff)
          Set the status of delfield alert off: true - no alert shown; false - alert shown
 void setEdit(CalendarEventEdit edit)
          Set edit The canlender event edit object
 void setfromAttachmentFlag(String flag)
           
 void setImportWizardState(String importWizardState)
           
 void setImportWizardType(String importWizardType)
           
 void setIsNewCalendar(boolean isNewcal)
          Set the status of preview: true - view new created; false - view revised existed
 void setIsPastAlertOff(boolean IsPastAlertOff)
          Set the status of past alert off: true - no alert shown; false - alert shown
 void setNewData(String calendarReference, String title, String description, int month, int day, String year, int hour, int minute, int dhour, int dminute, String type, String Am, String location, Map addfieldsMap, String intentionStr)
           
 void setnewDate(int newday)
           
 void setnextDate(String nextDate)
           
 void setprevDate(String prevDate)
           
 void setPrevState(String state)
           
 void setPrimaryCalendarEdit(CalendarEventEdit edit)
          Get edit The edit object
 void setPrimaryCalendarReference(String reference)
          Sets the main calendar ID associated with the event list.
 void setReturnState(String returnState)
           
 void setSelectedCalendarReference(String string)
          Sets the currently selected calendar.
 void setState(String state)
           
 void setWizardImportedEvents(List wizardImportedEvents)
           
 void update(Observable observable, Object obj)
          This method is called whenever the observed object is changed.
 void valueBound(SessionBindingEvent event)
          SessionBindingListener implementation
 void valueUnbound(SessionBindingEvent event)
          Notifies the object that it is being unbound from a session.
 
Methods inherited from class org.sakaiproject.cheftool.ControllerState
getId, getKey, getSetId, setId, setSetId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CalendarActionState

public CalendarActionState()
Method Detail

getAddfields

public String getAddfields()

getState

public String getState()

setState

public void setState(String state)

getReturnState

public String getReturnState()

setReturnState

public void setReturnState(String returnState)

setPrimaryCalendarEdit

public void setPrimaryCalendarEdit(CalendarEventEdit edit)
Get edit The edit object


getPrimaryCalendarEdit

public CalendarEventEdit getPrimaryCalendarEdit()
Get edit object

Returns:
m_edit The edit object

setCurrentPage

public void setCurrentPage(String page)

getCurrentPage

public String getCurrentPage()

getfromAttachmentFlag

public String getfromAttachmentFlag()

setfromAttachmentFlag

public void setfromAttachmentFlag(String flag)

getAttachments

public List getAttachments()
Get


setAttachments

public void setAttachments(List attachments)
Set


getIsNewCalendar

public boolean getIsNewCalendar()
Get the status of preview: true - view new created; false - view revised existed

Returns:
The current status

setIsNewCalendar

public void setIsNewCalendar(boolean isNewcal)
Set the status of preview: true - view new created; false - view revised existed


getIsPastAlertOff

public boolean getIsPastAlertOff()
Get the status of past alert off: true - no alert shown; false - alert shown

Returns:
IsPastAlertOff

getDelfieldAlertOff

public boolean getDelfieldAlertOff()
Get the status of delfield alert off: true - no alert shown; false - alert shown

Returns:
DelfieldAlertOff

getPrimaryCalendarReference

public String getPrimaryCalendarReference()
Gets the main calendar ID associated with the event list. Many calendars may be merged into this list, but there is only one one calendar that is used for adding/modifying events.


setIsPastAlertOff

public void setIsPastAlertOff(boolean IsPastAlertOff)
Set the status of past alert off: true - no alert shown; false - alert shown

Parameters:
IsPastAlertOff - The status of past alert off: true - no alert shown; false - alert shown

setDelfieldAlertOff

public void setDelfieldAlertOff(boolean DelfieldAlertOff)
Set the status of delfield alert off: true - no alert shown; false - alert shown

Parameters:
DelfieldAlertOff - The status of delfield alert off: true - no alert shown; false - alert shown

setPrimaryCalendarReference

public void setPrimaryCalendarReference(String reference)
Sets the main calendar ID associated with the event list. Many calendars may be merged into this list, but there is only one one calendar that is used for adding/modifying events/


setCalendarEventId

public void setCalendarEventId(String calendarReference,
                               String eventId)

getCalendarEventId

public String getCalendarEventId()

setNewData

public void setNewData(String calendarReference,
                       String title,
                       String description,
                       int month,
                       int day,
                       String year,
                       int hour,
                       int minute,
                       int dhour,
                       int dminute,
                       String type,
                       String Am,
                       String location,
                       Map addfieldsMap,
                       String intentionStr)

clearData

public void clearData()

getNewData

public CalendarActionState.LocalEvent getNewData()

setcurrentDate

public void setcurrentDate(int currentday)

getcurrentDate

public int getcurrentDate()

setnewDate

public void setnewDate(int newday)

getnewDate

public int getnewDate()

setnextDate

public void setnextDate(String nextDate)

getnextDate

public String getnextDate()

setprevDate

public void setprevDate(String prevDate)

getprevDate

public String getprevDate()

getCalObj

public CalendarUtil getCalObj()

setCalObj

public void setCalObj(CalendarUtil calObj)

setPrevState

public void setPrevState(String state)

getPrevState

public String getPrevState()

setcurrentDay

public void setcurrentDay(int currentday)

setcurrentMonth

public void setcurrentMonth(int currentmonth)

setcurrentYear

public void setcurrentYear(int currentyear)

getcurrentDay

public int getcurrentDay()

getcurrentMonth

public int getcurrentMonth()

getcurrentYear

public int getcurrentYear()

recycle

public void recycle()
Description copied from class: ControllerState
Release any resources and restore the object to initial conditions to be reused.

Overrides:
recycle in class ControllerState

init

protected void init()
Description copied from class: ControllerState
Init to startup values

Overrides:
init in class ControllerState

update

public void update(Observable observable,
                   Object obj)
Description copied from class: ControllerState
This method is called whenever the observed object is changed. An application calls an Observable object's notifyObservers method to have all the object's observers notified of the change. default implementation is to cause the courier service to deliver to the interface controlled by my controller. Extensions can override.

Specified by:
update in interface Observer
Overrides:
update in class ControllerState
Parameters:
observable - the observable object.
obj - an argument passed to the notifyObservers method.

getSelectedCalendarReference

public String getSelectedCalendarReference()
Gets the currently selected calendar.


setSelectedCalendarReference

public void setSelectedCalendarReference(String string)
Sets the currently selected calendar.


getCalendarFilter

public org.sakaiproject.tool.calendar.CalendarFilter getCalendarFilter()
Returns the calendar filter that is currently being used for the list view and printing.


setImportWizardState

public void setImportWizardState(String importWizardState)

getImportWizardState

public String getImportWizardState()

setImportWizardType

public void setImportWizardType(String importWizardType)

getImportWizardType

public String getImportWizardType()

setWizardImportedEvents

public void setWizardImportedEvents(List wizardImportedEvents)

getWizardImportedEvents

public List getWizardImportedEvents()

setEdit

public void setEdit(CalendarEventEdit edit)
Set edit The canlender event edit object


valueBound

public void valueBound(SessionBindingEvent event)
SessionBindingListener implementation

Specified by:
valueBound in interface SessionBindingListener
Parameters:
event - the event that identifies the session

valueUnbound

public void valueUnbound(SessionBindingEvent event)
Description copied from interface: SessionBindingListener
Notifies the object that it is being unbound from a session.

Specified by:
valueUnbound in interface SessionBindingListener
Parameters:
event - the event that identifies the session