|
||||||||||
| 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
Some utility methods
| Constructor Summary | |
ScheduleUtil()
|
|
| Method Summary | |
static boolean |
canModifyValue(javax.faces.component.UIComponent component)
Check if the value of the given component can be modified |
static int |
compareDays(java.util.Date date1,
java.util.Date date2)
Compare 2 dates after truncating them. |
static boolean |
getBooleanProperty(javax.faces.component.UIComponent component,
java.lang.Boolean property,
java.lang.String key,
boolean defaultValue)
Get the boolean value of a UIComponent, even if it is a value binding expression. |
static boolean |
getBooleanValue(java.lang.Object attributeValue,
boolean valueIfNull)
Get the boolean value of an attribute |
static float |
getFloatProperty(javax.faces.component.UIComponent component,
java.lang.Float property,
java.lang.String key,
float defaultValue)
Get the float value of a UIComponent, even if it is a value binding expression. |
static int |
getHashCodeForDay(java.util.Date date)
Get the hashcode for the truncated date |
static int |
getIntegerProperty(javax.faces.component.UIComponent component,
java.lang.Integer property,
java.lang.String key,
int defaultValue)
Get the int value of a UIComponent, even if it is a value binding expression. |
static java.lang.Object |
getObjectProperty(javax.faces.component.UIComponent component,
java.lang.Object property,
java.lang.String key,
java.lang.Object defaultValue)
Get the object value of a UIComponent, even if it is a value binding expression. |
static java.lang.String |
getStringProperty(javax.faces.component.UIComponent component,
java.lang.String property,
java.lang.String key,
java.lang.String defaultValue)
Get the String value of a UIComponent, even if it is a value binding expression. |
static boolean |
isBindingExpression(java.lang.Object value)
Check if the value of a UIComponent is a value or method binding expression. |
static boolean |
isSameDay(java.util.Date date1,
java.util.Date date2)
Check if the 2 dates are in the same day. |
static java.util.Date |
truncate(java.util.Date date)
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 |
| Constructor Detail |
public ScheduleUtil()
| Method Detail |
public static boolean isBindingExpression(java.lang.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,
java.lang.Boolean property,
java.lang.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(java.lang.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,
java.lang.Float property,
java.lang.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(java.util.Date date)
Get the hashcode for the truncated date
date - the date
public static int getIntegerProperty(javax.faces.component.UIComponent component,
java.lang.Integer property,
java.lang.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 java.lang.Object getObjectProperty(javax.faces.component.UIComponent component,
java.lang.Object property,
java.lang.String key,
java.lang.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(java.util.Date date1,
java.util.Date date2)
Check if the 2 dates are in the same day.
date1 - the first datedate2 - the second date
public static java.lang.String getStringProperty(javax.faces.component.UIComponent component,
java.lang.String property,
java.lang.String key,
java.lang.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(java.util.Date date1,
java.util.Date date2)
Compare 2 dates after truncating them.
date1 - the first datedate2 - the second date
public static java.util.Date truncate(java.util.Date date)
date - the date that should be truncated
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||