Class CalendarException
- java.lang.Object
-
- com.aspose.tasks.CalendarException
-
public final class CalendarException extends Object
Represent exceptional time periods in a calendar.
-
-
Constructor Summary
Constructors Constructor Description CalendarException()
Initializes a new instance of theCalendarException
class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
checkException(Date dt)
Returns true if the specified instance of theDate
struct is the exception day.void
delete()
Deletes the Exception instance from parent calendar CalendarExceptionCollection object.DayTypeCollection
getDaysOfWeek()
Gets the DayTypeCollection for this object.boolean
getDayWorking()
Gets a value indicating whether the specified date or day type is working.boolean
getEnteredByOccurrences()
Gets a value indicating whether the range of recurrence is defined by entering a number of occurrences.Iterable<Date>
getExceptionDates()
Returns dates on which the calendar exception is applicable.Date
getFromDate()
Gets the beginning of the exception time.int
getMonth()
Gets the month for which an exception recurrence is scheduled.int
getMonthDay()
Gets the day of a month on which an exception recurrence is scheduled.int
getMonthItem()
Gets the month item for which an exception recurrence is scheduled.int
getMonthPosition()
Gets the position of a month item within a month.String
getName()
Gets the name of the exception.int
getOccurrences()
Gets the number of occurrences for which the calendar exception is valid.Calendar
getParentCalendar()
Gets the parent calendar for this object.int
getPeriod()
Gets the period of recurrence for the exception.Date
getToDate()
Gets the end of the exception time.int
getType()
Gets the exception type.double
getWorkingTime()
Returns the working time for a calendar exception.WorkingTimeCollection
getWorkingTimes()
Gets the WorkingTimeCollection object.void
setDayWorking(boolean value)
Sets a value indicating whether the specified date or day type is working.void
setEnteredByOccurrences(boolean value)
Sets a value indicating whether the range of recurrence is defined by entering a number of occurrences.void
setFromDate(Date value)
Sets the beginning of the exception time.void
setMonth(int value)
Sets the month for which an exception recurrence is scheduled.void
setMonthDay(int value)
Sets the day of a month on which an exception recurrence is scheduled.void
setMonthItem(int value)
Sets the month item for which an exception recurrence is scheduled.void
setMonthPosition(int value)
Sets the position of a month item within a month.void
setName(String value)
Sets the name of the exception.void
setOccurrences(int value)
Sets the number of occurrences for which the calendar exception is valid.void
setPeriod(int value)
Sets the period of recurrence for the exception.void
setToDate(Date value)
Sets the end of the exception time.void
setType(int value)
Sets the exception type.void
setWorkingTimes(WorkingTimeCollection value)
Sets the WorkingTimeCollection object.
-
-
-
Constructor Detail
-
CalendarException
public CalendarException()
Initializes a new instance of the
CalendarException
class.
-
-
Method Detail
-
checkException
public final boolean checkException(Date dt)
Returns true if the specified instance of the
Date
struct is the exception day.
-
delete
public final void delete()
Deletes the Exception instance from parent calendar CalendarExceptionCollection object.
-
getDayWorking
public final boolean getDayWorking()
Gets a value indicating whether the specified date or day type is working.
- Returns:
- a value indicating whether the specified date or day type is working.
-
setDayWorking
public final void setDayWorking(boolean value)
Sets a value indicating whether the specified date or day type is working.
- Parameters:
value
- a value indicating whether the specified date or day type is working.
-
getDaysOfWeek
public final DayTypeCollection getDaysOfWeek()
Gets the DayTypeCollection for this object. The days of the week on which the exception is valid.
- Returns:
- the DayTypeCollection for this object.
-
getEnteredByOccurrences
public final boolean getEnteredByOccurrences()
Gets a value indicating whether the range of recurrence is defined by entering a number of occurrences. False specifies that the range of recurrence is defined by entering a finish date.
- Returns:
- a value indicating whether the range of recurrence is defined by entering a number of occurrences.
-
setEnteredByOccurrences
public final void setEnteredByOccurrences(boolean value)
Sets a value indicating whether the range of recurrence is defined by entering a number of occurrences. False specifies that the range of recurrence is defined by entering a finish date.
- Parameters:
value
- a value indicating whether the range of recurrence is defined by entering a number of occurrences.
-
getFromDate
public final Date getFromDate()
Gets the beginning of the exception time.
- Returns:
- the beginning of the exception time.
-
setFromDate
public final void setFromDate(Date value)
Sets the beginning of the exception time.
- Parameters:
value
- the beginning of the exception time.
-
getMonth
public final int getMonth()
Gets the month for which an exception recurrence is scheduled.
- Returns:
- the month for which an exception recurrence is scheduled.
-
setMonth
public final void setMonth(int value)
Sets the month for which an exception recurrence is scheduled.
- Parameters:
value
- the month for which an exception recurrence is scheduled.
-
getMonthDay
public final int getMonthDay()
Gets the day of a month on which an exception recurrence is scheduled.
- Returns:
- the day of a month on which an exception recurrence is scheduled.
-
setMonthDay
public final void setMonthDay(int value)
Sets the day of a month on which an exception recurrence is scheduled.
- Parameters:
value
- the day of a month on which an exception recurrence is scheduled.
-
getMonthItem
public final int getMonthItem()
Gets the month item for which an exception recurrence is scheduled.
- Returns:
- the month item for which an exception recurrence is scheduled.
-
setMonthItem
public final void setMonthItem(int value)
Sets the month item for which an exception recurrence is scheduled.
- Parameters:
value
- the month item for which an exception recurrence is scheduled.
-
getMonthPosition
public final int getMonthPosition()
Gets the position of a month item within a month.
- Returns:
- the position of a month item within a month.
-
setMonthPosition
public final void setMonthPosition(int value)
Sets the position of a month item within a month.
- Parameters:
value
- the position of a month item within a month.
-
getName
public final String getName()
Gets the name of the exception.
- Returns:
- the name of the exception.
-
setName
public final void setName(String value)
Sets the name of the exception.
- Parameters:
value
- the name of the exception.
-
getOccurrences
public final int getOccurrences()
Gets the number of occurrences for which the calendar exception is valid.
- Returns:
- the number of occurrences for which the calendar exception is valid.
-
setOccurrences
public final void setOccurrences(int value)
Sets the number of occurrences for which the calendar exception is valid.
- Parameters:
value
- the number of occurrences for which the calendar exception is valid.
-
getParentCalendar
public final Calendar getParentCalendar()
Gets the parent calendar for this object.
- Returns:
- the parent calendar for this object.
-
getPeriod
public final int getPeriod()
Gets the period of recurrence for the exception.
- Returns:
- the period of recurrence for the exception.
-
setPeriod
public final void setPeriod(int value)
Sets the period of recurrence for the exception.
- Parameters:
value
- the period of recurrence for the exception.
-
getToDate
public final Date getToDate()
Gets the end of the exception time.
- Returns:
- the end of the exception time.
-
setToDate
public final void setToDate(Date value)
Sets the end of the exception time.
- Parameters:
value
- the end of the exception time.
-
getType
public final int getType()
Gets the exception type.
- Returns:
- the exception type.
-
setType
public final void setType(int value)
Sets the exception type.
- Parameters:
value
- the exception type.
-
getWorkingTime
public final double getWorkingTime()
Returns the working time for a calendar exception.
- Returns:
- Returns working time for this calendar exception.
-
getWorkingTimes
public final WorkingTimeCollection getWorkingTimes()
Gets the WorkingTimeCollection object. The collection of working times that defines the time worked on the weekday.
At least one working time must present, and there can't be more than five.- Returns:
- the WorkingTimeCollection object.
-
setWorkingTimes
public final void setWorkingTimes(WorkingTimeCollection value)
Sets the WorkingTimeCollection object. The collection of working times that defines the time worked on the weekday.
At least one working time must present, and there can't be more than five.- Parameters:
value
- the WorkingTimeCollection object.
-
-