Interface IWorkingCalendar
public interface IWorkingCalendar
A working calendar is used to define standard working and nonworking times.
A project must have one base (default) calendar. Users may have their own calendars,
which are based on a base calendar.
- Author:
- POLARION SOFTWARE
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateElement
(Element parent) Create document element of this working calendarReturns the the base calendar on which this calendar depends.The unique ID for the base calendar on which this calendar depends; only used if this calendar is not a base calendar.getID()
Returns unique identifier of this calendar.getName()
Name of user's calendar is the id of the user, otherwise the name may be arbitrary.getWorkingDay
(long time, boolean considerBase) Returns working day for particular date (specific definitions are taken into account).getWorkingDays
(boolean considerBase) Returns all working days defined in this calendar; working days from base calendar may be included as well (working days from this calendar are in the beginning of the list).getWorkingWeekDay
(int day, boolean considerBase) Returns working day for a typical (with no specific definition) week day.boolean
Indicates whether the calendar is a base calendar.int
numberOfWorkingDays
(Date startDate, Date endDate) Returns number of working days from the 'startDate' to the 'endDate' inclusive.void
setBaseCalendar
(boolean isBaseCalendar) Sets whether the calendar is a base calendarvoid
Sets the unique ID for the base calendar on which this calendar depends; only used if this calendar is not a base calendar.void
Sets unique identifier of this calendarvoid
Sets name of user's calendar.void
setWorkingDays
(IWorkingDay[] days) Sets working days defined for this calendar.
-
Field Details
-
CONFIG_ID
- See Also:
-
-
Method Details
-
getID
Returns unique identifier of this calendar.- Returns:
- the unique ID of this calendar
-
setID
Sets unique identifier of this calendar- Parameters:
id
- the id to set
-
getName
Name of user's calendar is the id of the user, otherwise the name may be arbitrary. -
setName
Sets name of user's calendar. -
isBaseCalendar
boolean isBaseCalendar()Indicates whether the calendar is a base calendar. -
setBaseCalendar
void setBaseCalendar(boolean isBaseCalendar) Sets whether the calendar is a base calendar- Parameters:
isBaseCalendar
-
-
getBaseCalendarID
The unique ID for the base calendar on which this calendar depends; only used if this calendar is not a base calendar. -
setBaseCalendarID
Sets the unique ID for the base calendar on which this calendar depends; only used if this calendar is not a base calendar.- Parameters:
id
- the id to set
-
getBaseCalendar
Returns the the base calendar on which this calendar depends.- See Also:
-
getWorkingWeekDay
Returns working day for a typical (with no specific definition) week day.- Parameters:
day
-Calendar
day constantconsiderBase
- whether base calendar should be considered if no entry is in this calendar
-
getWorkingDay
Returns working day for particular date (specific definitions are taken into account).- Parameters:
time
-considerBase
- whether base calendar should be considered if no entry is in this calendar- Returns:
- the
IWorkingDay
for the specified parameters
-
getWorkingDays
Returns all working days defined in this calendar; working days from base calendar may be included as well (working days from this calendar are in the beginning of the list).- Parameters:
considerBase
- whether working days from base calendar should be included
-
setWorkingDays
Sets working days defined for this calendar.- Parameters:
days
- the working days to set
-
numberOfWorkingDays
Returns number of working days from the 'startDate' to the 'endDate' inclusive.- Since:
- 3.8.0
-
createElement
Create document element of this working calendar- Parameters:
parent
- the parent element- Returns:
- document element of this working calendar
-