org.exoplatform.calendar.webui
Class UICalendarView
java.lang.Object
org.exoplatform.webui.core.UIComponent
org.exoplatform.webui.core.UIContainer
org.exoplatform.webui.form.UIForm
org.exoplatform.calendar.webui.UICalendarView
- All Implemented Interfaces:
- CalendarView
- Direct Known Subclasses:
- UIDayView, UIListView, UIMiniCalendar, UIMonthView, UIPreview, UIWeekView
public abstract class UICalendarView
- extends org.exoplatform.webui.form.UIForm
- implements CalendarView
Created by The eXo Platform SARL Author : Hung Nguyen
hung.nguyen@exoplatform.com Aus 01, 2007 2:48:18 PM
| Nested classes/interfaces inherited from class org.exoplatform.webui.core.UIContainer |
org.exoplatform.webui.core.UIContainer.SelectTabActionListener |
| Fields inherited from class org.exoplatform.webui.form.UIForm |
ACTION, SUBCOMPONENT_ID |
| Fields inherited from class org.exoplatform.webui.core.UIComponent |
AJAX_ASYNC, config, OBJECTID, UICOMPONENT, uiparent |
|
Method Summary |
void |
applySeting()
|
protected Calendar |
getBeginDay(Calendar cal)
|
org.exoplatform.calendar.service.CalendarSetting |
getCalendarSetting()
|
LinkedHashMap<String,String> |
getColors()
|
protected String[] |
getContextMenu()
|
Calendar |
getCurrentCalendar()
|
protected Date |
getCurrentDate()
|
protected int |
getCurrentDay()
|
protected int |
getCurrentMonth()
|
org.exoplatform.calendar.service.CalendarEvent |
getcurrentOccurrence()
|
protected int |
getCurrentWeek()
|
protected int |
getCurrentYear()
|
protected Calendar |
getDateByValue(int year,
int month,
int day,
int type,
int value)
|
protected String |
getDateFormat()
|
protected String |
getDateTimeFormat()
|
String |
getDateTimeString(Date date)
|
protected String |
getDayName(int day)
|
protected int |
getDayOfWeek(int year,
int month,
int day)
|
protected int |
getDaysInMonth()
|
protected int |
getDaysInMonth(int month,
int year)
|
protected String[] |
getDaysName()
|
abstract String |
getDefaultStartTimeOfEvent()
The returned value of this function is used to initialize start time for
event form which is rendered when user click "add event" or "add task" |
protected int |
getDefaultTimeInterval()
|
protected List<String> |
getDisplayTimes(String timeFormat,
int timeInterval)
|
protected List<String> |
getDisplayTimes(String timeFormat,
int timeInterval,
Locale locale)
|
protected Calendar |
getEndDay(Calendar cal)
|
String |
getEndTime()
|
String[] |
getFilterCalendarIds()
|
protected Calendar |
getInstanceTempCalendar()
|
String |
getLabel(String arg)
|
String |
getLastUpdatedEventId()
|
List<org.exoplatform.calendar.service.CalendarEvent> |
getList()
|
protected String |
getMonthName(int month)
|
protected String[] |
getMonthsName()
|
String |
getPriority(String key)
|
List<String> |
getPrivateCalendars()
|
String[] |
getPublicCalendars()
|
protected List<org.exoplatform.calendar.service.GroupCalendarData> |
getPublicCalendars(String username)
|
protected String[] |
getQuickEditMenu()
|
Map<String,Map<String,org.exoplatform.calendar.service.CalendarEvent>> |
getRecurrenceMap()
Get data about recurrence events
Each item of the map has the key is the eventid of recurrence event. |
protected String |
getSelectedCategory()
|
List<org.exoplatform.calendar.service.CalendarEvent> |
getSelectedEvents(String eventIds)
|
List<String> |
getSharedCalendars()
|
String |
getStartTime()
|
protected String |
getTimeFormat()
|
protected int |
getTimeInterval()
|
protected Map<String,String> |
getTimeSteps(String timeFormat,
int timeInterval)
|
protected String[] |
getViews()
|
String |
getViewType()
|
protected void |
gotoDate(int day,
int month,
int year)
|
protected boolean |
isCurrentDay(int day,
int month,
int year)
|
protected boolean |
isCurrentMonth(int month,
int year)
|
protected boolean |
isCurrentWeek(int week,
int month,
int year)
|
protected boolean |
isEventEditable(org.exoplatform.calendar.service.CalendarEvent event)
return edit permission of user to event |
boolean |
isInSpace()
|
protected boolean |
isSameDate(Calendar date1,
Calendar date2)
|
protected boolean |
isSameDate(Date value1,
Date value2)
|
boolean |
isShowWorkingTime()
|
protected String |
keyGen(int day,
int month,
int year)
|
protected void |
moveCalendarTo(int field,
int amount)
|
protected void |
moveEvents(List<org.exoplatform.calendar.service.CalendarEvent> events,
String toCalendarId,
String toType)
|
void |
processRender(org.exoplatform.webui.application.WebuiRequestContext arg0)
|
void |
refresh()
|
protected void |
removeEvents(List<org.exoplatform.calendar.service.CalendarEvent> events)
|
protected String |
renderDateTimeString(Date date)
|
protected String |
renderDayString(Date date)
|
protected String |
renderDayViewInTitleBar(String monthOpenTag,
String monthCloseTag,
String yearOpenTag,
String yearCloseTag)
|
protected String |
renderTimeString(Date date)
|
void |
setCalendarSetting(org.exoplatform.calendar.service.CalendarSetting calendarSetting_)
|
void |
setCurrentCalendar(Calendar value)
|
protected void |
setCurrentDate(Date value)
|
protected void |
setCurrentDay(int day)
|
protected void |
setCurrentMonth(int month)
|
void |
setCurrentOccurrence(org.exoplatform.calendar.service.CalendarEvent currentOccurrence)
|
protected void |
setCurrentWeek(int week)
|
protected void |
setCurrentYear(int year)
|
void |
setLastUpdatedEventId(String eventId)
|
void |
setSelectedCategory(String id)
|
void |
setViewType(String viewType)
|
void |
update()
|
| Methods inherited from class org.exoplatform.webui.form.UIForm |
addUIComponentInput, addUIFormInput, addUIFormInput, begin, end, event, event, event, getActions, getLabel, getSubmitAction, getUICheckBoxInput, getUIComponentName, getUIFormCheckBoxInput, getUIFormDateTimeInput, getUIFormInputInfo, getUIFormSelectBox, getUIFormTextAreaInput, getUIInput, getUIStringInput, invokeGetBindingBean, invokeSetBindingBean, isMultipart, renderField, renderField, reset, setActions, setMultiPart, setSubmitAction, url |
| Methods inherited from class org.exoplatform.webui.core.UIContainer |
addChild, addChild, findComponentById, findComponentOfType, findFirstComponentOfType, getChild, getChild, getChildById, getChildren, hasChildren, removeChild, removeChildById, renderChild, renderChild, renderChild, renderChild, renderChildren, renderChildren, renderUIComponent, replaceChild, replaceChild, setChildren, setRenderedChild, setRenderedChild, setRenderedChildrenOfTypes |
| Methods inherited from class org.exoplatform.webui.core.UIComponent |
broadcast, createEvent, createUIComponent, createUIComponent, createUIComponent, doAsync, event, getAncestorOfType, getApplicationComponent, getComponentConfig, getId, getName, getParent, getTemplate, getTemplateResourceResolver, isRendered, loadConfirmMesssage, processAction, processDecode, renderEventURL, setComponentConfig, setComponentConfig, setId, setParent, setRendered, setRenderSibling, url, url |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EVENT_CATEGORIES
protected static final String EVENT_CATEGORIES
TYPE_NONE
public static final int TYPE_NONE
- See Also:
- Constant Field Values
TYPE_DAY
public static final int TYPE_DAY
- See Also:
- Constant Field Values
TYPE_WEEK
public static final int TYPE_WEEK
- See Also:
- Constant Field Values
TYPE_MONTH
public static final int TYPE_MONTH
- See Also:
- Constant Field Values
ACT_NEXT
public static final String ACT_NEXT
ACT_PREVIOUS
public static final String ACT_PREVIOUS
CALNAME
public static final String CALNAME
CALENDARID
public static final String CALENDARID
CALTYPE
public static final String CALTYPE
EVENTID
public static final String EVENTID
START_TIME
public static final String START_TIME
- See Also:
- Constant Field Values
FINISH_TIME
public static final String FINISH_TIME
- See Also:
- Constant Field Values
DAY
public static final String DAY
MONTH
public static final String MONTH
YEAR
public static final String YEAR
ISOCCUR
public static final String ISOCCUR
RECURID
public static final String RECURID
TYPE_EVENT
public static final String TYPE_EVENT
TYPE_TASK
public static final String TYPE_TASK
TYPE_BOTH
public static final String TYPE_BOTH
ACT_ADDNEW_EVENT
public static final String ACT_ADDNEW_EVENT
ACT_ADDNEW_TASK
public static final String ACT_ADDNEW_TASK
CONTEXT_MENU
public static final String[] CONTEXT_MENU
ACT_VIEW
public static final String ACT_VIEW
ACT_EDIT
public static final String ACT_EDIT
ACT_DELETE
public static final String ACT_DELETE
QUICKEDIT_MENU
public static final String[] QUICKEDIT_MENU
calendar_
protected Calendar calendar_
displayTimes_
protected List<String> displayTimes_
timeSteps_
protected Map<String,String> timeSteps_
isShowEvent_
public boolean isShowEvent_
calendarSetting_
protected org.exoplatform.calendar.service.CalendarSetting calendarSetting_
privateCalendarIds
protected List<String> privateCalendarIds
publicCalendarIds
protected List<String> publicCalendarIds
instanceTempCalendar_
protected Calendar instanceTempCalendar_
monthsName_
public static final Map<Integer,String> monthsName_
dfs_
protected DateFormatSymbols dfs_
recurrenceEventsMap
protected Map<String,Map<String,org.exoplatform.calendar.service.CalendarEvent>> recurrenceEventsMap
UICalendarView
public UICalendarView()
throws Exception
- Throws:
Exception
getDefaultStartTimeOfEvent
public abstract String getDefaultStartTimeOfEvent()
- The returned value of this function is used to initialize start time for
event form which is rendered when user click "add event" or "add task"
- Returns:
- string of time value in milliseconds.
renderDayViewInTitleBar
protected String renderDayViewInTitleBar(String monthOpenTag,
String monthCloseTag,
String yearOpenTag,
String yearCloseTag)
getInstanceTempCalendar
protected Calendar getInstanceTempCalendar()
- Returns:
- an instance of GregorianCalendar with time zone as of calendar
setting.
applySeting
public void applySeting()
throws Exception
- Specified by:
applySeting in interface CalendarView
- Throws:
Exception
setViewType
public void setViewType(String viewType)
getViewType
public String getViewType()
getViews
protected String[] getViews()
setLastUpdatedEventId
public void setLastUpdatedEventId(String eventId)
- Specified by:
setLastUpdatedEventId in interface CalendarView
getLastUpdatedEventId
public String getLastUpdatedEventId()
- Specified by:
getLastUpdatedEventId in interface CalendarView
getPublicCalendars
public String[] getPublicCalendars()
throws Exception
- Throws:
Exception
getPrivateCalendars
public List<String> getPrivateCalendars()
throws Exception
- Throws:
Exception
getSharedCalendars
public List<String> getSharedCalendars()
throws Exception
- Throws:
Exception
getFilterCalendarIds
public String[] getFilterCalendarIds()
throws Exception
- Throws:
Exception
getPublicCalendars
protected List<org.exoplatform.calendar.service.GroupCalendarData> getPublicCalendars(String username)
throws Exception
- Throws:
Exception
isEventEditable
protected boolean isEventEditable(org.exoplatform.calendar.service.CalendarEvent event)
throws Exception
- return edit permission of user to event
- Parameters:
event -
- Returns:
-
- Throws:
Exception- See Also:
UIWeekview.gtmpl, UIDayview.gtmpl, UIDayview.gtmpl - used
in template
getColors
public LinkedHashMap<String,String> getColors()
refresh
public void refresh()
throws Exception
- Specified by:
refresh in interface CalendarView
- Throws:
Exception
isInSpace
public boolean isInSpace()
- Specified by:
isInSpace in interface CalendarView
renderDateTimeString
protected String renderDateTimeString(Date date)
renderDayString
protected String renderDayString(Date date)
renderTimeString
protected String renderTimeString(Date date)
update
public void update()
throws Exception
- Specified by:
update in interface CalendarView
- Throws:
Exception
getSelectedCategory
protected String getSelectedCategory()
setSelectedCategory
public void setSelectedCategory(String id)
- Specified by:
setSelectedCategory in interface CalendarView
getMonthsName
protected String[] getMonthsName()
getDaysName
protected String[] getDaysName()
getDateByValue
protected Calendar getDateByValue(int year,
int month,
int day,
int type,
int value)
getDaysInMonth
protected int getDaysInMonth()
getDaysInMonth
protected int getDaysInMonth(int month,
int year)
getDayOfWeek
protected int getDayOfWeek(int year,
int month,
int day)
getMonthName
protected String getMonthName(int month)
getDayName
protected String getDayName(int day)
keyGen
protected String keyGen(int day,
int month,
int year)
getList
public List<org.exoplatform.calendar.service.CalendarEvent> getList()
throws Exception
- Throws:
Exception
gotoDate
protected void gotoDate(int day,
int month,
int year)
isCurrentDay
protected boolean isCurrentDay(int day,
int month,
int year)
isCurrentWeek
protected boolean isCurrentWeek(int week,
int month,
int year)
isCurrentMonth
protected boolean isCurrentMonth(int month,
int year)
isSameDate
protected boolean isSameDate(Calendar date1,
Calendar date2)
isSameDate
protected boolean isSameDate(Date value1,
Date value2)
setCurrentCalendar
public void setCurrentCalendar(Calendar value)
- Specified by:
setCurrentCalendar in interface CalendarView
getCurrentCalendar
public Calendar getCurrentCalendar()
- Specified by:
getCurrentCalendar in interface CalendarView
getCurrentDate
protected Date getCurrentDate()
setCurrentDate
protected void setCurrentDate(Date value)
getCurrentDay
protected int getCurrentDay()
setCurrentDay
protected void setCurrentDay(int day)
getCurrentWeek
protected int getCurrentWeek()
setCurrentWeek
protected void setCurrentWeek(int week)
getCurrentMonth
protected int getCurrentMonth()
setCurrentMonth
protected void setCurrentMonth(int month)
getCurrentYear
protected int getCurrentYear()
setCurrentYear
protected void setCurrentYear(int year)
moveCalendarTo
protected void moveCalendarTo(int field,
int amount)
throws Exception
- Throws:
Exception
removeEvents
protected void removeEvents(List<org.exoplatform.calendar.service.CalendarEvent> events)
throws Exception
- Throws:
Exception
moveEvents
protected void moveEvents(List<org.exoplatform.calendar.service.CalendarEvent> events,
String toCalendarId,
String toType)
throws Exception
- Throws:
Exception
getBeginDay
protected Calendar getBeginDay(Calendar cal)
getEndDay
protected Calendar getEndDay(Calendar cal)
getContextMenu
protected String[] getContextMenu()
getQuickEditMenu
protected String[] getQuickEditMenu()
getDisplayTimes
protected List<String> getDisplayTimes(String timeFormat,
int timeInterval)
getDisplayTimes
protected List<String> getDisplayTimes(String timeFormat,
int timeInterval,
Locale locale)
getTimeSteps
protected Map<String,String> getTimeSteps(String timeFormat,
int timeInterval)
getDateFormat
protected String getDateFormat()
getDateTimeFormat
protected String getDateTimeFormat()
getTimeInterval
protected int getTimeInterval()
getDefaultTimeInterval
protected int getDefaultTimeInterval()
getTimeFormat
protected String getTimeFormat()
setCalendarSetting
public void setCalendarSetting(org.exoplatform.calendar.service.CalendarSetting calendarSetting_)
getCalendarSetting
public org.exoplatform.calendar.service.CalendarSetting getCalendarSetting()
isShowWorkingTime
public boolean isShowWorkingTime()
getStartTime
public String getStartTime()
getEndTime
public String getEndTime()
getPriority
public String getPriority(String key)
getLabel
public String getLabel(String arg)
- Overrides:
getLabel in class org.exoplatform.webui.form.UIForm
processRender
public void processRender(org.exoplatform.webui.application.WebuiRequestContext arg0)
throws Exception
- Overrides:
processRender in class org.exoplatform.webui.form.UIForm
- Throws:
Exception
getSelectedEvents
public List<org.exoplatform.calendar.service.CalendarEvent> getSelectedEvents(String eventIds)
throws Exception
- Throws:
Exception
getRecurrenceMap
public Map<String,Map<String,org.exoplatform.calendar.service.CalendarEvent>> getRecurrenceMap()
- Get data about recurrence events
Each item of the map has the key is the eventid of recurrence event.
The value of the map contains all occurrence events with the key is the recurrence-id
- Returns:
- the Map contains recurrence events data
setCurrentOccurrence
public void setCurrentOccurrence(org.exoplatform.calendar.service.CalendarEvent currentOccurrence)
getcurrentOccurrence
public org.exoplatform.calendar.service.CalendarEvent getcurrentOccurrence()
getDateTimeString
public String getDateTimeString(Date date)
Copyright © 2003-2013 eXo Platform SAS. All Rights Reserved.