Ontimize 5.2071EN

com.ontimize.util.calendar
Class AdvancedTimePeriod

java.lang.Object
  extended bycom.ontimize.util.calendar.AdvancedTimePeriod
All Implemented Interfaces:
java.io.Serializable, TimePeriod

public class AdvancedTimePeriod
extends java.lang.Object
implements TimePeriod

See Also:
Serialized Form

Field Summary
protected  BusinessCalendar businessCalendar
           
protected  java.util.Calendar calendar
           
protected  int endDay
           
protected  int endMonth
           
protected  boolean isWorkingPeriod
           
protected  java.util.Locale locale
           
protected  int startDay
           
protected  int startMonth
           
 
Constructor Summary
AdvancedTimePeriod(int startDay, int endDay, int startMonth, int endMonth, boolean workingPeriod, java.util.Locale locale, BusinessCalendar businessCalendar)
           
AdvancedTimePeriod(java.lang.String periodDefinitionString, java.util.Locale locale, java.lang.String businessCalendarProperties)
           
 
Method Summary
 BusinessCalendar getBusinessCalendar()
           
 int getEndDay()
           
 int getEndMonth()
           
 java.util.Locale getLocale()
           
 java.lang.String getPeriodString()
           
 int getStartDay()
           
 int getStartMonth()
           
 boolean isWorkingPeriod()
           
protected  void parseString(java.lang.String periodDefinitionString)
           
protected  boolean timeIsInNormalPeriod(java.util.Calendar cal)
           
 boolean timeIsInPeriod(long time)
           
protected  boolean timeIsInWorkingPeriod(java.util.Calendar cal)
           
protected  boolean validateMonth(java.util.Calendar cal)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

calendar

protected java.util.Calendar calendar

businessCalendar

protected BusinessCalendar businessCalendar

locale

protected java.util.Locale locale

isWorkingPeriod

protected boolean isWorkingPeriod

startDay

protected int startDay

endDay

protected int endDay

startMonth

protected int startMonth

endMonth

protected int endMonth
Constructor Detail

AdvancedTimePeriod

public AdvancedTimePeriod(java.lang.String periodDefinitionString,
                          java.util.Locale locale,
                          java.lang.String businessCalendarProperties)
                   throws java.lang.Exception

AdvancedTimePeriod

public AdvancedTimePeriod(int startDay,
                          int endDay,
                          int startMonth,
                          int endMonth,
                          boolean workingPeriod,
                          java.util.Locale locale,
                          BusinessCalendar businessCalendar)
Method Detail

parseString

protected void parseString(java.lang.String periodDefinitionString)

timeIsInPeriod

public boolean timeIsInPeriod(long time)
Specified by:
timeIsInPeriod in interface TimePeriod

timeIsInNormalPeriod

protected boolean timeIsInNormalPeriod(java.util.Calendar cal)

timeIsInWorkingPeriod

protected boolean timeIsInWorkingPeriod(java.util.Calendar cal)

validateMonth

protected boolean validateMonth(java.util.Calendar cal)

isWorkingPeriod

public boolean isWorkingPeriod()

getBusinessCalendar

public BusinessCalendar getBusinessCalendar()

getLocale

public java.util.Locale getLocale()

getStartDay

public int getStartDay()

getEndDay

public int getEndDay()

getStartMonth

public int getStartMonth()

getEndMonth

public int getEndMonth()

getPeriodString

public java.lang.String getPeriodString()

Ontimize