Package com.uc4.api.objects
Class RollCalendarKeyword
- java.lang.Object
-
- com.uc4.api.objects.CalendarKeyword
-
- com.uc4.api.objects.RollCalendarKeyword
-
public class RollCalendarKeyword extends CalendarKeyword
This class represents a Roll Calendar Keyword.
-
-
Constructor Summary
Constructors Modifier Constructor Description RollCalendarKeyword(UC4ObjectName name, CalendarCondition cond)
Constructs a newRollCalendarKeyword
using the specified source calendar condition.protected
RollCalendarKeyword(org.w3c.dom.Element keyword, java.lang.String string)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addCollision(RollCalendarCollision coll)
Adds aRollCalendarCollision
to the list of reactions in case of collision.int
collionsSize()
Returns the number of entries in the collision list.java.util.Iterator<RollCalendarCollision>
collisionIterator()
Returns an iterator overRollCalendarCollision
.int
getAdjustDays()
Returns the number of days of adjustment.CalendarCondition
getAdjustmentCalendar()
Returns the name and keyword of the calendar which contains valid days for adjustment.char
getAdjustSign()
CalendarCondition
getSourceCalendar()
Returns the source calendar condition.boolean
isGroup()
Returnstrue
if this is a group keyword.boolean
isMonthly()
Returnstrue
if this is a monthly keyword.boolean
isRoll()
Returnstrue
if this is a roll keyword.boolean
isStatic()
Returnstrue
if this is a static keyword.boolean
isWeekly()
Returnstrue
if this is a weekly keyword.boolean
isYearly()
Returnstrue
if this is a yearly keyword.boolean
removeCollision(RollCalendarCollision coll)
Removes the specified reaction in case of a collision.protected void
save(com.uc4.util.XMLDocument doc, org.w3c.dom.Element parent)
Saves the keyword under the specified parent elementvoid
setAdjustDays(int adjustDays)
Sets the number of days of adjustment.void
setAdjustmentCalendar(CalendarCondition adjustmentCalendar)
Sets the calendar and keyword from which days should be choosen if adjustment is enabled.void
setAdjustSign(char sign)
Sets the sign of the adjust offset.void
setSourceCalendar(CalendarCondition sourceCalendar)
Sets the source calendar condition.-
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
-
RollCalendarKeyword
protected RollCalendarKeyword(org.w3c.dom.Element keyword, java.lang.String string)
-
RollCalendarKeyword
public RollCalendarKeyword(UC4ObjectName name, CalendarCondition cond)
Constructs a newRollCalendarKeyword
using the specified source calendar condition.- Parameters:
name
- Name of the calendar keywordcond
- Source calendar and keyword
-
-
Method Detail
-
collisionIterator
public java.util.Iterator<RollCalendarCollision> collisionIterator()
Returns an iterator overRollCalendarCollision
.- Returns:
- Iterator over reactions in case of collisions
-
addCollision
public void addCollision(RollCalendarCollision coll)
Adds aRollCalendarCollision
to the list of reactions in case of collision.- Parameters:
coll
- Reactions in case of collision
-
removeCollision
public boolean removeCollision(RollCalendarCollision coll)
Removes the specified reaction in case of a collision.- Parameters:
coll
- Reactions in case of collision- Returns:
- True if and only if the RollCalendarCollision was removed from this list of collisions
-
collionsSize
public int collionsSize()
Returns the number of entries in the collision list.- Returns:
- Number of collitions actions
-
getAdjustDays
public int getAdjustDays()
Returns the number of days of adjustment.- Returns:
- Integer containing the day offset
-
setAdjustDays
public void setAdjustDays(int adjustDays)
Sets the number of days of adjustment.- Parameters:
adjustDays
- Integer containing the day offset
-
getAdjustmentCalendar
public CalendarCondition getAdjustmentCalendar()
Returns the name and keyword of the calendar which contains valid days for adjustment.- Returns:
- Calendar name and calendar keyword containing valid days for adjustment
-
setAdjustmentCalendar
public void setAdjustmentCalendar(CalendarCondition adjustmentCalendar)
Sets the calendar and keyword from which days should be choosen if adjustment is enabled. The parameteradjustmentCalendar
can be set tonull
if no specific calendar with valid days should be used.- Parameters:
adjustmentCalendar
- Calendar name and calendar keyword containing valid days for adjustment
-
getSourceCalendar
public CalendarCondition getSourceCalendar()
Returns the source calendar condition.- Returns:
- Source calendar condition
-
setSourceCalendar
public void setSourceCalendar(CalendarCondition sourceCalendar)
Sets the source calendar condition.- Parameters:
sourceCalendar
- Source calendar condition
-
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
-
setAdjustSign
public void setAdjustSign(char sign)
Sets the sign of the adjust offset.- Parameters:
sign
- Sign '+' or '-'
-
getAdjustSign
public char getAdjustSign()
- Returns:
- Sign of the adjust offset. Can be + or -
-
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
-
-