Java Doc for AppUtils.java in  » Portal » Open-Portal » com » sun » portal » app » sharedevents » util » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Portal » Open Portal » com.sun.portal.app.sharedevents.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sun.portal.app.sharedevents.util.AppUtils

AppUtils
public class AppUtils (Code)




Method Summary
public static  voidaddEventToSearchDatabase(VEvent event)
    
public static  voiddeleteEventFromSearchDatabase(VEvent event)
    
public static  String[]getAttendeeCalIds()
    
public static  ObjectgetBean(String beanName)
    
public static  DateTimegetContextEnd(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  DateTimegetContextStart(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  DateFormatgetDateFormat(Locale locale)
    
public static  DateFormatgetDateFormat(String pattern, int dateStyle)
    
public static  DateFormatgetDateFormat(String pattern, int dateStyle, Locale locale)
    
public static  DateTimegetDateTimeFromDisplayDate(String displayDate, TimeZone tz, String userPrefDateDelimiter)
    
public static  StringgetDisplayableDate(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  StringgetDisplayableDateTime(DateTime startdt, DateTime enddt, String usersDateFormatPref, String usersDateDelimiterPref, String usersTimeFormatPref, TimeZone tz)
    
public static  StringgetDisplayableHours(DateTime dt, String usersTimeFormatPref)
     Returns displayable hours string as in 12 hour format or 24 hour format.
public static  StringgetDisplayableMinutes(DateTime dt, String usersTimeFormatPref)
     Returns displayable minutes string as in 12 hour format or 24 hour format.
public static  StringgetDisplayableTime(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  StringgetHoursValue(DateTime dt, String usersTimeFormatPref)
     Returns hours value as in 12 hour format or 24 hour format.
public static  StringgetLocaleDatePerPattern(DateTime dt, String pattern, int datestyle)
    
public static  StringgetMinutesValue(DateTime dt, String usersTimeFormatPref)
     Returns minutes value as in 12 hour format or 24 hour format.
public static  StringgetOrganizerCalendarId()
    
public static  ObjectgetPortletSessionAttribute(String key)
    
public static  ResourceBundlegetResourceBundle()
    
public static  ResourceBundlegetResourceBundle(Locale locale)
    
public static  SearchDatabasegetSearchDatabase()
    
public static  ObjectgetSessionAttribute(String attr)
    
public static  String[]getStringArray(Object[] objVals)
    
public static  StringgetTargetCalendarId()
    
public static  StringgetYearLabel(DateTime dt)
    
public static  booleanhasSearchResultsInURL()
    
public static  voidremoveAttributeFromSession(String attr)
    
public static  voidremovePortletSessionAttribute(String key)
    
public static  voidsetAttributeInSession(String attr, Object value)
    
public static  booleanuseAttendees()
    



Method Detail
addEventToSearchDatabase
public static void addEventToSearchDatabase(VEvent event)(Code)



deleteEventFromSearchDatabase
public static void deleteEventFromSearchDatabase(VEvent event)(Code)



getAttendeeCalIds
public static String[] getAttendeeCalIds() throws Exception(Code)



getBean
public static Object getBean(String beanName)(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.




getDateFormat
public static DateFormat getDateFormat(String pattern, int dateStyle)(Code)



getDateFormat
public static DateFormat getDateFormat(String pattern, int dateStyle, Locale locale)(Code)



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.




getOrganizerCalendarId
public static String getOrganizerCalendarId() throws Exception(Code)



getPortletSessionAttribute
public static Object getPortletSessionAttribute(String key)(Code)



getResourceBundle
public static ResourceBundle getResourceBundle()(Code)



getResourceBundle
public static ResourceBundle getResourceBundle(Locale locale)(Code)



getSearchDatabase
public static SearchDatabase getSearchDatabase()(Code)



getSessionAttribute
public static Object getSessionAttribute(String attr)(Code)



getStringArray
public static String[] getStringArray(Object[] objVals)(Code)



getTargetCalendarId
public static String getTargetCalendarId() throws Exception(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)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.