public class ProjectCalendarWeek extends Object
| Modifier and Type | Field and Description |
|---|---|
static DateRange |
DEFAULT_WORKING_AFTERNOON |
static DateRange |
DEFAULT_WORKING_MORNING
Constants representing the default working morning and afternoon hours.
|
| Constructor and Description |
|---|
ProjectCalendarWeek() |
| Modifier and Type | Method and Description |
|---|---|
ProjectCalendarHours |
addCalendarHours()
Adds a set of hours to this calendar without assigning them to
a particular day.
|
ProjectCalendarHours |
addCalendarHours(Day day)
Used to add working hours to the calendar.
|
void |
addDefaultCalendarHours()
This is a convenience method used to add a default set of calendar
hours to a calendar.
|
void |
addDefaultCalendarHours(Day day)
This is a convenience method used to add a default set of calendar
hours to a calendar.
|
void |
attachHoursToDay(ProjectCalendarHours hours)
Attaches a pre-existing set of hours to the correct
day within the calendar.
|
ProjectCalendarHours |
getCalendarHours(Day day)
This method retrieves the calendar hours for the specified day.
|
DateRange |
getDateRange()
Retrieves the data range for which this week is valid.
|
DayType[] |
getDays()
Retrieve an array representing the days of the week for this calendar.
|
ProjectCalendarHours[] |
getHours()
Retrieve an array representing all of the calendar hours defined
by this calendar.
|
ProjectCalendarHours |
getHours(Day day)
This method retrieves the calendar hours for the specified day.
|
String |
getName()
Calendar name.
|
ProjectCalendarWeek |
getParent()
If this week is derived from a another week, this method
will return the parent week.
|
DayType |
getWorkingDay(Day day)
This method allows the retrieval of the actual working day flag,
which can take the values DEFAULT, WORKING, or NONWORKING.
|
boolean |
isDerived()
Flag indicating if this week is derived from another week.
|
void |
removeHoursFromDay(ProjectCalendarHours hours)
Removes a set of calendar hours from the day to which they
are currently attached.
|
void |
setDateRange(DateRange range)
Sets the date range for this week.
|
void |
setName(String name)
Calendar name.
|
void |
setWorkingDay(Day day,
boolean working)
convenience method for setting working or non-working days.
|
void |
setWorkingDay(Day day,
DayType working)
This is a convenience method provided to allow a day to be set
as working or non-working, by using the day number to
identify the required day.
|
public static final DateRange DEFAULT_WORKING_MORNING
public static final DateRange DEFAULT_WORKING_AFTERNOON
public void setName(String name)
name - calendar namepublic String getName()
public DateRange getDateRange()
public void setDateRange(DateRange range)
range - date range, or nullpublic ProjectCalendarWeek getParent()
public boolean isDerived()
public ProjectCalendarHours addCalendarHours()
public ProjectCalendarHours getCalendarHours(Day day)
day - Day instancepublic ProjectCalendarHours[] getHours()
public ProjectCalendarHours getHours(Day day)
day - Day instancepublic void addDefaultCalendarHours()
public void addDefaultCalendarHours(Day day)
day - Day for which to add default hours forpublic ProjectCalendarHours addCalendarHours(Day day)
day - day numberpublic void attachHoursToDay(ProjectCalendarHours hours)
hours - calendar hours instancepublic void removeHoursFromDay(ProjectCalendarHours hours)
hours - calendar hours instancepublic DayType[] getDays()
public DayType getWorkingDay(Day day)
day - required daypublic void setWorkingDay(Day day, boolean working)
day - required dayworking - flag indicating if the day is a working dayCopyright © 2013. All Rights Reserved.