Package com.uc4.api.objects
Class WeeklyCalendarKeyword
- java.lang.Object
-
- com.uc4.api.objects.CalendarKeyword
-
- com.uc4.api.objects.WeeklyCalendarKeyword
-
public class WeeklyCalendarKeyword extends CalendarKeyword
This class represents a weekly calendar keyword.
-
-
Constructor Summary
Constructors Modifier Constructor Description WeeklyCalendarKeyword(UC4ObjectName name)
Constructs a newWeeklyCalendarKeyword
.WeeklyCalendarKeyword(UC4ObjectName name, int nWeek, int startWeek, int endWeek)
Constructs a newWeeklyCalendarKeyword
.protected
WeeklyCalendarKeyword(com.uc4.util.XMLDocument doc, org.w3c.dom.Element keyword, java.lang.String string)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getEndWeek()
Returns the end week for the interval.int
getNWeek()
Returns the interval in weeks.int
getStartWeek()
Returns the start week for the interval.boolean
isFriday()
Returnstrue
if friday is selected.boolean
isGroup()
Returnstrue
if this is a group keyword.boolean
isMonday()
Returnstrue
if monday is selected.boolean
isMonthly()
Returnstrue
if this is a monthly keyword.boolean
isRoll()
Returnstrue
if this is a roll keyword.boolean
isSaturday()
Returnstrue
if saturday is selected.boolean
isStatic()
Returnstrue
if this is a static keyword.boolean
isSunday()
Returnstrue
if sunday is selected.boolean
isThursday()
Returnstrue
if thursday is selected.boolean
isTuesday()
Returnstrue
if tuesday is selected.boolean
isWednesday()
Returnstrue
if wednesday is selected.boolean
isWeekly()
Returnstrue
if this is a weekly keyword.boolean
isYearly()
Returnstrue
if this is a yearly keyword.protected void
save(com.uc4.util.XMLDocument doc, org.w3c.dom.Element parent)
Saves the keyword under the specified parent elementvoid
setEndWeek(int endWeek)
Sets the end week for the interval.void
setFriday(boolean friday)
Selects or deselects friday.void
setMonday(boolean monday)
Selects or deselects monday.void
setNWeek(int week)
Sets the interval in weeks.void
setSaturday(boolean saturday)
Selects or deselects saturday.void
setStartWeek(int startWeek)
Sets the start week for the interval.void
setSunday(boolean sunday)
Selects or deselects sunday.void
setThursday(boolean thursday)
Selects or deselects thursday.void
setTuesday(boolean tuesday)
Selects or deselects tuesday.void
setWednesday(boolean wednesday)
Selects or deselects wednesday.-
Methods inherited from class com.uc4.api.objects.CalendarKeyword
containsDate, equals, getCalendarName, getErrorMessageInsert, getErrorMessageNumber, getErrorText, getName, getPreCalculatedDates, hashCode, invalidateCalculatedDates, loadCalculatedDays, setCalendarName, setErrorMessageInsert, setErrorMessageNumber, setErrorText, setName, toString
-
-
-
-
Constructor Detail
-
WeeklyCalendarKeyword
protected WeeklyCalendarKeyword(com.uc4.util.XMLDocument doc, org.w3c.dom.Element keyword, java.lang.String string)
-
WeeklyCalendarKeyword
public WeeklyCalendarKeyword(UC4ObjectName name, int nWeek, int startWeek, int endWeek)
Constructs a newWeeklyCalendarKeyword
.- Parameters:
name
- Name of the calendar keywordnWeek
- Every n week, integer between 1 and 54startWeek
- First week, integer between 0 and 54endWeek
- Last week, integer between 0 and 54
-
WeeklyCalendarKeyword
public WeeklyCalendarKeyword(UC4ObjectName name)
Constructs a newWeeklyCalendarKeyword
. Every week starting with week 0 and ending with 54 is selected.- Parameters:
name
- Name of the calendar keyword
-
-
Method Detail
-
getEndWeek
public int getEndWeek()
Returns the end week for the interval.- Returns:
- Integer containg the end week
-
setEndWeek
public void setEndWeek(int endWeek)
Sets the end week for the interval.- Parameters:
endWeek
- Integer containing the end week, between 0 and 54
-
getNWeek
public int getNWeek()
Returns the interval in weeks.- Returns:
- Interval in weeks
-
setNWeek
public void setNWeek(int week)
Sets the interval in weeks.- Parameters:
week
- Interval in weeks, integer between 1 and 54
-
getStartWeek
public int getStartWeek()
Returns the start week for the interval.- Returns:
- Integer containg the start week
-
setStartWeek
public void setStartWeek(int startWeek)
Sets the start week for the interval.- Parameters:
startWeek
- Integer containing the start week, between 0 and 54
-
isFriday
public boolean isFriday()
Returnstrue
if friday is selected.- Returns:
- Boolean containg true if friday is selected
-
setFriday
public void setFriday(boolean friday)
Selects or deselects friday.- Parameters:
friday
- Boolean containg true if friday should be selected
-
isMonday
public boolean isMonday()
Returnstrue
if monday is selected.- Returns:
- Boolean containg true if monday is selected
-
setMonday
public void setMonday(boolean monday)
Selects or deselects monday.- Parameters:
monday
- Boolean containg true if monday should be selected
-
isSaturday
public boolean isSaturday()
Returnstrue
if saturday is selected.- Returns:
- Boolean containg true if saturday is selected
-
setSaturday
public void setSaturday(boolean saturday)
Selects or deselects saturday.- Parameters:
saturday
- Boolean containg true if saturday should be selected
-
isSunday
public boolean isSunday()
Returnstrue
if sunday is selected.- Returns:
- Boolean containg true if sunday is selected
-
setSunday
public void setSunday(boolean sunday)
Selects or deselects sunday.- Parameters:
sunday
- Boolean containg true if sunday should be selected
-
isThursday
public boolean isThursday()
Returnstrue
if thursday is selected.- Returns:
- Boolean containg true if thursday is selected
-
setThursday
public void setThursday(boolean thursday)
Selects or deselects thursday.- Parameters:
thursday
- Boolean containg true if thursday should be selected
-
isTuesday
public boolean isTuesday()
Returnstrue
if tuesday is selected.- Returns:
- Boolean containg true if tuesday is selected
-
setTuesday
public void setTuesday(boolean tuesday)
Selects or deselects tuesday.- Parameters:
tuesday
- Boolean containg true if tuesday should be selected
-
isWednesday
public boolean isWednesday()
Returnstrue
if wednesday is selected.- Returns:
- Boolean containg true if wednesday is selected
-
setWednesday
public void setWednesday(boolean wednesday)
Selects or deselects wednesday.- Parameters:
wednesday
- Boolean containg true if wednesday should be selected
-
isStatic
public boolean isStatic()
Description copied from class:CalendarKeyword
Returnstrue
if this is a static keyword.- Specified by:
isStatic
in classCalendarKeyword
- Returns:
- Boolean containing true in case of a static keyword
-
isWeekly
public boolean isWeekly()
Description copied from class:CalendarKeyword
Returnstrue
if this is a weekly keyword.- Specified by:
isWeekly
in classCalendarKeyword
- Returns:
- Boolean containing true in case of a weekly keyword
-
isMonthly
public boolean isMonthly()
Description copied from class:CalendarKeyword
Returnstrue
if this is a monthly keyword.- Specified by:
isMonthly
in classCalendarKeyword
- Returns:
- Boolean containing true in case of a monthly keyword
-
isYearly
public boolean isYearly()
Description copied from class:CalendarKeyword
Returnstrue
if this is a yearly keyword.- Specified by:
isYearly
in classCalendarKeyword
- Returns:
- Boolean containing true in case of a yearly keyword
-
isGroup
public boolean isGroup()
Description copied from class:CalendarKeyword
Returnstrue
if this is a group keyword.- Specified by:
isGroup
in classCalendarKeyword
- Returns:
- Boolean containing true in case of a group keyword
-
isRoll
public boolean isRoll()
Description copied from class:CalendarKeyword
Returnstrue
if this is a roll keyword.- Specified by:
isRoll
in classCalendarKeyword
- Returns:
- Boolean containing true in case of a roll keyword
-
save
protected void save(com.uc4.util.XMLDocument doc, org.w3c.dom.Element parent)
Description copied from class:CalendarKeyword
Saves the keyword under the specified parent element- Specified by:
save
in classCalendarKeyword
- Parameters:
doc
- XML Documentparent
- Parent element
-
-