Package com.uc4.api.objects
Class StaticCalendarKeyword
java.lang.Object
com.uc4.api.objects.CalendarKeyword
com.uc4.api.objects.StaticCalendarKeyword
This class represents a static calendar keyword.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionStaticCalendarKeyword(UC4ObjectName name, DateTime from, DateTime to) Constructs a newStaticCalendarKeywordusing the specified name and date range.protectedStaticCalendarKeyword(Element keyword, String string) -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a new date to this static calendar keyword.voidclear()Removes all dates from this static calendar keyword.Returns the start date of the validity period.Returns the end date of the validity period.booleanisGroup()Returnstrueif this is a group keyword.booleanReturnstrueif this is a monthly keyword.booleanisRoll()Returnstrueif this is a roll keyword.booleanisStatic()Returnstrueif this is a static keyword.booleanisWeekly()Returnstrueif this is a weekly keyword.booleanisYearly()Returnstrueif this is a yearly keyword.iterator()Returns an iterator overDateTime.booleanRemoves the specified date from this static calendar keyword.protected voidSaves the keyword under the specified parent elementvoidsetValidFrom(DateTime validFrom) Sets the start date of the validity period.voidsetValidTo(DateTime validTo) Sets the end date of the validity period.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, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
StaticCalendarKeyword
Constructs a newStaticCalendarKeywordusing the specified name and date range.- Parameters:
name- Name of the Calendar Keywordfrom- Start date where the calendar keyword is validto- End date until the calendar keyword is valid
-
StaticCalendarKeyword
-
-
Method Details
-
iterator
Returns an iterator overDateTime. This iterator can be used to read or delete dates in this static calendar keyword. -
add
Adds a new date to this static calendar keyword.- Parameters:
date- DateTime containing the Date that should be added
-
remove
Removes the specified date from this static calendar keyword.- Parameters:
date- DateTime which should be removed- Returns:
- True if and only if the date was removed successfully.
-
clear
public void clear()Removes all dates from this static calendar keyword. -
getValidFrom
Returns the start date of the validity period.- Returns:
- DateTime containing the start date of the validity period
-
setValidFrom
Sets the start date of the validity period.- Parameters:
validFrom- DateTime containing the start date of the validity period
-
getValidTo
Returns the end date of the validity period.- Returns:
- DateTime containing the end date of the validity period
-
setValidTo
Sets the end date of the validity period.- Parameters:
validTo- DateTime containing the end date of the validity period
-
isStatic
public boolean isStatic()Description copied from class:CalendarKeywordReturnstrueif this is a static keyword.- Specified by:
isStaticin classCalendarKeyword- Returns:
- Boolean containing true in case of a static keyword
-
isWeekly
public boolean isWeekly()Description copied from class:CalendarKeywordReturnstrueif this is a weekly keyword.- Specified by:
isWeeklyin classCalendarKeyword- Returns:
- Boolean containing true in case of a weekly keyword
-
isMonthly
public boolean isMonthly()Description copied from class:CalendarKeywordReturnstrueif this is a monthly keyword.- Specified by:
isMonthlyin classCalendarKeyword- Returns:
- Boolean containing true in case of a monthly keyword
-
isYearly
public boolean isYearly()Description copied from class:CalendarKeywordReturnstrueif this is a yearly keyword.- Specified by:
isYearlyin classCalendarKeyword- Returns:
- Boolean containing true in case of a yearly keyword
-
isGroup
public boolean isGroup()Description copied from class:CalendarKeywordReturnstrueif this is a group keyword.- Specified by:
isGroupin classCalendarKeyword- Returns:
- Boolean containing true in case of a group keyword
-
isRoll
public boolean isRoll()Description copied from class:CalendarKeywordReturnstrueif this is a roll keyword.- Specified by:
isRollin classCalendarKeyword- Returns:
- Boolean containing true in case of a roll keyword
-
save
Description copied from class:CalendarKeywordSaves the keyword under the specified parent element- Specified by:
savein classCalendarKeyword- Parameters:
doc- XML Documentparent- Parent element
-