|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.myfaces.custom.schedule.util.ScheduleUtil
public class ScheduleUtil
Some utility methods
Method Summary | |
---|---|
static boolean |
areEquivalentIntervals(TreeSet intervals1,
TreeSet intervals2)
Check if two sets of intervals are equivalent. |
static boolean |
canModifyValue(javax.faces.component.UIComponent component)
Check if the value of the given component can be modified |
static int |
compareDays(Date date1,
Date date2,
TimeZone tz)
Compare 2 dates after truncating them. |
static boolean |
getBooleanProperty(javax.faces.component.UIComponent component,
Boolean property,
String key,
boolean defaultValue)
Get the boolean value of a UIComponent, even if it is a value binding expression. |
static boolean |
getBooleanValue(Object attributeValue,
boolean valueIfNull)
Get the boolean value of an attribute |
static Calendar |
getCalendarInstance(Date date,
TimeZone timeZone)
|
static Date |
getDateFromId(String id,
TimeZone timeZone)
get a date from the given date ID |
static String |
getDateId(Date date,
TimeZone timeZone)
get a String identifying this date |
static float |
getFloatProperty(javax.faces.component.UIComponent component,
Float property,
String key,
float defaultValue)
Get the float value of a UIComponent, even if it is a value binding expression. |
static int |
getHashCodeForDay(Date date,
TimeZone tz)
Get the hashcode for the truncated date |
static int |
getIntegerProperty(javax.faces.component.UIComponent component,
Integer property,
String key,
int defaultValue)
Get the int value of a UIComponent, even if it is a value binding expression. |
static Object |
getObjectProperty(javax.faces.component.UIComponent component,
Object property,
String key,
Object defaultValue)
Get the object value of a UIComponent, even if it is a value binding expression. |
static String |
getStringProperty(javax.faces.component.UIComponent component,
String property,
String key,
String defaultValue)
Get the String value of a UIComponent, even if it is a value binding expression. |
static boolean |
isBindingExpression(Object value)
Check if the value of a UIComponent is a value or method binding expression. |
static boolean |
isSameDay(Date date1,
Date date2,
TimeZone tz)
Check if the 2 dates are in the same day. |
static boolean |
isSameTime(Date date1,
Date date2)
Check if the 2 dates are at the same time of day. |
static Date |
truncate(Date date,
TimeZone tz)
truncate the given Date to 00:00:00 that same day |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static boolean isBindingExpression(Object value)
Check if the value of a UIComponent is a value or method binding expression.
value
- the value to check
public static boolean getBooleanProperty(javax.faces.component.UIComponent component, Boolean property, String key, boolean defaultValue)
Get the boolean value of a UIComponent, even if it is a value binding expression.
component
- the componentproperty
- the propertykey
- the key of the value bindingdefaultValue
- the default value
public static boolean getBooleanValue(Object attributeValue, boolean valueIfNull)
Get the boolean value of an attribute
attributeValue
- the attribute valuevalueIfNull
- the default value
public static float getFloatProperty(javax.faces.component.UIComponent component, Float property, String key, float defaultValue)
Get the float value of a UIComponent, even if it is a value binding expression.
component
- the componentproperty
- the propertykey
- the key of the value bindingdefaultValue
- the default value
public static int getHashCodeForDay(Date date, TimeZone tz)
Get the hashcode for the truncated date
date
- the date
public static int getIntegerProperty(javax.faces.component.UIComponent component, Integer property, String key, int defaultValue)
Get the int value of a UIComponent, even if it is a value binding expression.
component
- the componentproperty
- the propertykey
- the key of the value bindingdefaultValue
- the default value
public static Object getObjectProperty(javax.faces.component.UIComponent component, Object property, String key, Object defaultValue)
Get the object value of a UIComponent, even if it is a value binding expression.
component
- the componentproperty
- the propertykey
- the key of the value bindingdefaultValue
- the default value
public static boolean isSameDay(Date date1, Date date2, TimeZone tz)
Check if the 2 dates are in the same day.
date1
- the first datedate2
- the second date
public static boolean isSameTime(Date date1, Date date2)
Check if the 2 dates are at the same time of day.
date1
- the first datedate2
- the second date
public static boolean areEquivalentIntervals(TreeSet intervals1, TreeSet intervals2)
Check if two sets of intervals are equivalent. Intervals are equivalent if their label is the same and they begin and end at the same time of day.
intervals1
- the first set of intervalsintervals2
- the second set of intervals
public static String getStringProperty(javax.faces.component.UIComponent component, String property, String key, String defaultValue)
Get the String value of a UIComponent, even if it is a value binding expression.
component
- the componentproperty
- the propertykey
- the key of the value bindingdefaultValue
- the default value
public static boolean canModifyValue(javax.faces.component.UIComponent component)
Check if the value of the given component can be modified
component
- the component
public static int compareDays(Date date1, Date date2, TimeZone tz)
Compare 2 dates after truncating them.
date1
- the first datedate2
- the second date
public static Date truncate(Date date, TimeZone tz)
date
- the date that should be truncated
public static String getDateId(Date date, TimeZone timeZone)
date
- the date
public static Date getDateFromId(String id, TimeZone timeZone)
id
- the date ID
public static Calendar getCalendarInstance(Date date, TimeZone timeZone)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |