ibi.broker.api.data.schedule
Class TimeInfoDay

java.lang.Object
  extended by ibi.broker.api.data.schedule.TimeInfo
      extended by ibi.broker.api.data.schedule.TimeInfoDay
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
TimeInfoYear

public class TimeInfoDay
extends TimeInfo

 The TimeInfoDay class represents time information pertaining to scheduled  
 reports that run in intervals of days. Like all time-related classes in 
 ReportCaster it is derived from the TimeInfo class. The default start time, 
 inherited from TimeInfo, is the current time.

 A code snippet illustrating the use of this class is below:

 + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 +  Copyright (c) 2004 Information Builders, Inc. All  Rights Reserved.     +
 +                                                                          +
 +  Information Builders offers sample API programs as a heuristic device.  +
 +  They are not intended, as is, for production use. Licensed users are    +
 +  welcome to alter and extend these samples and deploy them in other      +
 +  environments, or alternate configurations, as they see fit.             +
 +  Information Builders will support the documented functionality of       +
 +  its API classes and methods. However, Information Builders is not       +
 +  responsible for functionality or behavior of products built with        +
 +  its API unless the documented behavior of its discrete classes and      +
 +  methods is different than the actual results.                           +
 +                                                                          +
 +  Redistributions of IBI source code and documentation must be within     +
 +  the scope of the Information Builders Software License Agreement.       +
 +                                                                          +
 + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++   

                //create TimeInfoDay so it can be referenced by a schedule.
                TimeInfoDay timeInfo = new TimeInfoDay();
                GregorianCalendar startTime = new GregorianCalendar();
                timeInfo.setStartTime(startTime);
                GregorianCalendar endTime = new GregorianCalendar();
                endTime.add(Calendar.DATE, 8); //add 8 days to today as an end time
                timeInfo.setEndTime(endTime);
                timeInfo.setFrequency(2); //run every two days
                schedule.setTimeInfo(timeInfo);
 

See Also:
Serialized Form

Field Summary
 
Fields inherited from class ibi.broker.api.data.schedule.TimeInfo
CUSTOM, DAY, description, HOUR, id, MINUTE, MONTH, name, ONCE, WEEK, YEAR
 
Constructor Summary
TimeInfoDay()
           
 
Method Summary
 java.util.Calendar getEndTime()
          Obtains a Java Calendar Object indicating the end time for a scheduled event.
 int getFrequency()
          Obtains the frequency for a scheduled event, in days.
 TimeInterval getSecondaryRunInterval()
          Obtains the secondary run interval, in minutes.
 void setEndTime(java.util.Calendar endTime)
          Assigns a Java Calendar Object indicating the end time for a scheduled event.
 void setFrequency(int frequency)
          Assigns the frequency for a scheduled event, in days.
 void setSecondaryRunInterval(TimeInterval secondaryRunInterval)
          Assigns the secondary run interval, in minutes.
 
Methods inherited from class ibi.broker.api.data.schedule.TimeInfo
getDescription, getId, getName, getNextRunTime, getStartTime, setDescription, setId, setName, setNextRunTime, setStartTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimeInfoDay

public TimeInfoDay()
Method Detail

getEndTime

public java.util.Calendar getEndTime()
Obtains a Java Calendar Object indicating the end time for a scheduled event. Because the Java Calendar class is an abstract class, the actual instance object involved is a GregorianCalendar. The default is 2099.

Returns:
A reference to the end time Calendar object.
See Also:
setEndTime(Calendar)

setEndTime

public void setEndTime(java.util.Calendar endTime)
Assigns a Java Calendar Object indicating the end time for a scheduled event. Because the Java Calendar class is an abstract class, the actual instance object involved is a GregorianCalendar. If this isn't set, the default is 2099.

Parameters:
endTime - The Calendar end time.
See Also:
getEndTime()

getFrequency

public int getFrequency()
Obtains the frequency for a scheduled event, in days. For example, if an e-mail report distribution is set to run every third day, the frequency would be 3. The default frequency is 1.

Returns:
The frequency as an integer.
See Also:
setFrequency(int)

setFrequency

public void setFrequency(int frequency)
Assigns the frequency for a scheduled event, in days. For example, if an e-mail report distribution is set to run every third day, the frequency would be 3. The default frequency is 1.

Parameters:
frequency - The frequency as an integer.
See Also:
getFrequency()

getSecondaryRunInterval

public TimeInterval getSecondaryRunInterval()
Obtains the secondary run interval, in minutes. You can optionally create a secondary run interval for a schedule within the day the schedule runs. Apply the secondary run interval every n minutes for a specified number of minutes or until a specified time. This option is available for schedules that run every day(s), week(s), month(s), or year(s).

Returns:
The secondary run interval, as a TimeInterval.
See Also:
setSecondaryRunInterval(TimeInterval)

setSecondaryRunInterval

public void setSecondaryRunInterval(TimeInterval secondaryRunInterval)
Assigns the secondary run interval, in minutes. You can optionally create a secondary run interval for a schedule within the day the schedule runs. Apply the secondary run interval every n minutes for a specified number of minutes or until a specified time. This option is available for schedules that run every day(s), week(s), month(s), or year(s).

Parameters:
secondaryRunInterval - The secondary run interval, in minutes.
See Also:
getSecondaryRunInterval()


Copyright © 2006 Information Builders, Incorporated.