| java.lang.Object com.sun.portal.app.sharedevents.util.AppUtils
AppUtils | public class AppUtils (Code) | | |
Method Summary | |
public static void | addEventToSearchDatabase(VEvent event) | public static void | deleteEventFromSearchDatabase(VEvent event) | public static String[] | getAttendeeCalIds() | public static Object | getBean(String beanName) | public static DateTime | getContextEnd(DateTime dt, String viewCtx) Returns the context end date-time based on the given date and
view context value passed.
Parameters: dt - Date to be adjusted to context end Parameters: viewCtx - View context to be used to adjust the date passed in 'dt'. | public static DateTime | getContextStart(DateTime dt1, String viewCtx, int firstDayOfWeek) Gets the context start date-time based on the given date and
view context value passed.
Parameters: dt - Date to be adjusted to context start Parameters: viewCtx - View context to be used to adjust the date passed in 'dt'. | public static DateFormat | getDateFormat(Locale locale) | public static DateFormat | getDateFormat(String pattern, int dateStyle) | public static DateFormat | getDateFormat(String pattern, int dateStyle, Locale locale) | public static DateTime | getDateTimeFromDisplayDate(String displayDate, TimeZone tz, String userPrefDateDelimiter) | public static String | getDisplayableDate(DateTime dt, String usersDateFormatPref, String usersDateDelimiterPref) Gets Displayble Date such as mm/dd/yy or dd/mm/yy or 07/30/2002
This displayable date form will be used in events display (tiled view)
in invitations view, events management/search views. | public static String | getDisplayableDateTime(DateTime startdt, DateTime enddt, String usersDateFormatPref, String usersDateDelimiterPref, String usersTimeFormatPref, TimeZone tz) | public static String | getDisplayableHours(DateTime dt, String usersTimeFormatPref) Returns displayable hours string as in 12 hour format or 24 hour format. | public static String | getDisplayableMinutes(DateTime dt, String usersTimeFormatPref) Returns displayable minutes string as in 12 hour format or 24
hour format. | public static String | getDisplayableTime(DateTime dt, String usersTimeFormatPref) Returns displayble time string as in 12 hour format or 24 hour format,
for example it returns displayble time such as 16:45 or 4:45pm. | public static String | getHoursValue(DateTime dt, String usersTimeFormatPref) Returns hours value as in 12 hour format or 24 hour format. | public static String | getLocaleDatePerPattern(DateTime dt, String pattern, int datestyle) | public static String | getMinutesValue(DateTime dt, String usersTimeFormatPref) Returns minutes value as in 12 hour format or 24 hour format. | public static String | getOrganizerCalendarId() | public static Object | getPortletSessionAttribute(String key) | public static ResourceBundle | getResourceBundle() | public static ResourceBundle | getResourceBundle(Locale locale) | public static SearchDatabase | getSearchDatabase() | public static Object | getSessionAttribute(String attr) | public static String[] | getStringArray(Object[] objVals) | public static String | getTargetCalendarId() | public static String | getYearLabel(DateTime dt) | public static boolean | hasSearchResultsInURL() | public static void | removeAttributeFromSession(String attr) | public static void | removePortletSessionAttribute(String key) | public static void | setAttributeInSession(String attr, Object value) | public static boolean | useAttendees() |
addEventToSearchDatabase | public static void addEventToSearchDatabase(VEvent event)(Code) | | |
deleteEventFromSearchDatabase | public static void deleteEventFromSearchDatabase(VEvent event)(Code) | | |
getContextEnd | public static DateTime getContextEnd(DateTime dt, String viewCtx)(Code) | | Returns the context end date-time based on the given date and
view context value passed.
Parameters: dt - Date to be adjusted to context end Parameters: viewCtx - View context to be used to adjust the date passed in 'dt'. Valid values are SharedConstants.VIEW_CTX_DAY, SharedConstants.VIEW_CTX_WEEK, SharedConstants.VIEW_CTX_MONTH. Default view context used is SharedConstants.VIEW_CTX_DAY in case the this value passed is null or invalid. This method clones the given date and then adjust it to the end of thespecified context.For 'day' context it returns date-time for ending of the day, For 'week' context it returns date-time for end date of the week, For 'month' context it returns date-time for end date of the month. For example, advancement will be by 1 day for day view,7 days for week view, one month for month view.It substracts the 'SECOND' component by 1 so that the resultantend date-time will fall within the boundaries of a single day ora single week or a single month. |
getContextStart | public static DateTime getContextStart(DateTime dt1, String viewCtx, int firstDayOfWeek)(Code) | | Gets the context start date-time based on the given date and
view context value passed.
Parameters: dt - Date to be adjusted to context start Parameters: viewCtx - View context to be used to adjust the date passed in 'dt'. Valid values are SharedConstants.VIEW_CTX_DAY, SharedConstants.VIEW_CTX_WEEK, SharedConstants.VIEW_CTX_MONTH. Default view context used is SharedConstants.VIEW_CTX_DAY in case the this value passed is null or invalid. Parameters: firstDayOfWeek - Used in case if viewCtx is SharedConstants.VIEW_CTX_WEEK, otherwise ignored.Valid values are Calendar.SUNDAY, Calendar.MONDAY, .., Calendar.SATURDAY This method clones the given date and then adjust it to the start of thespecified context.For 'day' context it returns date-time for begining of the day, For 'week' context it returns date-time for start date of the week For 'month' context it returns date-time for start date of the month. For 'day' context it resets the hour, minute, second, millisecond components to zero.For 'week' context it resets the hour, minute, second, millisecond components to zero, and resets DAY_OF_WEEK component to user's calendar's week-start-day preference.For 'month' context it resets the hour, minute, second, millisecond components to zero, and resets DAY_OF_MONTH component to 1. |
getDateFormat | public static DateFormat getDateFormat(Locale locale)(Code) | | Iniitalizes the date format for the current locale of this
user.
|
getDateTimeFromDisplayDate | public static DateTime getDateTimeFromDisplayDate(String displayDate, TimeZone tz, String userPrefDateDelimiter)(Code) | | Converts the display date (MM/dd/YYYY, dd/MM/YYYY etc) to DateTime
|
getDisplayableDate | public static String getDisplayableDate(DateTime dt, String usersDateFormatPref, String usersDateDelimiterPref)(Code) | | Gets Displayble Date such as mm/dd/yy or dd/mm/yy or 07/30/2002
This displayable date form will be used in events display (tiled view)
in invitations view, events management/search views.
|
getDisplayableDateTime | public static String getDisplayableDateTime(DateTime startdt, DateTime enddt, String usersDateFormatPref, String usersDateDelimiterPref, String usersTimeFormatPref, TimeZone tz)(Code) | | Gets Displayble Date Time such as mm/dd/yyyy hh:mm (4 hours) or
mm/dd/yyyy hh:mm (1.5 hours)
If the TimeZone is passed, the dates would be converted to that TZ
This displayable date-time form will be used in events display
|
getDisplayableHours | public static String getDisplayableHours(DateTime dt, String usersTimeFormatPref)(Code) | | Returns displayable hours string as in 12 hour format or 24 hour format.
Default user's TimeFormat preference is '12' hour format in case if
'usersTimeFormatPref' value passed is null.
This method will return the appropriate indexed hours displayable
string usable by tiled logic's of events and todos, either from
24'-hours-names-list or from 12'-hours-names-list based on
user's time format preference.
|
getDisplayableMinutes | public static String getDisplayableMinutes(DateTime dt, String usersTimeFormatPref)(Code) | | Returns displayable minutes string as in 12 hour format or 24
hour format.
Default user's TimeFormat preference is '12' hour format in case if
'usersTimeFormatPref' value passed is null.
|
getDisplayableTime | public static String getDisplayableTime(DateTime dt, String usersTimeFormatPref)(Code) | | Returns displayble time string as in 12 hour format or 24 hour format,
for example it returns displayble time such as 16:45 or 4:45pm.
If this method fails to retrieve hours or minutes component or both
then it will returns "??" value; for example in such case it may return
displayble time such as ??:?? or ??:45 or ??:45pm or 16:?? or 4:??.
Default user's TimeFormat preference is '12' hour format in case if
'usersTimeFormatPref' value passed is null.
|
getHoursValue | public static String getHoursValue(DateTime dt, String usersTimeFormatPref)(Code) | | Returns hours value as in 12 hour format or 24 hour format.
Default user's TimeFormat preference is '12' hour format in case if
'usersTimeFormatPref' value passed is null.
|
getLocaleDatePerPattern | public static String getLocaleDatePerPattern(DateTime dt, String pattern, int datestyle)(Code) | | |
getMinutesValue | public static String getMinutesValue(DateTime dt, String usersTimeFormatPref)(Code) | | Returns minutes value as in 12 hour format or 24 hour format.
Default user's TimeFormat preference is '12' hour format in case if
'usersTimeFormatPref' value passed is null.
This method will be useful for EventsModel, TasksModel,
new/edit/update event or task views.
This method will return the appropriate indexed minutes value
usable by EventsModel or TasksModel; either from 24'-minutes-values-list
or from 12'-minutes-values-list based on user's time format preference.
|
getPortletSessionAttribute | public static Object getPortletSessionAttribute(String key)(Code) | | |
getYearLabel | public static String getYearLabel(DateTime dt)(Code) | | |
hasSearchResultsInURL | public static boolean hasSearchResultsInURL()(Code) | | |
removeAttributeFromSession | public static void removeAttributeFromSession(String attr)(Code) | | |
removePortletSessionAttribute | public static void removePortletSessionAttribute(String key)(Code) | | |
setAttributeInSession | public static void setAttributeInSession(String attr, Object value)(Code) | | |
useAttendees | public static boolean useAttendees()(Code) | | |
|
|