public class BusinessCalendarModel extends Object implements IContentProvider
Modifier and Type | Field and Description |
---|---|
static String |
ADJUSTMENT_CURRENT_DAY_END |
static String |
ADJUSTMENT_CURRENT_DAY_START |
static String |
ADJUSTMENT_NEXT_DAY_END |
static String |
ADJUSTMENT_NEXT_DAY_START |
Constructor and Description |
---|
BusinessCalendarModel() |
Modifier and Type | Method and Description |
---|---|
String |
getBaseAdjustment()
Get the adjustment setting used in the resulting day calculation.
|
Object |
getBaseDateTime()
Get the base date time to be evaluated by the selected
calendar and used to calculate the result date time.
|
protected IWorkdayCalendar |
getCalendarByID(String calendarID) |
protected Date |
getCalendarEvaluatorBaseDate()
Get the base date time as a date.
|
Object |
getCorporateCalendar()
Get the object stored as the corporate calendar.
|
String |
getDateTimeFormat()
Get the date time format used to convert a String value to a date.
|
Object[] |
getPropertyKeys()
Get property keys method required by IContentProvider.
|
Date |
getResultDateTime()
Calculate the resulting date time.
|
Class<?> |
getType(Object propertyName)
Get type method required by IContentProvider.
|
Object |
getUserCalendar()
Get the object stored as the user calendar.
|
Object |
getValue(Object propertyName)
Get value method required by IContentProvider.
|
int |
getWorkdays()
Get work days in a week.
|
int |
getWorkhours()
Get work hours for a day.
|
int |
getWorkminutes()
Get the number of minutes in a work day.
|
boolean |
hasProperty(Object propertyName)
Has property method required by IContentProvider.
|
boolean |
isUseUserPersonalCalendar()
Is the user's personal calendar being used for
the result date time calculation
verses the default corporate calendar.
|
void |
setBaseAdjustment(String baseAdjustment)
Adjust the base date time used in the resulting day calculation.
|
void |
setBaseDateTime(Object baseDateTime)
Set the base date time to be evaluated by the selected
calendar and used to calculate the result date time.
|
void |
setCorporateCalendar(Object corpCalendar)
Set the calendar object ID or alias for the corporate calendar.
|
void |
setDateTimeFormat(String dateFormat)
Set the date time format used to convert a String value to a date.
|
void |
setUserCalendar(Object userCalendar)
Set the value for the user calendar.
|
void |
setUseUserPersonalCalendar(boolean useUserPersonalCalendar)
Use the user's personal calendar for calculation
verses the default corporate calendar.
|
void |
setWorkdays(int workdays)
Set the number of work days in a week.
|
void |
setWorkhours(int workhours)
Set the number of work hours for a day.
|
void |
setWorkminutes(int workminutes)
Set the number of minutes in a work day.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
toString
public static final String ADJUSTMENT_CURRENT_DAY_START
public static final String ADJUSTMENT_CURRENT_DAY_END
public static final String ADJUSTMENT_NEXT_DAY_START
public static final String ADJUSTMENT_NEXT_DAY_END
public Object[] getPropertyKeys()
getPropertyKeys
in interface IContentProvider
public Class<?> getType(Object propertyName) throws PropertyNotFoundException
getType
in interface IContentProvider
propertyName
- PropertyNotFoundException
- if property is not supportedpublic Object getValue(Object propertyName) throws ELException, PropertyNotFoundException
getValue
in interface IContentProvider
propertyName
- PropertyNotFoundException
- if property is not supportedELException
public boolean hasProperty(Object propertyName)
hasProperty
in interface IContentProvider
propertyName
- public Date getResultDateTime() throws ContentProviderException
ContentProviderException
public Object getCorporateCalendar()
ICalendarManager
public void setCorporateCalendar(Object corpCalendar)
corpCalendar
- The calendar object ID or alias.ICalendarManager
public Object getUserCalendar()
ICalendarManager
public void setUserCalendar(Object userCalendar)
userCalendar
- A IThingID, URI, or String value that resolves a URI.ICalendarManager
public boolean isUseUserPersonalCalendar()
public void setUseUserPersonalCalendar(boolean useUserPersonalCalendar)
useUserPersonalCalendar
- True to use a personal calendar. False to use the default calendar.public Object getBaseDateTime()
public void setBaseDateTime(Object baseDateTime)
baseDateTime
- The object to be use for the result date time calculations.public String getDateTimeFormat()
SimpleDateFormat
public void setDateTimeFormat(String dateFormat)
dateFormat
- A String to convert a date to a Date object. Example: "MM/dd/yyyy"SimpleDateFormat
public int getWorkdays()
public void setWorkdays(int workdays)
workdays
- The work days in a weekpublic int getWorkhours()
public void setWorkhours(int workhours)
workhours
- The number of work hours in a day.public int getWorkminutes()
public void setWorkminutes(int workminutes)
workminutes
- The number of minutes in a work daypublic String getBaseAdjustment()
public void setBaseAdjustment(String baseAdjustment)
Valid values are:
ADJUSTMENT_CURRENT_DAY_START - adjust to the start of the base date.
ADJUSTMENT_CURRENT_DAY_END - adjust to the end of the base date.
ADJUSTMENT_NEXT_DAY_START - adjust to the start of the day after the base date.
ADJUSTMENT_NEXT_DAY_END - adjust to the end of the day after the base date.
Null or any other value - skip adjustment.
Clears the cached resulting date time.baseAdjustment
- The setting to adjust the base time.protected IWorkdayCalendar getCalendarByID(String calendarID) throws CalendarException
CalendarException
protected Date getCalendarEvaluatorBaseDate() throws Exception
Exception